]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: intel-hid: Fix spurious wakeups caused by tablet-mode events during...
authorHans de Goede <hdegoede@redhat.com>
Sun, 4 Apr 2021 14:38:31 +0000 (16:38 +0200)
committerHans de Goede <hdegoede@redhat.com>
Tue, 6 Apr 2021 20:10:21 +0000 (22:10 +0200)
commit6d8e91f86d62817619a2c064ca6a0d267f59350d
tree169d93e81bdbe0891b330226e25e4d62be8bb524
parent1b9541487c1f16b6575501fe1d397abe2fd87044
platform/x86: intel-hid: Fix spurious wakeups caused by tablet-mode events during suspend

Some devices send (duplicate) tablet-mode events when moved around even
though the mode has not changed; and they do this even when suspended.

Change the tablet-mode event handling when priv->wakeup_mode is set to
update the switch state in case it changed and then return immediately
(without calling pm_wakeup_hard_event()) to avoid spurious wakeups.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212537
Fixes: 26924f9a3bf4 ("platform/x86: intel-hid: Add support for SW_TABLET_MODE")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Elia Devito <eliadevito@gmail.com>
Link: https://lore.kernel.org/r/20210404143831.25173-1-hdegoede@redhat.com
drivers/platform/x86/intel-hid.c