HID: uclogic: Refactor UGEE v2 string descriptor parsing
authorJosé Expósito <jose.exposito89@gmail.com>
Mon, 15 Aug 2022 14:29:50 +0000 (16:29 +0200)
committerJiri Kosina <jkosina@suse.cz>
Thu, 25 Aug 2022 08:26:31 +0000 (10:26 +0200)
commita64cbf3ce63122168e1edb3eb1eb1cf7781ae230
treeafff73882f2cd4b0efbab1939c04e9d881800dca
parent08809e482a1c44d95d1322b9fbc94c8e58ae9015
HID: uclogic: Refactor UGEE v2 string descriptor parsing

The UGEE v2 tablets expose a string descriptor with their capabilities.

Move the code used to parse the descriptors and generate a parameter
list from it to its own function and add KUnit tests to validate the
parser.

Tested-by: Jouke Witteveen <j.witteveen@gmail.com>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/Makefile
drivers/hid/hid-uclogic-params-test.c [new file with mode: 0644]
drivers/hid/hid-uclogic-params.c