aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders F. U. Kiær <ablacksheep@gmail.com>2013-10-01 13:22:05 -0400
committerJiri Kosina <jkosina@suse.cz>2013-10-02 11:04:15 -0400
commit7da7cbbbeb60e0939fecdf9723b388136c175e5c (patch)
tree13acb58a7a00a4815de69fdcb3ad74ce3e23103b
parent0f5a24c6602063e014ee48892ebf56093241106e (diff)
HID: add Holtek USB ID 04d9:a081 SHARKOON DarkGlider
Added id, bindings and comments for Holtek USB ID 04d9:a081 SHARKOON DarkGlider Gaming mouse to use the same corrections of the report descriptor as Holtek 04d9:a04a. As the mouse exceed HID_MAX_USAGES at the same offsets in the reported descriptor. Tested on the hardware. Signed-off-by: Anders F. U. Kiær <ablacksheep@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/Kconfig1
-rw-r--r--drivers/hid/hid-core.c1
-rw-r--r--drivers/hid/hid-holtek-mouse.c4
-rw-r--r--drivers/hid/hid-ids.h1
4 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 71b70e3a7a71..c91d547191dd 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -241,6 +241,7 @@ config HID_HOLTEK
241 - Sharkoon Drakonia / Perixx MX-2000 gaming mice 241 - Sharkoon Drakonia / Perixx MX-2000 gaming mice
242 - Tracer Sniper TRM-503 / NOVA Gaming Slider X200 / 242 - Tracer Sniper TRM-503 / NOVA Gaming Slider X200 /
243 Zalman ZM-GM1 243 Zalman ZM-GM1
244 - SHARKOON DarkGlider Gaming mouse
244 245
245config HOLTEK_FF 246config HOLTEK_FF
246 bool "Holtek On Line Grip force feedback support" 247 bool "Holtek On Line Grip force feedback support"
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index b8470b1a10fe..5a8c01112a23 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1715,6 +1715,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
1715 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD) }, 1715 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD) },
1716 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A) }, 1716 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A) },
1717 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067) }, 1717 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067) },
1718 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) },
1718 { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_580) }, 1719 { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_580) },
1719 { HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) }, 1720 { HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) },
1720 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) }, 1721 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) },
diff --git a/drivers/hid/hid-holtek-mouse.c b/drivers/hid/hid-holtek-mouse.c
index 7e6db3cf46f9..e696566cde46 100644
--- a/drivers/hid/hid-holtek-mouse.c
+++ b/drivers/hid/hid-holtek-mouse.c
@@ -27,6 +27,7 @@
27 * - USB ID 04d9:a067, sold as Sharkoon Drakonia and Perixx MX-2000 27 * - USB ID 04d9:a067, sold as Sharkoon Drakonia and Perixx MX-2000
28 * - USB ID 04d9:a04a, sold as Tracer Sniper TRM-503, NOVA Gaming Slider X200 28 * - USB ID 04d9:a04a, sold as Tracer Sniper TRM-503, NOVA Gaming Slider X200
29 * and Zalman ZM-GM1 29 * and Zalman ZM-GM1
30 * - USB ID 04d9:a081, sold as SHARKOON DarkGlider Gaming mouse
30 */ 31 */
31 32
32static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc, 33static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc,
@@ -46,6 +47,7 @@ static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc,
46 } 47 }
47 break; 48 break;
48 case USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A: 49 case USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A:
50 case USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081:
49 if (*rsize >= 113 && rdesc[106] == 0xff && rdesc[107] == 0x7f 51 if (*rsize >= 113 && rdesc[106] == 0xff && rdesc[107] == 0x7f
50 && rdesc[111] == 0xff && rdesc[112] == 0x7f) { 52 && rdesc[111] == 0xff && rdesc[112] == 0x7f) {
51 hid_info(hdev, "Fixing up report descriptor\n"); 53 hid_info(hdev, "Fixing up report descriptor\n");
@@ -63,6 +65,8 @@ static const struct hid_device_id holtek_mouse_devices[] = {
63 USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067) }, 65 USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067) },
64 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, 66 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT,
65 USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A) }, 67 USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A) },
68 { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT,
69 USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) },
66 { } 70 { }
67}; 71};
68MODULE_DEVICE_TABLE(hid, holtek_mouse_devices); 72MODULE_DEVICE_TABLE(hid, holtek_mouse_devices);
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index e60e8d530697..9cbc7ab07dfa 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -450,6 +450,7 @@
450#define USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD 0xa055 450#define USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD 0xa055
451#define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067 0xa067 451#define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067 0xa067
452#define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A 0xa04a 452#define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A 0xa04a
453#define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081 0xa081
453 454
454#define USB_VENDOR_ID_IMATION 0x0718 455#define USB_VENDOR_ID_IMATION 0x0718
455#define USB_DEVICE_ID_DISC_STAKKA 0xd000 456#define USB_DEVICE_ID_DISC_STAKKA 0xd000