summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-uclogic-params-test.c
AgeCommit message (Collapse)AuthorFilesLines
2022-11-14HID: uclogic: Standardize test name prefixJosé Expósito1-2/+2
Commit 961bcdf956a4 ("drm/tests: Change "igt_" prefix to "drm_test_"") introduced a new naming convention for the KUnit tests present in the DRM subsystem: "drm_test_<module>_<test name>". This naming convention is very convenient because it allows to easily run all subsystem tests or all driver tests using kunit.py's wildcards. Follow the naming conventions used in the DRM subsystem adapted to the HID subsystem: "hid_test_<module>_<test name>". Signed-off-by: José Expósito <jose.exposito89@gmail.com> Reviewed-by: Maíra Canal <mairacanal@riseup.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2022-08-25HID: uclogic: Parse the UGEE v2 frame typeJosé Expósito1-1/+34
The string descriptor returned by UGEE v2 devices contains a byte indicating the device frame type. The values discovered so far are: - 0: Frame with buttons, present in the XP-PEN Deco L. - 1: Frame with buttons and dial, present in the PARBLO A610 PRO. - 2: Frame with buttons and a mouse, shaped as a dial + touchpad. Present in the XP-PEN Deco Pro S. Parse the frame type and add KUnit tests. 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>
2022-08-25HID: uclogic: Refactor UGEE v2 string descriptor parsingJosé Expósito1-0/+159
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>