-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for firmware versions #648
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One typo found, would be great if you could squash that in. Otherwise this LGTM, we can merge this once upstream accepts your kernel patch. Can you ping me when that happens? Thanks
libwacom/libwacom.c
Outdated
G_REGEX_DEFAULT, | ||
G_REGEX_MATCH_DEFAULT, | ||
NULL); | ||
g_regex_match (regex, fw, 0, &match_info); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: this may become an issue if we ever get a fw exported that has a different underscorify pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong preference for this regex (I usually have a strong preference against using regexes), but in this case I think that makes easier to parse the fw name.
If you prefer to match against a list of well known fw names, I'm happy to change this function.
ftr I have merged the first few cleanup patches, so a rebase should half the commit list |
@whot the kernel patch has been merged. In the end, instead of creating a custom sysfs property, we ended up using Something else I have in my to-do list is displaying that information with |
yes, definitely. This also leaves room for a future firmware attribute if uniq is no longer sufficient.
I think |
Refactored the last patch to use uniq instead of fw
Also added an extra entry to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one indentation error, rest looks good, thanks!
Some device names include a colon which makes it hard to add extra optional components to the device matches.
No functional changes, this just preps the way for more optional elements in the match string.
Resolved and rebased. Thanks for the review! |
Introduced in 2.74 and that's too new for Ubuntu 22.04. Looking at glib commit
|
Some device manufacturers re-use the VID/PID but we can still get to the firmware versions if the kernel driver exports them. Add those to the match string as fifth component after the (possibly empty) name. A DeviceMatch=usb|1234|abcd|Foo Tablet|ABCD1234 now matches against a device with that firmware version.
Ops, missed the CI emails. I replaced |
Is the FreeBSD failure expected? |
yeah, it's very unreliable and fails often (all the time?) but I'm ETIME on debugging that. cc @jbeich |
I think we're good here, let's merge this! thanks for all the effort |
Try applying labwc/labwc@00ec29c834b7. I suspect |
Patches from Peter (#620) plus changes from my side.
Requires https://lore.kernel.org/linux-input/[email protected]/T/ or https://github.com/JoseExposito/digimend-kernel-drivers/tree/sysfs-fw-name.
Fixes #610
cc @whot