lkml.org 
[lkml]   [2015]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2] Input: cros_ec_keyb - Clear keyboard state only when it hasn't been a wake source
Date
As the comment right before explains, the keyboard state is to be
cleared only if the EC wasn't a wakeup source in the last suspend.

Without this commit, there's an unneeded delay when resuming from
suspend and we also lose the key that was pressed while suspended.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---

Sorry, v1 included an unintended change.

Thanks,

Tomeu

---
drivers/input/keyboard/cros_ec_keyb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index 769f8f7..b50c5b8 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -341,7 +341,7 @@ static int cros_ec_keyb_resume(struct device *dev)
* wake source (e.g. the lid is open and the user might press a key to
* wake) then the key scan buffer should be preserved.
*/
- if (ckdev->ec->was_wake_device)
+ if (!ckdev->ec->was_wake_device)
cros_ec_keyb_clear_keyboard(ckdev);

return 0;
--
2.1.0


\
 
 \ /
  Last update: 2015-03-25 17:21    [W:0.051 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site