Maulik,
On Tue, Aug 18 2020 at 10:05, Maulik Shah wrote:
> On 8/14/2020 4:28 AM, Doug Anderson wrote:
>> On Thu, Aug 13, 2020 at 3:09 PM Thomas Gleixner <[email protected]> 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