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)
commita092986fc095b963383b948a5c74dd1d202d21b5
treef6bf4cd76c8b54a7ac891b28c02e7da1b5b5e530
parent86402296784f656427245edd0546cac39d410b07
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