Thread (2 messages) flat view 2 messages, 2 authors, 2012-06-25
STALE5203d REVIEWED: 1 (0M)

1 review trailer.

[PATCH 2/4] input/nomadik-ske: suspend and resume support

From: Linus Walleij <hidden>
Date: 2012-06-17 14:18:01
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

From: Naveen Kumar Gaddipati <redacted>

Suspend and resume support for ske keypad by using disable or
enable of keypad.

Signed-off-by: Naveen Kumar Gaddipati <redacted>
Reviewed-by: Srinidhi Kasagar <redacted>
Signed-off-by: Linus Walleij <redacted>
---
 drivers/input/keyboard/nomadik-ske-keypad.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c
index 6857454..68c36a7 100644
--- a/drivers/input/keyboard/nomadik-ske-keypad.c
+++ b/drivers/input/keyboard/nomadik-ske-keypad.c
@@ -368,8 +368,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;
 }
@@ -382,8 +385,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;
 }
-- 
1.7.9.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help