diff options
author | Nikolai Kondrashov <spbnick@gmail.com> | 2022-03-03 08:47:32 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2022-04-11 16:51:52 +0200 |
commit | ee0070367e1da844e385562fb4f33453b7f7c587 (patch) | |
tree | 5976824cc04bf551bfc9a7063b68501deda690e5 /drivers/hid/hid-uclogic-params.h | |
parent | HID: uclogic: Add support for touch ring reports (diff) | |
download | linux-ee0070367e1da844e385562fb4f33453b7f7c587.tar.xz linux-ee0070367e1da844e385562fb4f33453b7f7c587.zip |
HID: uclogic: Support custom device suffix for frames
Support assigning custom device name suffixes to frame input devices
instead of just "Pad". This allows distinguishing multiple frame input
devices, e.g. for Huion HS610.
Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
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-params.h')
-rw-r--r-- | drivers/hid/hid-uclogic-params.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hid/hid-uclogic-params.h b/drivers/hid/hid-uclogic-params.h index fe13bc36983b..8042820e78b1 100644 --- a/drivers/hid/hid-uclogic-params.h +++ b/drivers/hid/hid-uclogic-params.h @@ -115,6 +115,10 @@ struct uclogic_params_frame { */ unsigned int id; /* + * The suffix to add to the input device name, if not NULL. + */ + const char *suffix; + /* * Number of the least-significant bit of the 2-bit state of a rotary * encoder, in the report. Cannot point to a 2-bit field crossing a * byte boundary. Zero if not present. Only valid if "id" is not zero. @@ -212,6 +216,7 @@ extern int uclogic_params_init(struct uclogic_params *params, ".frame_list[0].desc_ptr = %p\n" \ ".frame_list[0].desc_size = %u\n" \ ".frame_list[0].id = %u\n" \ + ".frame_list[0].suffix = %s\n" \ ".frame_list[0].re_lsb = %u\n" \ ".frame_list[0].dev_id_byte = %u\n" \ ".frame_list[0].touch_ring_byte = %u\n" \ @@ -234,6 +239,7 @@ extern int uclogic_params_init(struct uclogic_params *params, (_params)->frame_list[0].desc_ptr, \ (_params)->frame_list[0].desc_size, \ (_params)->frame_list[0].id, \ + (_params)->frame_list[0].suffix, \ (_params)->frame_list[0].re_lsb, \ (_params)->frame_list[0].dev_id_byte, \ (_params)->frame_list[0].touch_ring_byte, \ |