Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328504
b: refs/heads/master
c: 2fba26c
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Dmitry Torokhov committed Aug 22, 2012
1 parent 44e2508 commit 9402e8b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 219edc71784ff8a3537ffbe64baded61ce4048b9
refs/heads/master: 2fba26c6595e4c1c64a74dad30f71c09708ff59a
8 changes: 8 additions & 0 deletions trunk/drivers/input/keyboard/gpio_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ 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)
Expand All @@ -359,6 +362,8 @@ 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);
if (bdata->timer_debounce)
mod_timer(&bdata->timer,
jiffies + msecs_to_jiffies(bdata->timer_debounce));
Expand Down Expand Up @@ -395,6 +400,9 @@ static irqreturn_t gpio_keys_irq_isr(int irq, void *dev_id)
spin_lock_irqsave(&bdata->lock, flags);

if (!bdata->key_pressed) {
if (bdata->button->wakeup)
pm_wakeup_event(bdata->input->dev.parent, 0);

input_event(input, EV_KEY, button->code, 1);
input_sync(input);

Expand Down

0 comments on commit 9402e8b

Please sign in to comment.