
Hi Fabrice,
On 23 July 2018 at 06:35, Fabrice Gasnier fabrice.gasnier@st.com wrote:
This patch adds support for STMicroelectronics STM32 ADC (analog to digital converter). It's originally based on Linux kernel v4.18-rcs drivers/iio/adc/stm32-adc*. It's composed of:
- core driver (UCLASS_SIMPLE_BUS) manages common resources (clk, regu).
- child drivers (UCLASS_ADC) declare each ADC, channels and handle conversions.
This driver currently supports STM32H7 and STM32MP1 ADC.
Signed-off-by: Fabrice Gasnier fabrice.gasnier@st.com
drivers/adc/Kconfig | 16 +++ drivers/adc/Makefile | 1 + drivers/adc/stm32-adc-core.c | 209 +++++++++++++++++++++++++++++++++++ drivers/adc/stm32-adc-core.h | 51 +++++++++ drivers/adc/stm32-adc.c | 257 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 534 insertions(+) create mode 100644 drivers/adc/stm32-adc-core.c create mode 100644 drivers/adc/stm32-adc-core.h create mode 100644 drivers/adc/stm32-adc.c
Reviewed-by: Simon Glass sjg@chromium.org
I do worry a bit about the code bloat caused by the dev_err() calls. Don't you want to use debug() instead? Or perhaps log() and log_msg_ret()?
Regards, Simon