summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorNaveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>2011-01-31 19:01:22 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:03:28 +0200
commit8a428a3a76531f9a9b1ad6b26a24e61f506f1915 (patch)
treeb4cfa89d4023ac7a7930b4d5f13c64cf12c8490a /drivers/input/keyboard
parentc7e0614d666c0aa3a3320b652d47e94e8f44b2e4 (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/input/keyboard')
-rw-r--r--drivers/input/keyboard/nomadik-ske-keypad.c15
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 9bb7f164fb6..076fb3a2fdf 100644
--- a/drivers/input/keyboard/nomadik-ske-keypad.c
+++ b/drivers/input/keyboard/nomadik-ske-keypad.c
@@ -393,7 +393,8 @@ static int __init 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);
@@ -450,8 +451,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;
}
@@ -464,8 +468,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;
}