diff --git a/drivers/interrupt_controller/intc_nxp_pint.c b/drivers/interrupt_controller/intc_nxp_pint.c index f794a0a2979..72b6916e01b 100644 --- a/drivers/interrupt_controller/intc_nxp_pint.c +++ b/drivers/interrupt_controller/intc_nxp_pint.c @@ -10,6 +10,7 @@ #include #include #include +#include #include @@ -180,6 +181,24 @@ static void nxp_pint_isr(uint8_t *slot) } } +static int intc_nxp_pm_action(const struct device *dev, enum pm_device_action action) +{ + switch (action) { + case PM_DEVICE_ACTION_RESUME: + break; + case PM_DEVICE_ACTION_SUSPEND: + break; + case PM_DEVICE_ACTION_TURN_OFF: + break; + case PM_DEVICE_ACTION_TURN_ON: + PINT_Init(pint_base); + break; + default: + return -ENOTSUP; + } + + return 0; +} /* Defines PINT IRQ handler for a given irq index */ #define NXP_PINT_IRQ(idx, node_id) \ @@ -200,10 +219,12 @@ static int intc_nxp_pint_init(const struct device *dev) * parameter. */ LISTIFY(8, NXP_PINT_IRQ, (;), DT_INST(0, DT_DRV_COMPAT)); - PINT_Init(pint_base); memset(pin_pint_id, NO_PINT_ID, ARRAY_SIZE(pin_pint_id)); - return 0; + + return pm_device_driver_init(dev, intc_nxp_pm_action); } -DEVICE_DT_INST_DEFINE(0, intc_nxp_pint_init, NULL, NULL, NULL, +PM_DEVICE_DT_INST_DEFINE(0, intc_nxp_pm_action); + +DEVICE_DT_INST_DEFINE(0, intc_nxp_pint_init, PM_DEVICE_DT_INST_GET(0), NULL, NULL, PRE_KERNEL_1, CONFIG_INTC_INIT_PRIORITY, NULL); diff --git a/dts/arm/nxp/nxp_rw6xx_common.dtsi b/dts/arm/nxp/nxp_rw6xx_common.dtsi index 783f9bafa7a..d4849c40e8a 100644 --- a/dts/arm/nxp/nxp_rw6xx_common.dtsi +++ b/dts/arm/nxp/nxp_rw6xx_common.dtsi @@ -328,6 +328,7 @@ <35 2>, <36 2>, <37 2>, <38 2>; num-lines = <8>; num-inputs = <64>; + power-domains = <&power_mode3_domain>; }; imu: nxp_wifi {