lkml.org 
[lkml]   [2012]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] regmap: implement irq chip suspend/resume operations
On 07/30/2012 11:38 AM, Mark Brown wrote:
> On Mon, Jul 30, 2012 at 11:10:30AM -0600, Stephen Warren wrote:
>
>> hence exit sleep. If we are to port that code into the regmap-irq core,
>> it seems to make sense to have enable_base==wake_base, since the same
>> register truly is being used for both enable/wakeup-enable, just
>> time-multiplexed.
>
> This would mean that we have to go round every single driver that
> doesn't have physical wake support and add a setting for the wake
> registers (which seems pointless given that the core can just as well
> figure this out from the fact that it's not had any wake registers
> specified) and we then have to add special cases for this in the core
> code. This doesn't seem like great API design, it's not conveneint for
> either side of the interface and it's error prone.
>
>> Or, perhaps the IRQ core already disables all non-wake interrupts for
>> us, so the driver doesn't have to do this, and we can just drop that
>> code completely?
>
> IIRC it does actually do this, I'd need to check though.

It looks like the answer here is to set irq_chip flags
IRQCHIP_MASK_ON_SUSPEND and IRQCHIP_SKIP_SET_WAKE. Perhaps regmap-irq
should do this automatically if (!regmap_irq_chip.wake_base)?

For reference, these flags are implemented in
kernel/irq/pm.c:check_wakeup_irqs() and
kernel/irq/manage.c:set_irq_wake_real().


\
 
 \ /
  Last update: 2012-07-31 22:21    [W:0.060 / U:1.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site