[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30052021.2q1IqLHYpU@dtor-glaptop>
Date: Wed, 17 Sep 2014 13:05:33 -0700
From: Dmitry Torokhov <dtor@...gle.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Eric Caruso <ejcaruso@...gle.com>, rjw@...ysocki.net,
linux-kernel@...r.kernel.org, Benson Leung <bleung@...gle.com>
Subject: Re: irq mask swapping during suspend/resume
Hi Thomas,
On Wednesday, September 17, 2014 12:05:42 PM Thomas Gleixner wrote:
> 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);
The desire is to avoid doing it in [every] driver but rather have it done
centrally by device/PM core. It does not have to be irq_desc though,
maybe you can suggest a better place for it (aside of the individual driver
code that is)?
Thanks,
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists