]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
platform/x86: intel-vbtn: Report switch events when event wakes device
authorMathew King <mathewk@chromium.org>
Mon, 20 May 2019 22:41:24 +0000 (16:41 -0600)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 12 Jun 2019 08:54:16 +0000 (11:54 +0300)
commit89ae3a07362585dc0856bae5605b0ec77b984ec8
tree4215a0c761f329c004dc828e2141a267200ad736
parent1dd93f873d8ed8e5b228d1ae324b1f3c1e94bfa8
platform/x86: intel-vbtn: Report switch events when event wakes device

When a switch event, such as tablet mode/laptop mode or docked/undocked,
wakes a device make sure that the value of the swich is reported.
Without when a device is put in tablet mode from laptop mode when it is
suspended or vice versa the device will wake up but mode will be
incorrect.

Tested by suspending a device in laptop mode and putting it in tablet
mode, the device resumes and is in tablet mode. When suspending the
device in tablet mode and putting it in laptop mode the device resumes
and is in laptop mode.

Signed-off-by: Mathew King <mathewk@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Mario Limonciello <mario.limonciello@dell.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel-vbtn.c