summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-uclogic-rdesc.h
diff options
context:
space:
mode:
authorJosé Expósito <jose.exposito89@gmail.com>2022-06-11 13:39:13 +0200
committerJiri Kosina <jkosina@suse.cz>2022-06-15 15:51:46 +0200
commit867c8925442579f7c4a8901f02a54fb07e99c2be (patch)
tree3b10c702082d30b5458c860fbeae2a1f5e26a50f /drivers/hid/hid-uclogic-rdesc.h
parent2d167aaba3864cf8f46b8364aa33e780de1da8f4 (diff)
downloadlinux-867c8925442579f7c4a8901f02a54fb07e99c2be.tar.bz2
HID: uclogic: Allow to generate frame templates
Add a new template placeholder to allow configuring the number of buttons in the drawing tablet frame and update the KUnit tests to cover the new case. Signed-off-by: José Expósito <jose.exposito89@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-uclogic-rdesc.h')
-rw-r--r--drivers/hid/hid-uclogic-rdesc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hid/hid-uclogic-rdesc.h b/drivers/hid/hid-uclogic-rdesc.h
index 9d37090c39d1..3d78299f082d 100644
--- a/drivers/hid/hid-uclogic-rdesc.h
+++ b/drivers/hid/hid-uclogic-rdesc.h
@@ -82,6 +82,7 @@ extern const size_t uclogic_rdesc_twha60_fixed1_size;
/* Report descriptor template placeholder head */
#define UCLOGIC_RDESC_PEN_PH_HEAD 0xFE, 0xED, 0x1D
+#define UCLOGIC_RDESC_FRAME_PH_BTN_HEAD 0xFE, 0xED
/* Apply report descriptor parameters to a report descriptor template */
extern __u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr,
@@ -96,6 +97,7 @@ enum uclogic_rdesc_ph_id {
UCLOGIC_RDESC_PEN_PH_ID_Y_LM,
UCLOGIC_RDESC_PEN_PH_ID_Y_PM,
UCLOGIC_RDESC_PEN_PH_ID_PRESSURE_LM,
+ UCLOGIC_RDESC_FRAME_PH_ID_UM,
UCLOGIC_RDESC_PH_ID_NUM
};
@@ -103,6 +105,10 @@ enum uclogic_rdesc_ph_id {
#define UCLOGIC_RDESC_PEN_PH(_ID) \
UCLOGIC_RDESC_PEN_PH_HEAD, UCLOGIC_RDESC_PEN_PH_ID_##_ID
+/* Report descriptor frame buttons template placeholder */
+#define UCLOGIC_RDESC_FRAME_PH_BTN \
+ UCLOGIC_RDESC_FRAME_PH_BTN_HEAD, UCLOGIC_RDESC_FRAME_PH_ID_UM
+
/* Report ID for v1 pen reports */
#define UCLOGIC_RDESC_V1_PEN_ID 0x07