linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Li, Aubrey" <aubrey.li@linux.intel.com>
To: dmitry.torokhov@gmail.com, sachin.kamat@linaro.org,
	linux-input@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: [patch]GPIO button is supposed to wake the system up if the wakeup attribute is set
Date: Thu, 10 Apr 2014 10:11:09 +0800	[thread overview]
Message-ID: <5345FDBD.9090908@linux.intel.com> (raw)

When the wakeup attribute is set, GPIO button is supposed to set
irqflag - IRQF_NO_SUSPEND to request irq. So when the system enters
the suspend sleep mode, the GPIO irq keeps enabled and is able to
wake the system up.

The affected/tested machines include Dell Venue 11 Pro and Asus T100TA.

Signed-off-by: Aubrey Li <aubrey.li@linux.intel.com>
---
 drivers/input/keyboard/gpio_keys.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 2db1324..40f3963 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -503,6 +503,9 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
 	if (!button->can_disable)
 		irqflags |= IRQF_SHARED;
 
+	if (button->wakeup)
+		irqflags |= IRQF_NO_SUSPEND;
+
 	error = request_any_context_irq(bdata->irq, isr, irqflags, desc, bdata);
 	if (error < 0) {
 		dev_err(dev, "Unable to claim irq %d; error %d\n",
-- 
1.7.10.4

             reply	other threads:[~2014-04-10  2:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10  2:11 Li, Aubrey [this message]
2014-04-10 10:48 ` [patch]GPIO button is supposed to wake the system up if the wakeup attribute is set One Thousand Gnomes
2014-04-14 15:42   ` Li, Aubrey
2014-04-15 12:38     ` Laxman Dewangan
2014-04-15 16:18       ` Li, Aubrey
2014-04-16 12:35         ` Laxman Dewangan
2014-04-17 16:42           ` Li, Aubrey
2014-04-17 17:18             ` Laxman Dewangan
2014-04-17 17:48               ` Li, Aubrey
2014-04-17 23:54             ` Dmitry Torokhov
2014-04-18  5:23               ` Li, Aubrey
2014-04-20 19:39                 ` Dmitry Torokhov
2014-04-21  1:34                   ` Li, Aubrey
2014-04-21 15:55                     ` Dmitry Torokhov
2014-04-21 16:16                       ` Li, Aubrey
2014-04-21 16:26                         ` Dmitry Torokhov

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=5345FDBD.9090908@linux.intel.com \
    --to=aubrey.li@linux.intel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sachin.kamat@linaro.org \
    /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).