Skip to content

Commit 5df4eb0

Browse files
AesthetikxJiri Kosina
authored andcommitted
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 643727a commit 5df4eb0

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

drivers/hid/hid-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,6 +1793,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
17931793
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A070) },
17941794
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A072) },
17951795
{ 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) },
17961797
{ HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_TABLET) },
17971798
{ HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) },
17981799
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) },

drivers/hid/hid-holtek-mouse.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* and Zalman ZM-GM1
3030
* - USB ID 04d9:a081, sold as SHARKOON DarkGlider Gaming mouse
3131
* - USB ID 04d9:a072, sold as LEETGION Hellion Gaming Mouse
32+
* - USB ID 04d9:a0c2, sold as ETEKCITY Scroll T-140 Gaming Mouse
3233
*/
3334

3435
static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc,
@@ -42,6 +43,7 @@ static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc,
4243
switch (hdev->product) {
4344
case USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067:
4445
case USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A072:
46+
case USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2:
4547
if (*rsize >= 122 && rdesc[115] == 0xff && rdesc[116] == 0x7f
4648
&& rdesc[120] == 0xff && rdesc[121] == 0x7f) {
4749
hid_info(hdev, "Fixing up report descriptor\n");
@@ -74,6 +76,8 @@ static const struct hid_device_id holtek_mouse_devices[] = {
7476
USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A072) },
7577
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT,
7678
USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) },
79+
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT,
80+
USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2) },
7781
{ }
7882
};
7983
MODULE_DEVICE_TABLE(hid, holtek_mouse_devices);

drivers/hid/hid-ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@
479479
#define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A070 0xa070
480480
#define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A072 0xa072
481481
#define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081 0xa081
482+
#define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A0C2 0xa0c2
482483
#define USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD_A096 0xa096
483484

484485
#define USB_VENDOR_ID_IMATION 0x0718

0 commit comments

Comments
 (0)