diff options
author | Karl-Johan Perntz <karl-johan.perntz@stericsson.com> | 2011-11-08 10:37:22 +0100 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@linaro.org> | 2012-03-19 08:59:38 +0100 |
commit | 5e7b36a05debcf57fd9d421a50c2b41f250ded37 (patch) | |
tree | c7f02fe4ff83f933c1ee57764482402fe8eadff8 /drivers/input | |
parent | 26dc4fb5da3a9009ae1f4d71c49c6fe7fe2f7162 (diff) |
input:ske:Use gpio mode after resume to save power
Add delayed work to switch to gpio mode if no key action occurs after
resume. This will prevent the keypad from getting stuck in ske mode
that consumes more power than gpio mode.
ST-Ericsson Linux next: Not tested
ST-Ericsson ID: 372052
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I090a9067828a1f706f427f793f685ac298cf2a2e
Signed-off-by: Karl-Johan Perntz <karl-johan.perntz@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/36836
Reviewed-by: Naveen Kumar GADDIPATI <naveen.gaddipati@stericsson.com>
Reviewed-by: Naga RADHESH Y <naga.radheshy@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/nomadik-ske-keypad.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index 791c535a66f..7142ad9bf5f 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c @@ -816,6 +816,13 @@ static int ske_keypad_resume(struct device *dev) if (keypad->enable_on_resume) { keypad->enable = true; ske_mode_enable(keypad, true); + /* + * Schedule the work queue to change it to GPIO mode + * if there is no activity in SKE mode + */ + if (!keypad->key_pressed) + schedule_delayed_work(&keypad->work, + keypad->board->switch_delay); } enable_irq(irq); } |