Skip to content
Commit 2f2bd7cb authored by Jamie Lentin's avatar Jamie Lentin Committed by Benjamin Tissoires
Browse files

hid: lenovo: Resend all settings on reset_resume for compact keyboards



The USB Compact Keyboard variant requires a reset_resume function to
restore keyboard configuration after a suspend in some situations. Move
configuration normally done on probe to lenovo_features_set_cptkbd(), then
recycle this for use on reset_resume.

Without, the keyboard and driver would end up in an inconsistent state,
breaking middle-button scrolling amongst other problems, and twiddling
sysfs values wouldn't help as the middle-button mode won't be set until
the driver is reloaded.

Tested on a USB and Bluetooth Thinkpad Compact Keyboard.

CC: stable@vger.kernel.org
Fixes: 94eefa27 ("HID: lenovo: Use native middle-button mode for compact keyboards")
Signed-off-by: default avatarJamie Lentin <jm@lentin.co.uk>
Signed-off-by: default avatarMartin Kepplinger <martink@posteo.de>
Link: https://lore.kernel.org/r/20231002150914.22101-1-martink@posteo.de


Signed-off-by: default avatarBenjamin Tissoires <bentiss@kernel.org>
parent 46a0a2c9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment