@@ -345,9 +345,6 @@ static void gpio_keys_gpio_work_func(struct work_struct *work)
container_of(work, struct gpio_button_data, work);
gpio_keys_gpio_report_event(bdata);
-
- if (bdata->button->wakeup)
- pm_relax(bdata->input->dev.parent);
}
static void gpio_keys_gpio_timer(unsigned long _data)
@@ -364,7 +361,7 @@ static irqreturn_t gpio_keys_gpio_isr(int irq, void *dev_id)
BUG_ON(irq != bdata->irq);
if (bdata->button->wakeup)
- pm_stay_awake(bdata->input->dev.parent);
+ pm_wakeup_event(bdata->input->dev.parent, 1000);
if (bdata->timer_debounce)
mod_timer(&bdata->timer,
jiffies + msecs_to_jiffies(bdata->timer_debounce));
@@ -402,7 +399,7 @@ static irqreturn_t gpio_keys_irq_isr(int irq, void *dev_id)
if (!bdata->key_pressed) {
if (bdata->button->wakeup)
- pm_wakeup_event(bdata->input->dev.parent, 0);
+ pm_wakeup_event(bdata->input->dev.parent, 1000);
input_event(input, EV_KEY, button->code, 1);
input_sync(input);
@@ -41,7 +41,7 @@ static irqreturn_t powerbutton_irq(int irq, void *_pwr)
err = twl_i2c_read_u8(TWL_MODULE_PM_MASTER, &value, STS_HW_CONDITIONS);
if (!err) {
- pm_wakeup_event(pwr->dev.parent, 0);
+ pm_wakeup_event(pwr->dev.parent, 1000);
input_report_key(pwr, KEY_POWER, value & PWR_PWRON_IRQ);
input_sync(pwr);
} else {