From: "Li, Aubrey" <aubrey.li@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] GPIO button wth wakeup attribute is supposed to wake the system up
Date: Thu, 10 Jul 2014 10:27:46 +0800 [thread overview]
Message-ID: <53BDFA22.2000409@linux.intel.com> (raw)
In-Reply-To: <4301161.i6ArOLmcsg@vostro.rjw.lan>
On 2014/7/9 20:45, Rafael J. Wysocki wrote:
> On Tuesday, July 08, 2014 05:54:35 PM Dmitry Torokhov wrote:
>> On Wed, Jul 09, 2014 at 02:59:33AM +0200, Rafael J. Wysocki wrote:
>>> On Tuesday, July 08, 2014 05:15:06 PM Dmitry Torokhov wrote:
>>>> On Wed, Jul 09, 2014 at 01:06:07AM +0200, Rafael J. Wysocki wrote:
>
> [cut]
>
>>>>
>>>> When device driver marks IRQ as a wakeup source I believe it is prepared
>>>> to handle it (or it would shut it off explicitly).
>>>
>>> I can agree with that.
>>>
>>> Are you suggesting that __disable_irq() should check irq_data for
>>> IRQD_WAKEUP_STATE and skip the IRQ (in the 'suspend' case) if that is set?
>>
>> Yes, something like that.
>
> OK
Many thanks to you both for the discussion.
>
> Aubrey, can you please check if the appended patch helps on the T100?
I verified this patch on T100, it works as expected, freeze can be waken
up by reverting my patch and applying this one.
Is this a final solution?
Thanks,
-Aubrey
>
> Rafael
>
> ---
> kernel/irq/manage.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Index: linux-pm/kernel/irq/manage.c
> ===================================================================
> --- linux-pm.orig/kernel/irq/manage.c
> +++ linux-pm/kernel/irq/manage.c
> @@ -385,7 +385,8 @@ setup_affinity(unsigned int irq, struct
> void __disable_irq(struct irq_desc *desc, unsigned int irq, bool suspend)
> {
> if (suspend) {
> - if (!desc->action || (desc->action->flags & IRQF_NO_SUSPEND))
> + if (!desc->action || (desc->action->flags & IRQF_NO_SUSPEND)
> + || irqd_has_set(&desc->irq_data, IRQD_WAKEUP_STATE))
> return;
> desc->istate |= IRQS_SUSPENDED;
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>
next prev parent reply other threads:[~2014-07-10 2:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 0:51 [PATCH] GPIO button wth wakeup attribute is supposed to wake the system up Li, Aubrey
2014-06-19 10:40 ` One Thousand Gnomes
2014-06-23 23:35 ` Li, Aubrey
2014-07-08 20:52 ` Rafael J. Wysocki
2014-07-08 20:45 ` Dmitry Torokhov
2014-07-08 21:06 ` Rafael J. Wysocki
2014-07-08 21:12 ` Dmitry Torokhov
2014-07-08 21:47 ` Rafael J. Wysocki
2014-07-08 22:11 ` Dmitry Torokhov
2014-07-08 23:06 ` Rafael J. Wysocki
2014-07-09 0:15 ` Dmitry Torokhov
2014-07-09 0:59 ` Rafael J. Wysocki
2014-07-09 0:54 ` Dmitry Torokhov
2014-07-09 12:45 ` Rafael J. Wysocki
2014-07-10 2:27 ` Li, Aubrey [this message]
2014-07-10 11:27 ` Rafael J. Wysocki
2014-07-10 21:37 ` [PATCH] PM / sleep / irq: Do not suspend wakeup interrupts Rafael J. Wysocki
2014-07-15 12:22 ` Alexander Stein
2014-07-15 12:50 ` Rafael J. Wysocki
2014-07-15 12:36 ` Alexander Stein
2014-07-16 0:45 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53BDFA22.2000409@linux.intel.com \
--to=aubrey.li@linux.intel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).