Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346935
b: refs/heads/master
c: 1eee4af
h: refs/heads/master
i:
  346933: 43b2184
  346931: 6c6aff8
  346927: 687b20e
v: v3
  • Loading branch information
Deepak Sikri authored and Dmitry Torokhov committed Nov 10, 2012
1 parent 4a9a492 commit f9d0331
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d852f9597359babcc3f6b328cefc151ab6995d00
refs/heads/master: 1eee4af30e9261114e6e4e3576f130780124d7be
11 changes: 8 additions & 3 deletions trunk/drivers/input/keyboard/spear-keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ struct spear_kbd {
struct clk *clk;
unsigned int irq;
unsigned int mode;
unsigned int suspended_rate;
unsigned short last_key;
unsigned short keycodes[NUM_ROWS * NUM_COLS];
bool rep;
unsigned int suspended_rate;
bool irq_wake_enabled;
u32 mode_ctl_reg;
};

Expand Down Expand Up @@ -333,7 +334,8 @@ static int spear_kbd_suspend(struct device *dev)
mode_ctl_reg = readl_relaxed(kbd->io_base + MODE_CTL_REG);

if (device_may_wakeup(&pdev->dev)) {
enable_irq_wake(kbd->irq);
if (!enable_irq_wake(kbd->irq))
kbd->irq_wake_enabled = true;

/*
* reprogram the keyboard operating frequency as on some
Expand Down Expand Up @@ -379,7 +381,10 @@ static int spear_kbd_resume(struct device *dev)
mutex_lock(&input_dev->mutex);

if (device_may_wakeup(&pdev->dev)) {
disable_irq_wake(kbd->irq);
if (kbd->irq_wake_enabled) {
kbd->irq_wake_enabled = false;
disable_irq_wake(kbd->irq);
}
} else {
if (input_dev->users)
clk_enable(kbd->clk);
Expand Down

0 comments on commit f9d0331

Please sign in to comment.