Skip to content

linux: Parse HID_FIRMWARE_VERSION from uevent for release_number - #847

Merged
Youw merged 1 commit into
masterfrom
linux-firmware-version
Nov 12, 2026
Merged

Youw merged 1 commit into
masterfrom
linux-firmware-version

Conversation

@Youw

@Youw Youw commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Parse HID_FIRMWARE_VERSION from the Linux uevent to populate release_number, retaining the existing USB bcdDevice override and zero fallback when the property is absent.

Carries forward Daniel Schaefer's original patch, preserving the commit author, author date, and exact original commit message. The source comment now documents availability since Linux 7.1, when supplied by the kernel driver, with a reference to the introducing kernel commit.

Validation: WSL Linux CMake/Ninja build passed with both backends, tests, and hidtest enabled. CTest: 27 passed; 4 virtual-device tests skipped because their required devices were unavailable. Diff whitespace check passed.

Supersedes #777 and addresses the kernel-version comment request.

Closes: #777

Assisted-by: Codex:GPT-6

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>
@Youw
Youw force-pushed the linux-firmware-version branch from d7f4f5e to e305af5 Compare November 12, 2026 23:02
@Youw
Youw merged commit 63c4e5c into master Nov 12, 2026
26 of 28 checks passed
@Youw
Youw deleted the linux-firmware-version branch November 12, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants