Skip to content

Commit

Permalink
drivers: timer: stm32: Clean up related to STM32_LPTIM_CLOCK
Browse files Browse the repository at this point in the history
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 <erwan.gouriou@st.com>
  • Loading branch information
erwango authored and fabiobaltieri committed Jan 16, 2024
1 parent 19cc477 commit 0a2876d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion drivers/timer/Kconfig.stm32_lptim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 0 additions & 16 deletions drivers/timer/stm32_lptim_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0a2876d

Please sign in to comment.