Skip to contentSkip to conversation

soc: qcom: smp2p: Add enable_irq_wake to SMP2P IRQ

PATCH In review Deepak Kumar Singh 2 participants 2 messages Mar 18, 2021 – Mar 23, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: qcom: smp2p: Add enable_irq_wake to SMP2P IRQ

SMP2P interrupts are expected to wake the processor from suspend. Use enable_irq_wake to mark it wakeup capable from suspend.

---
 drivers/soc/qcom/smp2p.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/qcom/smp2p.c +1 -0
index 2df4883..df47ee6 100644
@@ -538,6 +538,7 @@ static int qcom_smp2p_probe(struct platform_device *pdev)
 		goto unwind_interfaces;
 	}
 
+	enable_irq_wake(irq);
 
 	return 0;
 
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#1 lore raw

Quoting Deepak Kumar Singh (2021-03-18 11:37:04)

Quoted 14 lines

SMP2P interrupts are expected to wake the processor from suspend. Use enable_irq_wake to mark it wakeup capable from suspend.

---
 drivers/soc/qcom/smp2p.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/qcom/smp2p.c +0 -0
index 2df4883..df47ee6 100644

drivers/soc/qcom/smp2p.c static int qcom_smp2p_probe(struct platform_device *pdev) · line 542

Quoted 5 lines
drivers/soc/qcom/smp2p.c +1 -0
@@ -538,6 +538,7 @@ static int qcom_smp2p_probe(struct platform_device *pdev)
                goto unwind_interfaces;
        }
 
+       enable_irq_wake(irq);
 

Can this use device_init_wakeup() and dev_pm_set_wake_irq() instead? I think that will help us recognize that this irq woke up the CPU and allow userspace to indicate that it doesn't want to get this wakeup for some reason.

Quoted 2 lines
drivers/soc/qcom/smp2p.c +0 -0
        return 0;