Commit bd8a2d3d authored by Mahesh Mahadevan's avatar Mahesh Mahadevan Committed by Chris Friedt
Browse files

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: default avatarMahesh Mahadevan <mahesh.mahadevan@nxp.com>
parent 9cb38ecf
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -6,7 +6,9 @@
#include <zephyr/kernel.h>
#include <zephyr/pm/pm.h>
#include <fsl_clock.h>
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(standby))
#include <fsl_rtc.h>
#endif
#include <zephyr/init.h>
#include <zephyr/drivers/pinctrl.h>
#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)
				CLOCK_AttachClk(kLPOSC_to_OSTIMER_CLK);
				/* Clear the RTC wakeup bits */
				POWER_ClearWakeupStatus(DT_IRQN(DT_NODELABEL(rtc)));
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(standby))
				RTC_ClearStatusFlags(RTC, kRTC_WakeupFlag);
#endif
				NVIC_ClearPendingIRQ(DT_IRQN(DT_NODELABEL(rtc)));
				sys_clock_idle_exit();
				sys_clock_set_timeout(0, true);