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

Maulik Shah
2020-08-13T07:18:38Z

Hi,

Sure, i will take care these comments in v5.

Thanks,
Maulik

On 8/12/2020 1:39 AM, Doug Anderson wrote:
> Hi,
>
> On Mon, Aug 10, 2020 at 4:21 AM Maulik Shah <mkshah@codeaurora.org> wrote:
>> From: Douglas Anderson <dianders@chromium.org>
>>
>> The "struct irq_chip" has two callbacks in it: irq_suspend() and
>> irq_resume(). These two callbacks are interesting because sometimes
>> an irq chip needs to know about suspend/resume, but they are a bit
>> awkward because:
>> 1. They are called once for the whole irq_chip, not once per IRQ.
>> It's passed data for one of the IRQs enabled on that chip. That
>> means it's up to the irq_chip driver to aggregate.
>> 2. They are only called if you're using "generic-chip", which not
>> everyone is.
>> 3. The implementation uses syscore ops, which apparently have problems
>> with s2idle.
>>
>> Probably the old irq_suspend() and irq_resume() callbacks should be
>> deprecated.
>>
>> Let's introcuce a nicer API that works for all irq_chip devices. This
> You grabbed my patch (which is great, thanks!) but forgot to address
> Stephen's early feedback from <https://crrev.com/c/2321123>.
> Specifically:
>
> s/introcuce/introduce
>
>
>> --- a/include/linux/irq.h
>> +++ b/include/linux/irq.h
>> @@ -468,10 +468,16 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
>> * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips
>> * @irq_cpu_online: configure an interrupt source for a secondary CPU
>> * @irq_cpu_offline: un-configure an interrupt source for a secondary CPU
>> + * @irq_suspend_one: called on an every irq to suspend it; called even if
>> + * this IRQ is configured for wakeup
> s/called on an/called on
>
>> + * @irq_resume_one: called on an every irq to resume it; called even if
>> + * this IRQ is configured for wakeup
> s/called on an/called on
>
>
> -Doug

--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation