[PATCH] mailbox: imx: Add support for identifying SCU wakeup source from sysfs
From: Peng Fan (OSS)
Date: Tue Jul 11 2023 - 23:43:36 EST
From: Peng Fan <peng.fan@xxxxxxx>
Record SCU wakeup interrupt in /sys/power/pm_wakeup_irq by using
pm_system_wakeup_irq
Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@xxxxxxx>
Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
---
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