diff options
author | José Expósito <jose.exposito89@gmail.com> | 2024-03-22 10:59:58 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.com> | 2024-04-03 13:51:06 +0200 |
commit | a721b1423b049323d0987700ff125b46208046f9 (patch) | |
tree | 44ab05d7458739a7e980ba740a4109e52bae0175 /drivers/hid | |
parent | 3e78a6c0d3e02e4cf881dc84c5127e9990f939d6 (diff) | |
download | linux-a721b1423b049323d0987700ff125b46208046f9.tar.gz linux-a721b1423b049323d0987700ff125b46208046f9.tar.bz2 linux-a721b1423b049323d0987700ff125b46208046f9.zip |
HID: uclogic: Expose firmware name
Some vendors reuse the same product ID for different tablets, making it
difficult for userspace to figure out which table is connected.
While matching the device name has been used in the past by userspace to
workaround this limitation, some devices have shown that this is not
always a valid approach [1].
However, if userspace could access the firmware version name, it would
be possible to know which tablet is actually connected by matching it
against a list of known firmware names [2].
This patch exposes the firmware version name in the hid->uniq field.
Link: https://github.com/linuxwacom/libwacom/issues/609 [1]
Link: https://github.com/linuxwacom/libwacom/issues/610 [2]
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-uclogic-params.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c index 9859dad36495..5bab006ec165 100644 --- a/drivers/hid/hid-uclogic-params.c +++ b/drivers/hid/hid-uclogic-params.c @@ -884,6 +884,9 @@ static int uclogic_params_huion_init(struct uclogic_params *params, goto cleanup; } + /* The firmware is used in userspace as unique identifier */ + strscpy(hdev->uniq, ver_ptr, sizeof(hdev->uniq)); + /* If this is a transition firmware */ if (strcmp(ver_ptr, transition_ver) == 0) { hid_dbg(hdev, |