linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input:gpio-key: set IRQF_NO_SUSPEND for wake capable key
@ 2015-09-17 16:06 Qipeng Zha
  2015-10-02 10:26 ` Linus Walleij
  0 siblings, 1 reply; 6+ messages in thread
From: Qipeng Zha @ 2015-09-17 16:06 UTC (permalink / raw)
  To: linux-input
  Cc: dmitry.torokhov, linus.walleij, qipeng.zha, Qi Zheng, Aubrey Li

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-09  5:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-17 16:06 [PATCH] input:gpio-key: set IRQF_NO_SUSPEND for wake capable key Qipeng Zha
2015-10-02 10:26 ` 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

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).