Skip to content

linux: Parse HID_FIRMWARE_VERSION from uevent for release_number#777

Open
JohnAZoidberg wants to merge 1 commit intolibusb:masterfrom
FrameworkComputer:hid-firmware-ver
Open

linux: Parse HID_FIRMWARE_VERSION from uevent for release_number#777
JohnAZoidberg wants to merge 1 commit intolibusb:masterfrom
FrameworkComputer:hid-firmware-ver

Conversation

@JohnAZoidberg
Copy link

@JohnAZoidberg JohnAZoidberg commented Mar 13, 2026

Parse the HID_FIRMWARE_VERSION uevent property to populate release_number for all HID devices. This provides device version information for I2C, Bluetooth, SPI, and virtual HID devices.

For USB devices, the existing bcdDevice lookup from sysfs still takes precedence, maintaining backward compatibility.

The HID_FIRMWARE_VERSION property is being added to the Linux kernel (patch series submitted to linux-input@vger.kernel.org). On kernels without this property, release_number will remain 0 for non-USB devices, preserving existing behavior.

Link: https://lore.kernel.org/linux-input/20260313175659.268094-1-dhs@frame.work/T/#u

Parse the HID_FIRMWARE_VERSION uevent property to populate release_number
for all HID devices. This provides device version information for I2C,
Bluetooth, SPI, and virtual HID devices.

For USB devices, the existing bcdDevice lookup from sysfs still takes
precedence, maintaining backward compatibility.

The HID_FIRMWARE_VERSION property is being added to the Linux kernel
(patch series submitted to linux-input@vger.kernel.org). On kernels
without this property, release_number will remain 0 for non-USB devices,
preserving existing behavior.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
@JohnAZoidberg
Copy link
Author

Copy link
Member

@Youw Youw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe I have a way to properly check/test this, but quick googling shows that this is perfectly fine.
Thanks!

Comment on lines +626 to +627
} else if (strcmp(key, "HID_FIRMWARE_VERSION") == 0) {
/* Device version from kernel */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you could add a comment what kernel version this become available (with reference) - that would be great

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can wait until either Mario or my patch gets merged and I can add a comment

@mcuee mcuee added the hidraw Related to Linux/hidraw backend label Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hidraw Related to Linux/hidraw backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants