diff options
author | Varun Wadekar <vwadekar@nvidia.com> | 2010-12-19 17:46:07 +0530 |
---|---|---|
committer | Bharat Nihalani <bnihalani@nvidia.com> | 2010-12-20 06:08:23 -0800 |
commit | 0ddc54a60b12fb13fec7c5d8f9ff3f162c96818f (patch) | |
tree | 02baab311ec0b41f9734bafea2bca8ff3e7c49e5 /drivers/input | |
parent | 4b3bc69e2d349adb3cb2098d18d2c641235b1c57 (diff) |
input: gpio-keys: wake up display on resume
check if any of the buttons is specifid as 'wakeup', and send its
key code explicitly to the android layer while resuming so that
display wakes up eventually.
Bug 745149
Change-Id: Iad94efa0ed4a6a9ac054e7f72de3affa8762a037
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/13774
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 6069abe31e42..b80b5d8ac5bd 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -601,7 +601,10 @@ static int gpio_keys_resume(struct device *dev) struct gpio_keys_button *button = &pdata->buttons[i]; if (button->wakeup && device_may_wakeup(&pdev->dev)) { int irq = gpio_to_irq(button->gpio); + unsigned int type = button->type ?: EV_KEY; disable_irq_wake(irq); + input_event(ddata->input, type, button->code, 1); + input_sync(ddata->input); } gpio_keys_report_event(&ddata->data[i]); |