Skip to content

Commit bd8a2d3

Browse files
mmahadevan108cfriedt
authored andcommitted
soc: rw: Fix build failures when include RTC header files
Include the RTC header files only for when Standby power mode is enabled. Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent 9cb38ec commit bd8a2d3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

soc/nxp/rw/power.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
#include <zephyr/kernel.h>
77
#include <zephyr/pm/pm.h>
88
#include <fsl_clock.h>
9+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(standby))
910
#include <fsl_rtc.h>
11+
#endif
1012
#include <zephyr/init.h>
1113
#include <zephyr/drivers/pinctrl.h>
1214
#if CONFIG_GPIO && (DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(pin0)) || \
@@ -220,7 +222,9 @@ __weak void pm_state_set(enum pm_state state, uint8_t substate_id)
220222
CLOCK_AttachClk(kLPOSC_to_OSTIMER_CLK);
221223
/* Clear the RTC wakeup bits */
222224
POWER_ClearWakeupStatus(DT_IRQN(DT_NODELABEL(rtc)));
225+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(standby))
223226
RTC_ClearStatusFlags(RTC, kRTC_WakeupFlag);
227+
#endif
224228
NVIC_ClearPendingIRQ(DT_IRQN(DT_NODELABEL(rtc)));
225229
sys_clock_idle_exit();
226230
sys_clock_set_timeout(0, true);

0 commit comments

Comments
 (0)