Skip to contentSkip to conversation

HID: corsair: support for K65-K70 Rapidfire and Scimitar Pro RGB

PATCH In review Oscar Campos 2 participants 4 messages Feb 10, 2017 – Mar 6, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/2 HID: corsair: support for K65-K70 Rapidfire and Scimitar Pro RGB

Add quirks for several corsair gaming devices to avoid long delays on report initialization

Supported devices:

- Corsair K65RGB Rapidfire Gaming Keyboard
- Corsair K70RGB Rapidfire Gaming Keyboard
- Corsair Scimitar Pro RGB Gaming Mouse

---
 drivers/hid/hid-ids.h           | 3 +++
 drivers/hid/usbhid/hid-quirks.c | 3 +++
 2 files changed, 6 insertions(+)
drivers/hid/hid-ids.h +3 -0
index 350accfee8e8..1b693192f71a 100644
@@ -278,6 +278,9 @@
 #define USB_DEVICE_ID_CORSAIR_K70RGB    0x1b13
 #define USB_DEVICE_ID_CORSAIR_STRAFE    0x1b15
 #define USB_DEVICE_ID_CORSAIR_K65RGB    0x1b17
+#define USB_DEVICE_ID_CORSAIR_K70RGB_RAPIDFIRE  0x1b38
+#define USB_DEVICE_ID_CORSAIR_K65RGB_RAPIDFIRE  0x1b39
+#define USB_DEVICE_ID_CORSAIR_SCIMITAR_PRO_RGB  0x1b3e
 
 #define USB_VENDOR_ID_CREATIVELABS	0x041e
 #define USB_DEVICE_ID_CREATIVE_SB_OMNI_SURROUND_51	0x322c
drivers/hid/usbhid/hid-quirks.c +3 -0
index 30a2977e2645..23ac2c393d96 100644
@@ -80,6 +80,9 @@ static const struct hid_blacklist {
 	{ USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K70RGB, HID_QUIRK_NO_INIT_REPORTS },
 	{ USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K65RGB, HID_QUIRK_NO_INIT_REPORTS },
 	{ USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_STRAFE, HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL },
+	{ USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K70RGB_RAPIDFIRE, HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL },
+	{ USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K65RGB_RAPIDFIRE, HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL },
+	{ USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_SCIMITAR_PRO_RGB, HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL },
 	{ USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_CREATIVE_SB_OMNI_SURROUND_51, HID_QUIRK_NOGET },
 	{ USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET },
 	{ USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_WIIU, HID_QUIRK_MULTI_INPUT },

--
2.11.0

#2 lore raw

PATCH 2/2 HID: corsair: Add driver Scimitar Pro RGB gaming mouse 1b1c:1b3e

In reply to a message not in the archive

This mouse sold by Corsair as Scimitar PRO RGB defines two consecutive Logical Minimum items in its Application (Consumer.0001) report making it non parseable. This driver fixes the report descriptor overriding byte 77 in rdesc from 0x16 (Logical Minimum with 16 bits value) to 0x26 (Logical Maximum with 16 bits value).

---
 drivers/hid/Kconfig             | 10 ++++++
 drivers/hid/Makefile            |  1 +
 drivers/hid/hid-corsair-mouse.c | 76 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 87 insertions(+)
 create mode 100644 drivers/hid/hid-corsair-mouse.c
drivers/hid/Kconfig +10 -0
index 4070b7386e9d..1ad179b70b15 100644
@@ -191,6 +191,16 @@ config HID_CORSAIR
 	Supported devices:
 	- Vengeance K90
 
+config HID_CORSAIR_MOUSE:
+    tristate "Corsair mice"
+    depends on HID && USB
+    ---help---
+    Support for Corsair mice devices that are not fully compliant with
+    the HID standard.
+
+    Supported devices:
+    - Scimitar Pro RGB
+
 config HID_PRODIKEYS
 	tristate "Prodikeys PC-MIDI Keyboard support"
 	depends on HID && SND
drivers/hid/Makefile +1 -0
index 4d111f23e801..34d17e9b4640 100644
@@ -33,6 +33,7 @@ obj-$(CONFIG_HID_CHERRY)	+= hid-cherry.o
 obj-$(CONFIG_HID_CHICONY)	+= hid-chicony.o
 obj-$(CONFIG_HID_CMEDIA)	+= hid-cmedia.o
 obj-$(CONFIG_HID_CORSAIR)	+= hid-corsair.o
+obj-$(CONFIG_HID_CORSAIR_MOUSE)	+= hid-corsair-mouse.o
 obj-$(CONFIG_HID_CP2112)	+= hid-cp2112.o
 obj-$(CONFIG_HID_CYPRESS)	+= hid-cypress.o
 obj-$(CONFIG_HID_DRAGONRISE)	+= hid-dr.o
drivers/hid/hid-corsair-mouse.c new file +76 -0

76 lines not on this page · raw message

--
2.11.0

maintainer
#3 lore raw

Re: [PATCH 2/2] HID: corsair: Add driver Scimitar Pro RGB gaming mouse 1b1c:1b3e

Quoted 19 lines · Oscar Campos

This mouse sold by Corsair as Scimitar PRO RGB defines two consecutive Logical Minimum items in its Application (Consumer.0001) report making it non parseable. This driver fixes the report descriptor overriding byte 77 in rdesc from 0x16 (Logical Minimum with 16 bits value) to 0x26 (Logical Maximum with 16 bits value).

---
 drivers/hid/Kconfig             | 10 ++++++
 drivers/hid/Makefile            |  1 +
 drivers/hid/hid-corsair-mouse.c | 76 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 87 insertions(+)
 create mode 100644 drivers/hid/hid-corsair-mouse.c
drivers/hid/Kconfig +0 -0
index 4070b7386e9d..1ad179b70b15 100644

drivers/hid/Kconfig config HID_CORSAIR · line 194

Quoted 4 lines
drivers/hid/Kconfig +1 -0
@@ -191,6 +191,16 @@ config HID_CORSAIR
 	Supported devices:
 	- Vengeance K90
 
+config HID_CORSAIR_MOUSE:

The colon after the symbol name shouldn't be there.

[ ... snip ... ]

drivers/hid/Kconfig config HID_CORSAIR · line 200

Quoted 6 lines
drivers/hid/Kconfig +6 -0
+static const struct hid_device_id corsair_mouse_devices[] = {
+	{ HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR,
+			USB_DEVICE_ID_CORSAIR_SCIMITAR_PRO_RGB) },
+	{ }
+};
+MODULE_DEVICE_TABLE(hid, corsair_mouse_devices);

You need to add this vendor/product id also into hid_have_special_driver[] array, otherwise it's not guaranteed that your driver will bind to it (as the generic one might overrride).

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs
#4 lore raw

PATCH v2 2/2 HID: corsair: Add driver Scimitar Pro RGB gaming mouse 1b1c:1b3e support to hid-corsair

This mouse sold by Corsair as Scimitar PRO RGB defines two consecutive Logical Minimum items in its Application (Consumer.0001) report making it non parseable. This patch fixes the report descriptor overriding byte 77 in rdesc from 0x16 (Logical Minimum with 16 bits value) to 0x26 (Logical Maximum with 16 bits value).

---
 drivers/hid/Kconfig       |  1 +
 drivers/hid/hid-core.c    |  1 +
 drivers/hid/hid-corsair.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 49 insertions(+)
drivers/hid/Kconfig +1 -0
index 1aeb80e52424..51bff07e7237 100644
@@ -190,6 +190,7 @@ config HID_CORSAIR
 
 	Supported devices:
 	- Vengeance K90
+	- Scimitar PRO RGB
 
 config HID_PRODIKEYS
 	tristate "Prodikeys PC-MIDI Keyboard support"
drivers/hid/hid-core.c +1 -0
index e9e87d337446..7b170625db51 100644
@@ -1870,6 +1870,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_AK1D) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_ACER_SWITCH12) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K90) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_SCIMITAR_PRO_RGB) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_CP2112) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) },
drivers/hid/hid-corsair.c +47 -0

75 lines not on this page · raw message

--
2.12.0