]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: lenovo: Add middleclick_workaround sysfs knob for cptkbd
authorMikhail Khvainitski <me@khvoinitsky.org>
Sat, 23 Dec 2023 19:12:13 +0000 (21:12 +0200)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:43 +0000 (18:19 -0400)
commit7e062c083dc9e248ddd096b9e893c974534e7014
tree900dbb9cac504013f432b89334d575a3a0118bcb
parente55c8abaadd9699b2c5c6161886d03c2b9b9444a
HID: lenovo: Add middleclick_workaround sysfs knob for cptkbd

[ Upstream commit 2814646f76f8518326964f12ff20aaee70ba154d ]

Previous attempt to autodetect well-behaving patched firmware
introduced in commit 46a0a2c96f0f ("HID: lenovo: Detect quirk-free fw
on cptkbd and stop applying workaround") has shown that there are
false-positives on original firmware (on both 1st gen and 2nd gen
keyboards) which causes the middle button click workaround to be
mistakenly disabled.

This commit adds explicit parameter to sysfs to control this
workaround.

Fixes: 46a0a2c96f0f ("HID: lenovo: Detect quirk-free fw on cptkbd and stop applying workaround")
Fixes: 43527a0094c1 ("HID: lenovo: Restrict detection of patched firmware only to USB cptkbd")
Signed-off-by: Mikhail Khvainitski <me@khvoinitsky.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/hid-lenovo.c