All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] OMAP3: PM: Add suspend-resume to TWL4030 keypad
@ 2009-11-09 16:40 Sanjeev Premi
  0 siblings, 0 replies; only message in thread
From: Sanjeev Premi @ 2009-11-09 16:40 UTC (permalink / raw)
  To: linux-omap; +Cc: Sanjeev Premi

This patch adds suspend, resume functions to the
TWL4030 keypad driver when CONFIG_PM is selected.

Signed-off-by: Sanjeev Premi <premi@ti.com>
---
 drivers/input/keyboard/twl4030_keypad.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c
index 9a2977c..01f2ddd 100644
--- a/drivers/input/keyboard/twl4030_keypad.c
+++ b/drivers/input/keyboard/twl4030_keypad.c
@@ -446,6 +446,22 @@ static int __devexit twl4030_kp_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_PM
+static int twl4030_kp_suspend(struct platform_device *pdev, pm_message_t state)
+{
+	return 0;
+}
+
+static int twl4030_kp_resume(struct platform_device *pdev)
+{
+	return 0;
+}
+#else
+#define twl4030_kp_suspend	NULL
+#define twl4030_kp_resume	NULL
+#endif
+
+
 /*
  * NOTE: twl4030 are multi-function devices connected via I2C.
  * So this device is a child of an I2C parent, thus it needs to
@@ -455,6 +471,8 @@ static int __devexit twl4030_kp_remove(struct platform_device *pdev)
 static struct platform_driver twl4030_kp_driver = {
 	.probe		= twl4030_kp_probe,
 	.remove		= __devexit_p(twl4030_kp_remove),
+	.suspend        = twl4030_kp_suspend,
+	.resume         = twl4030_kp_resume,
 	.driver		= {
 		.name	= "twl4030_keypad",
 		.owner	= THIS_MODULE,
-- 
1.6.2.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-09 16:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-09 16:40 [PATCH 1/4] OMAP3: PM: Add suspend-resume to TWL4030 keypad Sanjeev Premi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.