lkml.org 
[lkml]   [2020]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v5 3/6] genirq/PM: Introduce IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND flag
Date
On Tue, Aug 25 2020 at 03:12, Stephen Boyd wrote:
> Quoting Maulik Shah (2020-08-22 09:16:58)
>> diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
>> index c6c7e18..2cc800b 100644
>> --- a/kernel/irq/pm.c
>> +++ b/kernel/irq/pm.c
>> @@ -69,12 +69,17 @@ void irq_pm_remove_action(struct irq_desc *desc, struct irqaction *action)
>>
>> static bool suspend_device_irq(struct irq_desc *desc)
>> {
>> + unsigned long chipflags = irq_desc_get_chip(desc)->flags;
>> +
>> if (!desc->action || irq_desc_is_chained(desc) ||
>> desc->no_suspend_depth)
>> return false;
>>
>> if (irqd_is_wakeup_set(&desc->irq_data)) {
>> irqd_set(&desc->irq_data, IRQD_WAKEUP_ARMED);
>> +
>> + if (chipflags & IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND)
>> + irq_enable(desc);
>
> Where is the corresponding change to resume_irq()? Don't we need to
> disable an irq if it was disabled on suspend and forcibly enabled here?

That part was below the POC code I provided in the fine print:

"plus the counterpart in the resume path. This also ensures that state is
consistent."

Who reads the fine print? :)

\
 
 \ /
  Last update: 2020-08-25 23:39    [W:0.216 / U:5.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site