[PATCH] mailbox: imx: Add support for identifying SCU wakeup source from sysfs
Peng Fan (OSS)
peng.fan at oss.nxp.com
Tue Jul 11 20:47:55 PDT 2023
From: Peng Fan <peng.fan at nxp.com>
Record SCU wakeup interrupt in /sys/power/pm_wakeup_irq by using
pm_system_wakeup_irq
Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan at nxp.com>
Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
drivers/mailbox/imx-mailbox.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
index 20f2ec880ad6..0719b9cfba97 100644
--- a/drivers/mailbox/imx-mailbox.c
+++ b/drivers/mailbox/imx-mailbox.c
@@ -531,8 +531,12 @@ static irqreturn_t imx_mu_isr(int irq, void *p)
return IRQ_NONE;
}
- if (priv->suspend)
- pm_system_wakeup();
+ if (priv->suspend) {
+ if (priv->dcfg->type & IMX_MU_V2_IRQ)
+ pm_system_wakeup();
+ else
+ pm_system_irq_wakeup(priv->irq[0]);
+ }
return IRQ_HANDLED;
}
--
2.37.1
More information about the linux-arm-kernel
mailing list