]> git.baikalelectronics.ru Git - kernel.git/commit
HID: lenovo: Add support for ThinkPad TrackPoint Keyboard II
authorValdikSS <iam@valdikss.org.ru>
Sun, 13 Feb 2022 21:49:22 +0000 (22:49 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 2 May 2022 15:49:44 +0000 (17:49 +0200)
commita5c9d661a24b9fbf8d4e2867cc357929ccd2fbc4
tree5527f608903ebd68212bfae5b854a827411d2a95
parent1ec09fd5763916c56cbfb0351eb9e6a8e9670eb8
HID: lenovo: Add support for ThinkPad TrackPoint Keyboard II

This keyboard has two modes: regular HID and a native mode, which is used
in Windows driver. Native mode disables (poor) middle mouse button
scrolling emulation and reports middle button and scrolling events with a
custom report ID, which could be better handled in the driver.

This commit adds functional button mapping and native scrolling support.

HID collection in Bluetooth mode for custom report ID=5 is broken and
is patched upon connection. The collection initially contains incorrect
Usage Minimum/Usage Maximum numbers and, more importantly, marks Input
as Variable, not Array, while reporting values as in Array.

The keyboard is very similar to Compact USB/Bluetooth Keyboard with
TrackPoint, that's why this patch reuses all of cptkbd functions, except
for input mapping.

Signed-off-by: Florian Klink <flokli@flokli.de>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-ids.h
drivers/hid/hid-lenovo.c