Thread (34 messages) 34 messages, 6 authors, 2020-08-27

Re: [PATCH v4 3/7] genirq: Introduce irq_suspend_one() and irq_resume_one() callbacks

From: Thomas Gleixner <hidden>
Date: 2020-08-18 14:40:55
Also in: linux-arm-msm, lkml

Maulik,

On Tue, Aug 18 2020 at 10:05, Maulik Shah wrote:
On 8/14/2020 4:28 AM, Doug Anderson wrote:
quoted
On Thu, Aug 13, 2020 at 3:09 PM Thomas Gleixner [off-list ref] wrote:
+               if (chip->flags & IRQCHIP_UNMASK_WAKEUP_ON_SUSPEND)
+                       unmask_irq(desc);

I tried this patch and it didnot work as is.

Calling unmask_irq() only invoke's chip's .irq_unmask callback but the 
underlying irq_chip have .irq_enable also present.

Replacing the call with irq_enable() internally takes care of either 
invoking chip's .irq_enable (if its present) else it invokes unmask_irq().

+
+               if (chip->flags & IRQCHIP_UNMASK_WAKEUP_ON_SUSPEND)
+                       irq_enable(desc);

probably IRQCHIP_UNMASK_WAKEUP_ON_SUSPEND should also be renamed to 
IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND.
Makes sense and also works when the interrupt is already enabled.

Thanks,

        tglx


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help