lkml.org 
[lkml]   [2014]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: irq mask swapping during suspend/resume
On Tue, 16 Sep 2014, Eric Caruso wrote:
> We would like to be able to set different irq masks for triggers during
> normal operation and for waking up the system. For example, while a laptop
> is awake, closing the lid and opening the lid should both fire an
> interrupt, but when the system is asleep, we would like to stay asleep when
> closing the lid.
>
> We are thinking about stashing the irq mask used specifically for waking
> the system up in the irq_desc struct, and then swapping it during
> enable_irq_wake and disable_irq_wake calls. Devices that do not specify a
> different wake mask will use their normal trigger mask for both situations.
>
> Is this acceptable?

Not really. Why should irq_desc provide storage for random
configurations and bind them to some random system state?

What's wrong with calling

irq_set_type(irq, B);
enable_irq_wake(irq);

disable_irq_wake(irq);
irq_set_type(irq, A);

????

Thanks,

tglx


\
 
 \ /
  Last update: 2014-09-17 21:21    [W:0.077 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site