summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorXinyu Chen <xinyu.chen@freescale.com>2012-03-16 15:07:12 +0800
committerXinyu Chen <xinyu.chen@freescale.com>2012-03-16 15:53:27 +0800
commit685c64cdce9aa04683bd52e66a7923ab425ca8ac (patch)
tree970ec85e4d04284f59c0ca6ac86b385b4911aaee /drivers/input
parent4b5cdefdbcb3eb0c01efc714e2b7fe6d8fb5ca21 (diff)
ENGR00176567 gpio_keys: Set the IRQF_NO_SUSPEND flag to wakeup button
We should not disabled GPIO irq when doing suspend. During suspend, kernel will call suspend_device_irq() to disable all the irqs (just set a disabled flag, no mask) On the another side, The handle_level_irq will check the irq's disable status to determin it should be handled or unmasked. If the GPIO interrupt happened just after the above suspend_device_irq(), we enters handle_leve_irq(), mask and ack the GPIO irq, then return directly without handle or unmask this irq because of it's disabled. That means the GPIO IMR bit is not set and we can not wake up by the GPIO key button. Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/gpio_keys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 4ed0ab563736..d2174f784735 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -421,7 +421,7 @@ static int __devinit gpio_keys_setup_key(struct platform_device *pdev,
* then to reume the other devcies
*/
if (button->wakeup)
- irqflags |= IRQF_EARLY_RESUME;
+ irqflags |= IRQF_NO_SUSPEND | IRQF_EARLY_RESUME;
error = request_any_context_irq(irq, gpio_keys_isr, irqflags, desc, bdata);
if (error < 0) {