Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef30a406 authored by Tomeu Vizoso's avatar Tomeu Vizoso Committed by Dmitry Torokhov
Browse files

Input: cros_ec_keyb - fix clearing keyboard state on wakeup



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: default avatarTomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent a54aecbd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -338,7 +338,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;