summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-uclogic-params.h
diff options
context:
space:
mode:
authorNikolai Kondrashov <spbnick@gmail.com>2019-02-10 13:13:55 +0300
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>2019-02-21 14:00:53 +0300
commit59f2e0fca8ca84f02a718c0f3cd72990d03545be (patch)
treea1880fa7f704051aa357d0900ff0438791d03c62 /drivers/hid/hid-uclogic-params.h
parent01309e29eb95c16bd48984f2589fad0cbf5e27d1 (diff)
downloadlinux-59f2e0fca8ca84f02a718c0f3cd72990d03545be.tar.xz
HID: uclogic: Support fragmented high-res reports
Support parsing fragmented high-resolution reports in hid-uclogic to support v2 reporting protocol. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Diffstat (limited to 'drivers/hid/hid-uclogic-params.h')
-rw-r--r--drivers/hid/hid-uclogic-params.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/hid/hid-uclogic-params.h b/drivers/hid/hid-uclogic-params.h
index 665954d6ba57..1060f70d647d 100644
--- a/drivers/hid/hid-uclogic-params.h
+++ b/drivers/hid/hid-uclogic-params.h
@@ -56,6 +56,12 @@ struct uclogic_params_pen {
unsigned int id;
/* Type of in-range reporting, only valid if "id" is not zero */
enum uclogic_params_pen_inrange inrange;
+ /*
+ * True, if reports include fragmented high resolution coords, with
+ * high-order X and then Y bytes following the pressure field.
+ * Only valid if "id" is not zero.
+ */
+ bool fragmented_hires;
};
/*
@@ -151,6 +157,7 @@ extern int uclogic_params_init(struct uclogic_params *params,
".pen.desc_size = %u\n" \
".pen.id = %u\n" \
".pen.inrange = %s\n" \
+ ".pen.fragmented_hires = %s\n" \
".frame.desc_ptr = %p\n" \
".frame.desc_size = %u\n" \
".frame.id = %u\n" \
@@ -166,6 +173,7 @@ extern int uclogic_params_init(struct uclogic_params *params,
(_params)->pen.desc_size, \
(_params)->pen.id, \
uclogic_params_pen_inrange_to_str((_params)->pen.inrange), \
+ ((_params)->pen.fragmented_hires ? "true" : "false"), \
(_params)->frame.desc_ptr, \
(_params)->frame.desc_size, \
(_params)->frame.id, \