From b72b99f49a1da8262b106354f681b30446dc48c3 Mon Sep 17 00:00:00 2001 From: Mahesh Mahadevan Date: Thu, 27 Apr 2023 11:50:21 -0500 Subject: [PATCH] drivers: timer: nxp: Conditionally compile the wakeup source The function to enable wakeup from deep sleep modes is not available on all SoC's. Hence compile this only when the wakeup_source property is enabled. Signed-off-by: Mahesh Mahadevan --- drivers/timer/mcux_os_timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/timer/mcux_os_timer.c b/drivers/timer/mcux_os_timer.c index b20ba462727..18dcb9e5fd2 100644 --- a/drivers/timer/mcux_os_timer.c +++ b/drivers/timer/mcux_os_timer.c @@ -122,9 +122,9 @@ static int sys_clock_driver_init(void) base = (OSTIMER_Type *)DT_INST_REG_ADDR(0); - if (DT_INST_PROP(0, wakeup_source)) { - EnableDeepSleepIRQ(DT_INST_IRQN(0)); - } +#if (DT_INST_PROP(0, wakeup_source)) + EnableDeepSleepIRQ(DT_INST_IRQN(0)); +#endif /* Initialize the OS timer, setting clock configuration. */ OSTIMER_Init(base);