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>
This commit is contained in:
Guillaume Gautier 2024-01-24 16:12:33 +01:00 committed by Fabio Baltieri
commit 62f1105550

View file

@ -1086,8 +1086,6 @@ static void adc_context_on_complete(struct adc_context *ctx, int status)
ARG_UNUSED(status);
adc_stm32_disable(adc);
/* Reset acquisition time used for the sequence */
data->acq_time_index[0] = -1;
data->acq_time_index[1] = -1;
@ -1095,6 +1093,8 @@ static void adc_context_on_complete(struct adc_context *ctx, int status)
#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 */
}