summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-uclogic-params.h
diff options
context:
space:
mode:
authorNikolai Kondrashov <spbnick@gmail.com>2022-02-19 13:01:51 +0300
committerJiri Kosina <jkosina@suse.cz>2022-03-01 17:28:14 +0300
commite6be956fd7e834428a940e23442c5d934c1c8835 (patch)
tree87a29c73d81314f114b741ebbbb8db18e561dac4 /drivers/hid/hid-uclogic-params.h
parent8b013098be2c91ea5e15225c8b39ace08fdd7448 (diff)
downloadlinux-e6be956fd7e834428a940e23442c5d934c1c8835.tar.xz
HID: uclogic: Switch to matching subreport bytes
Switch from matching UC-Logic subreport with a mask to a full value to support detecting Huion HS610 touch dial reports. Those would match the button mask otherwise. 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.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/hid/hid-uclogic-params.h b/drivers/hid/hid-uclogic-params.h
index 82db8ab36fec..c18569591b75 100644
--- a/drivers/hid/hid-uclogic-params.h
+++ b/drivers/hid/hid-uclogic-params.h
@@ -39,14 +39,15 @@ extern const char *uclogic_params_pen_inrange_to_str(
*/
struct uclogic_params_pen_subreport {
/*
- * The subreport's bitmask matching the second byte of the pen report.
- * If zero, the subreport is considered invalid, and won't match.
+ * The value of the second byte of the pen report indicating this
+ * subreport. If zero, the subreport should be considered invalid and
+ * not matched.
*/
- __u8 mask;
+ __u8 value;
/*
- * The ID to be assigned to the report, if the "mask" matches.
- * Only valid if "mask" is not zero.
+ * The ID to be assigned to the report, if the second byte of the pen
+ * report is equal to "value". Only valid if "value" is not zero.
*/
__u8 id;
};
@@ -200,7 +201,7 @@ extern int uclogic_params_init(struct uclogic_params *params,
(_params)->pen.desc_ptr, \
(_params)->pen.desc_size, \
(_params)->pen.id, \
- (_params)->pen.subreport_list[0].mask, \
+ (_params)->pen.subreport_list[0].value, \
(_params)->pen.subreport_list[0].id, \
uclogic_params_pen_inrange_to_str((_params)->pen.inrange), \
((_params)->pen.fragmented_hires ? "true" : "false"), \