Input: hyperv-keyboard: Add the support of hibernation
authorDexuan Cui <decui@microsoft.com>
Mon, 6 Jan 2020 22:40:44 +0000 (14:40 -0800)
committerSasha Levin <sashal@kernel.org>
Sat, 25 Jan 2020 21:52:11 +0000 (16:52 -0500)
commite2379b30324ca5ba808f16cb3d2504349264912f
treef522ac9685fccc52077293127330f6a43c396dff
parentd33c240d47dab4fd15123d9e73fc8810cbc6ed6a
Input: hyperv-keyboard: Add the support of hibernation

Add suspend() and resume() functions so the Hyper-V virtual keyboard
can participate in VM hibernation.

Note that the keyboard is a "wakeup" device that could abort an in-progress
hibernation if there is keyboard event.  No attempt is made to suppress this
behavior.  If desired, a sysadmin can disable the keyboard as a wakeup device
using standard mechanisms such as:

echo disabled > /sys/bus/vmbus/drivers/hyperv_keyboard/XXX/power/wakeup
(where XXX is the device's GUID)

Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/serio/hyperv-keyboard.c