From 1acd2486b873aa85e4ffb3cfff7ae3f7af63d042 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Thu, 10 Jul 2014 20:10:17 +0900 Subject: [PATCH] input: gpio_keys: Add IRQF_NO_SUSPEND flag to wake-up from freeze state This patch add IRQF_NO_SUSPEND flag before requesting interrupt handler if button->wakeup is true. If ther interrupt of gpio-keys hasn't included IRQF_NO_SUSPEND, wouldn't wake-up from freeze state when pressing button. Signed-off-by: Chanwoo Choi --- 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 b29ca65..0b8ae51 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -502,6 +502,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", -- 2.7.4