diff options
| author | Jonas Aaberg <jonas.aberg@stericsson.com> | 2011-10-21 07:48:23 +0200 |
|---|---|---|
| committer | Jonas ABERG <jonas.aberg@stericsson.com> | 2011-10-27 15:19:01 +0200 |
| commit | 2b40945a7587d605604ec488fcec90f98660fa25 (patch) | |
| tree | c33de9f9362b180e00d9514a4384e8c9addff295 /drivers/input | |
| parent | 407405cb5bbb2159f16bc56468ddbf9b58278a18 (diff) | |
input: keyboard: nomadik-ske: Do not always enable on suspend
The resume hook did always enable the ske driver on resume.
ST-Ericsson Linux next: -
ST-Ericsson ID: 369127
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I613c0d0b0d626c77a422eaa65e3060dcc866ed56
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34793
Reviewed-by: QABUILD
Reviewed-by: Bengt JONSSON <bengt.g.jonsson@stericsson.com>
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/keyboard/nomadik-ske-keypad.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index 48561a9ad8a..ee0e29dab9c 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c @@ -66,6 +66,7 @@ * @keymap: matrix scan code table for keycodes * @clk: clock structure pointer * @enable: flag to enable the driver event + * @enable_on_resume: set if keypad should be enabled on resume * @regulator: pointer to the regulator used for ske kyepad * @gpio_input_irq: array for gpio irqs * @key_pressed: hold the key state @@ -88,6 +89,7 @@ struct ske_keypad { struct clk *clk; spinlock_t ske_keypad_lock; bool enable; + bool enable_on_resume; struct regulator *regulator; int gpio_input_irq[SKE_KPD_MAX_ROWS]; int key_pressed; @@ -789,6 +791,9 @@ static int ske_keypad_suspend(struct device *dev) cancel_delayed_work_sync(&keypad->work); cancel_delayed_work_sync(&keypad->scan_work); disable_irq(irq); + + keypad->enable_on_resume = keypad->enable; + if (keypad->enable) { ske_mode_enable(keypad, false); keypad->enable = false; @@ -807,7 +812,7 @@ static int ske_keypad_resume(struct device *dev) if (device_may_wakeup(dev)) disable_irq_wake(irq); else { - if (!keypad->enable) { + if (keypad->enable_on_resume) { keypad->enable = true; ske_mode_enable(keypad, true); } |
