]> git.baikalelectronics.ru Git - kernel.git/commit
HID: uclogic: Parse the UGEE v2 frame type
authorJosé Expósito <jose.exposito89@gmail.com>
Mon, 15 Aug 2022 14:29:52 +0000 (16:29 +0200)
committerJiri Kosina <jkosina@suse.cz>
Thu, 25 Aug 2022 08:26:31 +0000 (10:26 +0200)
commitd8da1a5a17a149f1667e03c0ec330f3b0c16aabc
treef6bf4cd76c8b54a7ac891b28c02e7da1b5b5e530
parent474d6f68bc26e58e807f4035291a736ea277ab15
HID: uclogic: Parse the UGEE v2 frame type

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>
drivers/hid/hid-uclogic-params-test.c
drivers/hid/hid-uclogic-params.c
drivers/hid/hid-uclogic-params.h