diff options
author | Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com> | 2011-01-31 19:01:22 +0530 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 15:14:37 +0200 |
commit | e44be4be7359644852d227c51bb61be831f68a8c (patch) | |
tree | 1acde7edb320a1cfaf29965101c204c46f8d831e /drivers | |
parent | e0717c4e7c78a51dae08a66006190f3040f8fa64 (diff) |
input:ske: Suspend and resume support for ske keypad
Suspend and resume support for ske keypad by
using disable or enable of keypad.
ST-Ericsson Id: ER 320090
Change-Id: I5ae732be0e2f6074048fa6351a9f7b9ee33f380f
Signed-off-by: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/13977
Reviewed-by: QATOOLS
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/keyboard/nomadik-ske-keypad.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index 13cf2d45ebb..1286007ac23 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c @@ -392,7 +392,8 @@ static int __devinit ske_keypad_probe(struct platform_device *pdev) goto out_free_irq; } - device_init_wakeup(&pdev->dev, true); + if (plat->wakeup_enable) + device_init_wakeup(&pdev->dev, true); platform_set_drvdata(pdev, keypad); @@ -449,8 +450,11 @@ static int ske_keypad_suspend(struct device *dev) if (device_may_wakeup(dev)) enable_irq_wake(irq); - else + else { + disable_irq(keypad->irq); ske_keypad_set_bits(keypad, SKE_IMSC, ~SKE_KPIMA, 0x0); + clk_disable(keypad->clk); + } return 0; } @@ -463,8 +467,11 @@ static int ske_keypad_resume(struct device *dev) if (device_may_wakeup(dev)) disable_irq_wake(irq); - else - ske_keypad_set_bits(keypad, SKE_IMSC, 0x0, SKE_KPIMA); + else { + clk_enable(keypad->clk); + enable_irq(keypad->irq); + ske_keypad_chip_init(keypad); + } return 0; } |