From 24401f291dcc4f2c18b9e2f65763cbaadc7a1528 Mon Sep 17 00:00:00 2001 From: ValdikSS Date: Sun, 13 Feb 2022 22:49:22 +0100 Subject: 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 Reviewed-by: Benjamin Tissoires Signed-off-by: Jiri Kosina --- drivers/hid/hid-ids.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/hid/hid-ids.h') diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 053853a891c5..1c5bd9882dea 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -761,7 +761,9 @@ #define USB_VENDOR_ID_LENOVO 0x17ef #define USB_DEVICE_ID_LENOVO_TPKBD 0x6009 #define USB_DEVICE_ID_LENOVO_CUSBKBD 0x6047 +#define USB_DEVICE_ID_LENOVO_TPIIUSBKBD 0x60ee #define USB_DEVICE_ID_LENOVO_CBTKBD 0x6048 +#define USB_DEVICE_ID_LENOVO_TPIIBTKBD 0x60e1 #define USB_DEVICE_ID_LENOVO_SCROLLPOINT_OPTICAL 0x6049 #define USB_DEVICE_ID_LENOVO_TP10UBKBD 0x6062 #define USB_DEVICE_ID_LENOVO_TPPRODOCK 0x6067 -- cgit v1.2.3