From 0ddc54a60b12fb13fec7c5d8f9ff3f162c96818f Mon Sep 17 00:00:00 2001 From: Varun Wadekar Date: Sun, 19 Dec 2010 17:46:07 +0530 Subject: 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 Reviewed-on: http://git-master/r/13774 Reviewed-by: Sachin Nikam Reviewed-by: Bharat Nihalani --- drivers/input/keyboard/gpio_keys.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/input') 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]); -- cgit v1.2.3