linux/drivers/hid/usbhid
Tomasz Pakuła 5ed818e956 HID: pidff: Do not set out of range trigger button
[ Upstream commit e01a029654 ]

Some games (mainly observed with Kylotonn's WRC Serises) set trigger
button to a random value, or always the same one, out of range.
I observed 307 and other values but, for example, my Moza R9 only
exposes 128 buttons AND it's trigger button field is 8-bit. This causes
errors to appear in dmesg.

Only set the trigger button and trigger interval in the trigger button
is in range of the field.

Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:19:54 -05:00
..
hid-core.c HID: usbhid: paper over wrong bNumDescriptor field 2026-01-23 11:21:23 +01:00
hid-pidff.c HID: pidff: Do not set out of range trigger button 2026-03-04 07:19:54 -05:00
hid-pidff.h HID: pidff: Use direction fix only for conditional effects 2025-08-15 15:58:01 +02:00
hiddev.c USB: make devnode() callback in usb_class_driver take a const * 2022-10-20 12:11:56 +02:00
Kconfig HID: intel-thc: fix CONFIG_HID dependency 2025-02-03 10:56:43 +01:00
Makefile HID: core: move the dynamic quirks handling in core 2017-11-21 11:14:48 +01:00
usbhid.h Revert "HID: usbhid: do not sleep when opening device" 2020-08-18 19:54:04 +02:00
usbkbd.c HID: usbkbd: Fix the bit shift number for LED_KANA 2025-02-03 22:52:47 +01:00
usbmouse.c HID: move from strlcpy with unused retval to strscpy 2022-08-25 11:44:27 +02:00