From 41bfec7c5220e5a932f02db41d6e3115045fa96e Mon Sep 17 00:00:00 2001 From: Francois Ramu Date: Fri, 17 Sep 2021 11:50:51 +0200 Subject: [PATCH] drivers: adc: stm32h7 adc driver using LL function Change the access to the PCSEL register by using the LL function because on the STM32H7xx soc, some devices have no PCEL register especially on ADC3 of the stm32H723. The LL function manages this difference. Signed-off-by: Francois Ramu --- drivers/adc/adc_stm32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/adc/adc_stm32.c b/drivers/adc/adc_stm32.c index ad3e3121a3a..21cb9dcf8e1 100644 --- a/drivers/adc/adc_stm32.c +++ b/drivers/adc/adc_stm32.c @@ -384,9 +384,8 @@ static int start_read(const struct device *dev, /* * Each channel in the sequence must be previously enabled in PCSEL. * This register controls the analog switch integrated in the IO level. - * NOTE: There is no LL API to control this register yet. */ - adc->PCSEL |= channels & ADC_PCSEL_PCSEL_Msk; + LL_ADC_SetChannelPreSelection(adc, channel); #endif #if defined(CONFIG_SOC_SERIES_STM32F0X) || \