drivers: adc: stm32: use dedicated status function for ldo state

Now that the U5 HAL contains the dedicated LDO status function, use it
instead of reading the register directly.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This commit is contained in:
Guillaume Gautier 2024-12-06 08:52:06 +01:00 committed by Benjamin Cabé
commit b8b6afd198

View file

@ -1623,10 +1623,7 @@ static int adc_stm32_init(const struct device *dev)
#elif defined(CONFIG_SOC_SERIES_STM32H7X) || \
defined(CONFIG_SOC_SERIES_STM32U5X) || \
defined(CONFIG_SOC_SERIES_STM32WBAX)
/* Don't use LL_ADC_IsActiveFlag_LDORDY since not present in U5 LL (1.5.0)
* (internal issue 185106)
*/
while ((READ_BIT(adc->ISR, LL_ADC_FLAG_LDORDY) != (LL_ADC_FLAG_LDORDY))) {
while (LL_ADC_IsActiveFlag_LDORDY(adc) == 0) {
}
#else
k_busy_wait(LL_ADC_DELAY_INTERNAL_REGUL_STAB_US);