]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00277955-1 keyboard: gpio_keys: support wakeup system from freeze mode
authorAnson Huang <b20788@freescale.com>
Wed, 4 Sep 2013 01:43:48 +0000 (21:43 -0400)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:17:32 +0000 (21:17 -0600)
To support wakeup system from freeze mode of suspend,
device's irq can NOT be disabled during devices suspend,
so we need to add IRQF_NO_SUSPEND flag to irqflags.

Signed-off-by: Anson Huang <b20788@freescale.com>
[shawn.guo: cherry-pick commit 1eb907e9e5d9 from imx_3.10.y]
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
drivers/input/keyboard/gpio_keys.c

index 2db13246eb8e0ba360a9cddc8c7d82b842f62ff8..7135631d1e04bfedf5bdf40a7d81ccbae5cb3a8f 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright 2005 Phil Blundell
  * Copyright 2010, 2011 David Jander <david@protonic.nl>
+ * Copyright (C) 2013 Freescale Semiconductor, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -473,6 +474,8 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
 
                isr = gpio_keys_gpio_isr;
                irqflags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING;
+               if (bdata->button->wakeup)
+                       irqflags |= IRQF_NO_SUSPEND;
 
        } else {
                if (!button->irq) {