drivers: adc: stm32: do not disable adc after measurement
Do not disable the ADC after the end of the measurement to avoid systematic
enabling which is time-consuming in case the configuration is unchanged.
Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
(cherry picked from commit 62f11055501854a633847f8b413f9cf5b61aad79)
diff --git a/drivers/adc/adc_stm32.c b/drivers/adc/adc_stm32.c
index 5356273..a3cecc6 100644
--- a/drivers/adc/adc_stm32.c
+++ b/drivers/adc/adc_stm32.c
@@ -1007,8 +1007,6 @@
ARG_UNUSED(status);
- adc_stm32_disable(adc);
-
/* Reset acquisition time used for the sequence */
data->acq_time_index = -1;
@@ -1019,6 +1017,8 @@
#if defined(CONFIG_SOC_SERIES_STM32H7X) || defined(CONFIG_SOC_SERIES_STM32U5X)
/* Reset channel preselection register */
LL_ADC_SetChannelPreselection(adc, 0);
+#else
+ ARG_UNUSED(adc);
#endif /* CONFIG_SOC_SERIES_STM32H7X || CONFIG_SOC_SERIES_STM32U5X */
}