From 0a2876de263caeeff6bacfa7a94a5e3b18d533dd Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Wed, 20 Dec 2023 17:24:12 +0100 Subject: [PATCH] drivers: timer: stm32: Clean up related to STM32_LPTIM_CLOCK Now that STM32_LPTIM_CLOCK choice symbol is defined from device tree, remove the prompt which was defining it as a user selectable entry. Remove the warning related to possible symbol misalignment with device tree setting. Signed-off-by: Erwan Gouriou --- drivers/timer/Kconfig.stm32_lptim | 2 +- drivers/timer/stm32_lptim_timer.c | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/timer/Kconfig.stm32_lptim b/drivers/timer/Kconfig.stm32_lptim index d1e0d5cb81ab32..dc64ec5bda3f1e 100644 --- a/drivers/timer/Kconfig.stm32_lptim +++ b/drivers/timer/Kconfig.stm32_lptim @@ -35,7 +35,7 @@ config STM32_LPTIM_CLOCK_LSE endchoice config STM32_LPTIM_CLOCK - int "LPTIM clock value" + int default 32768 if STM32_LPTIM_CLOCK_LSE default 32000 if STM32_LPTIM_CLOCK_LSI diff --git a/drivers/timer/stm32_lptim_timer.c b/drivers/timer/stm32_lptim_timer.c index 0a95c84af58c99..16e8b62c3d35ea 100644 --- a/drivers/timer/stm32_lptim_timer.c +++ b/drivers/timer/stm32_lptim_timer.c @@ -66,22 +66,6 @@ static uint32_t lptim_clock_freq = CONFIG_STM32_LPTIM_CLOCK; /* The prescaler given by the DTS and to apply to the lptim_clock_freq */ static uint32_t lptim_clock_presc = DT_PROP(DT_DRV_INST(0), st_prescaler); -#if (CONFIG_STM32_LPTIM_CLOCK_LSI) - -/* Kconfig defines the clock source as LSI : check coherency with DTS */ -#if (DT_INST_CLOCKS_CELL_BY_IDX(0, 1, bus) != STM32_SRC_LSI) -#warning CONFIG_STM32_LPTIM_CLOCK_LSI requires STM32_SRC_LSI defined as LPTIM domain clock -#endif /* STM32_SRC_LSI */ - -#elif (CONFIG_STM32_LPTIM_CLOCK_LSE) - -/* Kconfig defines the clock source as LSE : check coherency with DTS */ -#if (DT_INST_CLOCKS_CELL_BY_IDX(0, 1, bus) != STM32_SRC_LSE) -#warning CONFIG_STM32_LPTIM_CLOCK_LSE requires STM32_SRC_LSE defined as LPTIM domain clock -#endif /* STM32_SRC_LSE */ - -#endif /* CONFIG_STM32_LPTIM_CLOCK_LSI */ - /* Minimum nb of clock cycles to have to set autoreload register correctly */ #define LPTIM_GUARD_VALUE 2