Skip to content

Commit 6f78193

Browse files
cvuchenerJiri Kosina
authored andcommitted
HID: corsair: Add Corsair Vengeance K90 driver
This patch implements a HID driver for the Corsair Vengeance K90 keyboard. It fixes the behaviour of the keys using incorrect HID usage codes and exposes the macro playback mode and current profile to the user space through sysfs attributes. It also adds two LED class devices controlling the "record" LED and the backlight. Signed-off-by: Clément Vuchener <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 851328f commit 6f78193

File tree

6 files changed

+703
-0
lines changed

6 files changed

+703
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
What: /sys/bus/drivers/corsair/<dev>/macro_mode
2+
Date: August 2015
3+
KernelVersion: 4.2
4+
Contact: Clement Vuchener <[email protected]>
5+
Description: Get/set the current playback mode. "SW" for software mode
6+
where G-keys triggers their regular key codes. "HW" for
7+
hardware playback mode where the G-keys play their macro
8+
from the on-board memory.
9+
10+
11+
What: /sys/bus/drivers/corsair/<dev>/current_profile
12+
Date: August 2015
13+
KernelVersion: 4.2
14+
Contact: Clement Vuchener <[email protected]>
15+
Description: Get/set the current selected profile. Values are from 1 to 3.

drivers/hid/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,16 @@ config HID_CHICONY
171171
---help---
172172
Support for Chicony Tactical pad.
173173

174+
config HID_CORSAIR
175+
tristate "Corsair devices"
176+
depends on HID && USB && LEDS_CLASS
177+
---help---
178+
Support for Corsair devices that are not fully compliant with the
179+
HID standard.
180+
181+
Supported devices:
182+
- Vengeance K90
183+
174184
config HID_PRODIKEYS
175185
tristate "Prodikeys PC-MIDI Keyboard support"
176186
depends on HID && SND

drivers/hid/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ obj-$(CONFIG_HID_BELKIN) += hid-belkin.o
2929
obj-$(CONFIG_HID_BETOP_FF) += hid-betopff.o
3030
obj-$(CONFIG_HID_CHERRY) += hid-cherry.o
3131
obj-$(CONFIG_HID_CHICONY) += hid-chicony.o
32+
obj-$(CONFIG_HID_CORSAIR) += hid-corsair.o
3233
obj-$(CONFIG_HID_CP2112) += hid-cp2112.o
3334
obj-$(CONFIG_HID_CYPRESS) += hid-cypress.o
3435
obj-$(CONFIG_HID_DRAGONRISE) += hid-dr.o

drivers/hid/hid-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,6 +1828,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
18281828
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
18291829
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_AK1D) },
18301830
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_ACER_SWITCH12) },
1831+
{ HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K90) },
18311832
{ HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) },
18321833
{ HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_CP2112) },
18331834
{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) },

0 commit comments

Comments
 (0)