From 867c8925442579f7c4a8901f02a54fb07e99c2be Mon Sep 17 00:00:00 2001 From: José Expósito Date: Sat, 11 Jun 2022 13:39:13 +0200 Subject: HID: uclogic: Allow to generate frame templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Jiri Kosina --- drivers/hid/hid-uclogic-rdesc.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/hid/hid-uclogic-rdesc.h') 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 -- cgit v1.2.3