Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: Add Holtek USB ID 04d9:a0c2 ETEKCITY Scroll

The report descriptor for the HOLTEK USB ID 04d9:a0c2 (ETEKCITY Scroll
T-140 Gaming Mouse) is set to a very large amount of consumer usages
(2^16), exceeding HID_MAX_USAGES. Added id, bindings and comments for
the mouse, added to hid_have_special_driver, and reduced the usage and
logical maximums to 0x2fff, consistent with the other mice in the
category. Tested on the hardware.

Signed-off-by: John C. DeSilva <desilvjo@umich.edu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

John DeSilva and committed by
Jiri Kosina
5df4eb05 643727a9

+6
+1
drivers/hid/hid-core.c
··· 1793 1793 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A070) }, 1794 1794 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A072) }, 1795 1795 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) }, 1796 + { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2) }, 1796 1797 { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_TABLET) }, 1797 1798 { HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) }, 1798 1799 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) },
+4
drivers/hid/hid-holtek-mouse.c
··· 29 29 * and Zalman ZM-GM1 30 30 * - USB ID 04d9:a081, sold as SHARKOON DarkGlider Gaming mouse 31 31 * - USB ID 04d9:a072, sold as LEETGION Hellion Gaming Mouse 32 + * - USB ID 04d9:a0c2, sold as ETEKCITY Scroll T-140 Gaming Mouse 32 33 */ 33 34 34 35 static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc, ··· 43 42 switch (hdev->product) { 44 43 case USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067: 45 44 case USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A072: 45 + case USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2: 46 46 if (*rsize >= 122 && rdesc[115] == 0xff && rdesc[116] == 0x7f 47 47 && rdesc[120] == 0xff && rdesc[121] == 0x7f) { 48 48 hid_info(hdev, "Fixing up report descriptor\n"); ··· 76 74 USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A072) }, 77 75 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, 78 76 USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) }, 77 + { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, 78 + USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2) }, 79 79 { } 80 80 }; 81 81 MODULE_DEVICE_TABLE(hid, holtek_mouse_devices);
+1
drivers/hid/hid-ids.h
··· 479 479 #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A070 0xa070 480 480 #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A072 0xa072 481 481 #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081 0xa081 482 + #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2 0xa0c2 482 483 #define USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD_A096 0xa096 483 484 484 485 #define USB_VENDOR_ID_IMATION 0x0718