summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-uclogic-params.h
diff options
context:
space:
mode:
authorNikolai Kondrashov <spbnick@gmail.com>2022-04-21 19:50:51 +0200
committerJiri Kosina <jkosina@suse.cz>2022-05-06 08:34:31 +0200
commitf5927973f8d667eb93b81f796039c0ef94449866 (patch)
tree685aa35749ca499111453f0f4383c8b0f1ec0e52 /drivers/hid/hid-uclogic-params.h
parentd64a6e4460d6415df37590ecb76fad6bd5f2c8a6 (diff)
HID: uclogic: Support disabling pen usage
Restore the ability to disable pen usage in hid-uclogic to support e.g. keyboard interfaces which also have pen usages for some reason, but which we don't want to rewrite report descriptors for. 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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hid/hid-uclogic-params.h b/drivers/hid/hid-uclogic-params.h
index fa75efba3130..fb2001018c46 100644
--- a/drivers/hid/hid-uclogic-params.h
+++ b/drivers/hid/hid-uclogic-params.h
@@ -62,6 +62,11 @@ struct uclogic_params_pen_subreport {
*/
struct uclogic_params_pen {
/*
+ * True if pen usage is invalid for this interface and should be
+ * ignored, false otherwise.
+ */
+ bool usage_invalid;
+ /*
* Pointer to report descriptor part describing the pen inputs.
* Allocated with kmalloc. NULL if the part is not specified.
*/
@@ -214,6 +219,7 @@ extern int uclogic_params_init(struct uclogic_params *params,
".desc_ptr = %p\n" \
".desc_size = %u\n" \
".pen = {\n" \
+ "\t.usage_invalid = %s\n" \
"\t.desc_ptr = %p\n" \
"\t.desc_size = %u\n" \
"\t.id = %u\n" \
@@ -270,6 +276,7 @@ extern int uclogic_params_init(struct uclogic_params *params,
((_params)->invalid ? "true" : "false"), \
(_params)->desc_ptr, \
(_params)->desc_size, \
+ ((_params)->pen.usage_invalid ? "true" : "false"), \
(_params)->pen.desc_ptr, \
(_params)->pen.desc_size, \
(_params)->pen.id, \