Skip to content

Commit a13c810

Browse files
asmellbycfriedt
authored andcommitted
drivers: timer: silabs_sleeptimer: Use chosen node
Use the `silabs,sleeptimer` chosen node instead of a devicetree compatible to select the devicetree node for the RTC. Signed-off-by: Aksel Skauge Mellbye <[email protected]>
1 parent a8b5ab1 commit a13c810

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/timer/Kconfig.silabs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Copyright (c) 2024 Silicon Laboratories Inc.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
DT_CHOSEN_SILABS_SLEEPTIMER := silabs,sleeptimer
5+
46
config SILABS_SLEEPTIMER_TIMER
57
bool "Silabs Sleeptimer system clock driver"
68
depends on SOC_FAMILY_SILABS_S2 || SOC_FAMILY_SILABS_SIWX91X
7-
depends on DT_HAS_SILABS_GECKO_STIMER_ENABLED
9+
depends on $(dt_chosen_enabled,$(DT_CHOSEN_SILABS_SLEEPTIMER))
810
select SILABS_SISDK_SLEEPTIMER
911
select TICKLESS_CAPABLE
1012
select TIMER_READS_ITS_FREQUENCY_AT_RUNTIME

drivers/timer/silabs_sleeptimer_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ LOG_MODULE_REGISTER(silabs_sleeptimer_timer);
2222
/* Maximum time interval between timer interrupts (in hw_cycles) */
2323
#define MAX_TIMEOUT_CYC (UINT32_MAX >> 1)
2424

25-
#define DT_RTC DT_COMPAT_GET_ANY_STATUS_OKAY(silabs_gecko_stimer)
25+
#define DT_RTC DT_CHOSEN(silabs_sleeptimer)
2626

2727
/* Ensure interrupt names don't expand to register interface struct pointers */
2828
#undef RTCC

0 commit comments

Comments
 (0)