summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-corsair.c
AgeCommit message (Collapse)Author
2018-02-16HID: corsair: Add K70 Vengeance and K70 RAPIDFIRE toAaron Bottegal
K70 Vengeance sends garbage keypresses when changing backlight brightness. This hooks to the existing corsair driver, which filters out those invalid keypresses on similar devices in the input mapping code. V2: Fix spelling. Signed-off-by: Aaron Bottegal <aaronbottegal@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-02-16HID: corsair: Add support for the GLAIVE RGB gaming mouseGuus Sliepen
This mouse sold by Corsair as the GLAIVE RGB gaming mouse has the same problem with its HID reports as the Scimitar PRO RGB, so reuse the same fix for the GLAIVE RGB. Signed-off-by: Guus Sliepen <guus@sliepen.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-03-21HID: corsair: Add driver Scimitar Pro RGB gaming mouse 1b1c:1b3e support to ↵Oscar Campos
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). Signed-off-by: Oscar Campos <oscar.campos@member.fsf.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-13HID: corsair: fix control-transfer error handlingJohan Hovold
Make sure to check for short control transfers in order to avoid parsing uninitialised buffer data and leaking it to user space. Note that the backlight and macro-mode buffer constraints are kept as loose as possible in order to avoid any regressions should the current buffer sizes be larger than necessary. Fixes: 6f78193ee9ea ("HID: corsair: Add Corsair Vengeance K90 driver") Cc: stable <stable@vger.kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-13HID: corsair: fix DMA buffers on stackJohan Hovold
Not all platforms support DMA to the stack, and specifically since v4.9 this is no longer supported on x86 with VMAP_STACK either. Note that the macro-mode buffer was larger than necessary. Fixes: 6f78193ee9ea ("HID: corsair: Add Corsair Vengeance K90 driver") Cc: stable <stable@vger.kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-02-23HID: corsair: fix mapping of non-keyboard usagesClément Vuchener
This fixes a bug where the Volume Up key was ignored because it uses the same usage code as G18. Special Corsair usage codes are in the keyboard page, other pages should be left to the generic driver. Signed-off-by: Clément Vuchener <clement.vuchener@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2015-12-28HID: corsair: Convert to use module_hid_driverAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Clément Vuchener <clement.vuchener@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2015-09-30HID: corsair: boolify struct k90_led.removedJiri Kosina
'removed' field of struct k90_led is in its nature bool, let's use it that way. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2015-09-30HID: corsair: Add Corsair Vengeance K90 driverClément Vuchener
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 <clement.vuchener@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>