aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-07-30 01:25:51 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-08-22 01:29:48 -0400
commit112b51cfa21714d001e5b3e3f7c1f13146906a5d (patch)
treeb2f96402abbe2a3e219e70a89c25a78af4d0d873 /drivers/input
parent2fba26c6595e4c1c64a74dad30f71c09708ff59a (diff)
Input: twl4030-pwrbutton - report a wakeup_event on button press
As the power button causes a wake from suspend, we need to register the event with the pm sustem to avoid racing with suspend. As the input event is reported in the interrupt handler, as simple pm_wakeup_event() is sufficient. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/twl4030-pwrbutton.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
index 38e4b507b94c..b3dd96d6448b 100644
--- a/drivers/input/misc/twl4030-pwrbutton.c
+++ b/drivers/input/misc/twl4030-pwrbutton.c
@@ -42,6 +42,7 @@ static irqreturn_t powerbutton_irq(int irq, void *_pwr)
42 err = twl_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &value, 42 err = twl_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &value,
43 STS_HW_CONDITIONS); 43 STS_HW_CONDITIONS);
44 if (!err) { 44 if (!err) {
45 pm_wakeup_event(pwr->dev.parent, 0);
45 input_report_key(pwr, KEY_POWER, value & PWR_PWRON_IRQ); 46 input_report_key(pwr, KEY_POWER, value & PWR_PWRON_IRQ);
46 input_sync(pwr); 47 input_sync(pwr);
47 } else { 48 } else {