From: NeilBrown Date: Fri, 29 Jun 2012 10:18:30 +0000 (+1000) Subject: Input: gpio_keys: report a wakeup_event for a button press on a wake_up button. X-Git-Tag: sz_154~47 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b62b693f788dffed0766e7b61632d45e1b592478;p=pandora-kernel.git Input: gpio_keys: report a wakeup_event for a button press on a wake_up button. In order to avoid races with suspend, a wakeup event must register as such by calling pm_wakeup_event() or pm_stay_awake. This will ensure that the current suspend cycle aborts. When the user-space visible event is created in the interrupt handled (gpio_keys_irq_isr), and simple pm_wakeup_event() with no delay is sufficient as suspend will synchronise with all interrupt delivery. When the user-space visible event is create later (gpio_keys_gpio_isr), we need to bracket the event with pm_stay_awake() and pm_relax(). Signed-off-by: NeilBrown Conflicts: drivers/input/keyboard/gpio_keys.c --- Reading git-diff-tree failed