Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: bpf: fix typo in HID usage table

We could go to the USB consortium, but it's probably
easier that way.

And update HID usage table json generated file from
https://usb.org/sites/default/files/hut1_6.pdf updated: 01/30/2025

Reported-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/191
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>

authored by

Benjamin Tissoires and committed by
Jiri Kosina
3b86c87f 71570e8f

+7 -3
+7 -3
drivers/hid/bpf/progs/hid_report_helpers.h
··· 143 143 * report with Report ID 0xac of the given size in bytes. 144 144 * The size is inclusive of the 1 byte Report ID prefix. 145 145 * 146 - * HID-BPF requires that at least one report has 147 - * the same size as the original report from the device. 146 + * The kernel discards any HID reports that are larger 147 + * than the largest report in a HID report descriptor. 148 + * Thus at least one report must have (at least) 149 + * the same size as the largest original report from 150 + * the device. 148 151 * The easy way to ensure that is to add this 149 152 * macro as the last element of your CollectionApplication 150 153 * other reports can be of any size less than this. ··· 298 295 #define Usage_GD_SystemSpeakerMute Usage_i8(0xa7) 299 296 #define Usage_GD_SystemHibernate Usage_i8(0xa8) 300 297 #define Usage_GD_SystemMicrophoneMute Usage_i8(0xa9) 298 + #define Usage_GD_SystemAccessibilityBinding Usage_i8(0xaa) 301 299 #define Usage_GD_SystemDisplayInvert Usage_i8(0xb0) 302 300 #define Usage_GD_SystemDisplayInternal Usage_i8(0xb1) 303 301 #define Usage_GD_SystemDisplayExternal Usage_i8(0xb2) ··· 2673 2669 #define Usage_BS_iDeviceName Usage_i8(0x88) 2674 2670 #define Usage_BS_iDeviceChemistry Usage_i8(0x89) 2675 2671 #define Usage_BS_ManufacturerData Usage_i8(0x8a) 2676 - #define Usage_BS_Rechargable Usage_i8(0x8b) 2672 + #define Usage_BS_Rechargeable Usage_i8(0x8b) 2677 2673 #define Usage_BS_WarningCapacityLimit Usage_i8(0x8c) 2678 2674 #define Usage_BS_CapacityGranularity1 Usage_i8(0x8d) 2679 2675 #define Usage_BS_CapacityGranularity2 Usage_i8(0x8e)