linux: Parse HID_FIRMWARE_VERSION from uevent for release_number#777
Open
JohnAZoidberg wants to merge 1 commit intolibusb:masterfrom
Open
linux: Parse HID_FIRMWARE_VERSION from uevent for release_number#777JohnAZoidberg wants to merge 1 commit intolibusb:masterfrom
JohnAZoidberg wants to merge 1 commit intolibusb:masterfrom
Conversation
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>
6bb925f to
65f8797
Compare
Author
|
Also added here, which looks like it's going into 7.1 by @superm1: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git/commit/?h=for-7.1/lenovo-v2&id=6ca9029c823b7853e980585e757343e0e84227cd |
superm1
approved these changes
Mar 13, 2026
Youw
approved these changes
Mar 13, 2026
Member
Youw
left a comment
There was a problem hiding this comment.
I don't believe I have a way to properly check/test this, but quick googling shows that this is perfectly fine.
Thanks!
Youw
reviewed
Mar 13, 2026
Comment on lines
+626
to
+627
| } else if (strcmp(key, "HID_FIRMWARE_VERSION") == 0) { | ||
| /* Device version from kernel */ |
Member
There was a problem hiding this comment.
if you could add a comment what kernel version this become available (with reference) - that would be great
Author
There was a problem hiding this comment.
Yes, we can wait until either Mario or my patch gets merged and I can add a comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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