timer: nxp: Update OS-Timer to use wakeup-source flag

Enable the OS Timer to be a wakeup source only if
configured through device tree property.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This commit is contained in:
Mahesh Mahadevan 2022-10-21 12:51:07 -05:00 committed by Carles Cufí
commit d13ffceb62

View file

@ -123,7 +123,9 @@ static int sys_clock_driver_init(const struct device *dev)
base = (OSTIMER_Type *)DT_INST_REG_ADDR(0);
if (DT_INST_PROP(0, wakeup_source)) {
EnableDeepSleepIRQ(DT_INST_IRQN(0));
}
/* Initialize the OS timer, setting clock configuration. */
OSTIMER_Init(base);