linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qipeng Zha <qipeng.zha@intel.com>
To: linux-input@vger.kernel.org
Cc: dmitry.torokhov@gmail.com, linus.walleij@linaro.org,
	qipeng.zha@intel.com, Qi Zheng <qi.zheng@intel.com>,
	Aubrey Li <aubrey.li@intel.com>
Subject: [PATCH] input:gpio-key: set IRQF_NO_SUSPEND for wake capable key
Date: Fri, 18 Sep 2015 00:06:59 +0800	[thread overview]
Message-ID: <1442506019-13687-1-git-send-email-qipeng.zha@intel.com> (raw)

When wakeup attribute is set, GPIO key is supposed to wake up
the system from system sleep state, So set IRQF_NO_SUSPEND
flag to keep IRQ enabled during suspend.

Signed-off-by: Qi Zheng <qi.zheng@intel.com>
Signed-off-by: Aubrey Li <aubrey.li@intel.com>
Signed-off-by: Qipeng Zha <qipeng.zha@intel.com>
---
 drivers/input/keyboard/gpio_keys.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index ddf4045..9744ad9 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -528,6 +528,8 @@ 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 = devm_request_any_context_irq(&pdev->dev, bdata->irq,
 					     isr, irqflags, desc, bdata);
-- 
1.8.3.2


             reply	other threads:[~2015-09-17  8:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17 16:06 Qipeng Zha [this message]
2015-10-02 10:26 ` [PATCH] input:gpio-key: set IRQF_NO_SUSPEND for wake capable key Linus Walleij
2015-10-02 17:41   ` Dmitry Torokhov
2015-10-09  2:14     ` Zheng, Qi
2015-10-09  2:47       ` Li, Aubrey
2015-10-09  5:36         ` Zheng, Qi

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=1442506019-13687-1-git-send-email-qipeng.zha@intel.com \
    --to=qipeng.zha@intel.com \
    --cc=aubrey.li@intel.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=qi.zheng@intel.com \
    /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).