Commit f7d8e387 authored by Nikolai Kondrashov's avatar Nikolai Kondrashov Committed by Jiri Kosina

HID: uclogic: Switch to Digitizer usage for styluses

The (incorrect) "Pen" (0x02) application usage used in replacement
report descriptors throughout the drivers leads to all tablets
recognized as a "direct" input device (i.e. a tablet monitor) by
recent kernels, which messes up desktop environments [1].

Replace the application usage with "Digitizer" (0x01) for each
non-display graphics tablet.

[1] https://lore.kernel.org/linux-input/f39ce5d5-bd5b-bd3f-3ea2-9b2a89ba1eb1@gmail.com/Signed-off-by: default avatarNikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: default avatarJosé Expósito <jose.exposito89@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 61b1db5a
...@@ -33,7 +33,7 @@ static __u8 easypen_i405x_rdesc_fixed[] = { ...@@ -33,7 +33,7 @@ static __u8 easypen_i405x_rdesc_fixed[] = {
0xB1, 0x02, /* Feature (Variable), */ 0xB1, 0x02, /* Feature (Variable), */
0xC0, /* End Collection, */ 0xC0, /* End Collection, */
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x10, /* Report ID (16), */ 0x85, 0x10, /* Report ID (16), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
...@@ -91,7 +91,7 @@ static __u8 mousepen_i608x_rdesc_fixed[] = { ...@@ -91,7 +91,7 @@ static __u8 mousepen_i608x_rdesc_fixed[] = {
0xB1, 0x02, /* Feature (Variable), */ 0xB1, 0x02, /* Feature (Variable), */
0xC0, /* End Collection, */ 0xC0, /* End Collection, */
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x10, /* Report ID (16), */ 0x85, 0x10, /* Report ID (16), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
...@@ -190,7 +190,7 @@ static __u8 mousepen_i608x_v2_rdesc_fixed[] = { ...@@ -190,7 +190,7 @@ static __u8 mousepen_i608x_v2_rdesc_fixed[] = {
0xB1, 0x02, /* Feature (Variable), */ 0xB1, 0x02, /* Feature (Variable), */
0xC0, /* End Collection, */ 0xC0, /* End Collection, */
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x10, /* Report ID (16), */ 0x85, 0x10, /* Report ID (16), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
...@@ -289,7 +289,7 @@ static __u8 easypen_m610x_rdesc_fixed[] = { ...@@ -289,7 +289,7 @@ static __u8 easypen_m610x_rdesc_fixed[] = {
0xB1, 0x02, /* Feature (Variable), */ 0xB1, 0x02, /* Feature (Variable), */
0xC0, /* End Collection, */ 0xC0, /* End Collection, */
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x10, /* Report ID (16), */ 0x85, 0x10, /* Report ID (16), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
...@@ -368,7 +368,7 @@ static __u8 pensketch_m912_rdesc_fixed[] = { ...@@ -368,7 +368,7 @@ static __u8 pensketch_m912_rdesc_fixed[] = {
0xB1, 0x02, /* Feature (Variable), */ 0xB1, 0x02, /* Feature (Variable), */
0xC0, /* End Collection, */ 0xC0, /* End Collection, */
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x10, /* Report ID (16), */ 0x85, 0x10, /* Report ID (16), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
...@@ -497,7 +497,7 @@ static __u8 easypen_m406xe_rdesc_fixed[] = { ...@@ -497,7 +497,7 @@ static __u8 easypen_m406xe_rdesc_fixed[] = {
0xB1, 0x02, /* Feature (Variable), */ 0xB1, 0x02, /* Feature (Variable), */
0xC0, /* End Collection, */ 0xC0, /* End Collection, */
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x10, /* Report ID (16), */ 0x85, 0x10, /* Report ID (16), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
/* Fixed WP4030U report descriptor */ /* Fixed WP4030U report descriptor */
__u8 uclogic_rdesc_wp4030u_fixed_arr[] = { __u8 uclogic_rdesc_wp4030u_fixed_arr[] = {
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x09, /* Report ID (9), */ 0x85, 0x09, /* Report ID (9), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
...@@ -66,7 +66,7 @@ const size_t uclogic_rdesc_wp4030u_fixed_size = ...@@ -66,7 +66,7 @@ const size_t uclogic_rdesc_wp4030u_fixed_size =
/* Fixed WP5540U report descriptor */ /* Fixed WP5540U report descriptor */
__u8 uclogic_rdesc_wp5540u_fixed_arr[] = { __u8 uclogic_rdesc_wp5540u_fixed_arr[] = {
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x09, /* Report ID (9), */ 0x85, 0x09, /* Report ID (9), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
...@@ -143,7 +143,7 @@ const size_t uclogic_rdesc_wp5540u_fixed_size = ...@@ -143,7 +143,7 @@ const size_t uclogic_rdesc_wp5540u_fixed_size =
/* Fixed WP8060U report descriptor */ /* Fixed WP8060U report descriptor */
__u8 uclogic_rdesc_wp8060u_fixed_arr[] = { __u8 uclogic_rdesc_wp8060u_fixed_arr[] = {
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x09, /* Report ID (9), */ 0x85, 0x09, /* Report ID (9), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
...@@ -220,7 +220,7 @@ const size_t uclogic_rdesc_wp8060u_fixed_size = ...@@ -220,7 +220,7 @@ const size_t uclogic_rdesc_wp8060u_fixed_size =
/* Fixed WP1062 report descriptor */ /* Fixed WP1062 report descriptor */
__u8 uclogic_rdesc_wp1062_fixed_arr[] = { __u8 uclogic_rdesc_wp1062_fixed_arr[] = {
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x09, /* Report ID (9), */ 0x85, 0x09, /* Report ID (9), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
...@@ -268,7 +268,7 @@ const size_t uclogic_rdesc_wp1062_fixed_size = ...@@ -268,7 +268,7 @@ const size_t uclogic_rdesc_wp1062_fixed_size =
/* Fixed PF1209 report descriptor */ /* Fixed PF1209 report descriptor */
__u8 uclogic_rdesc_pf1209_fixed_arr[] = { __u8 uclogic_rdesc_pf1209_fixed_arr[] = {
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x09, /* Report ID (9), */ 0x85, 0x09, /* Report ID (9), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
...@@ -345,7 +345,7 @@ const size_t uclogic_rdesc_pf1209_fixed_size = ...@@ -345,7 +345,7 @@ const size_t uclogic_rdesc_pf1209_fixed_size =
/* Fixed PID 0522 tablet report descriptor, interface 0 (stylus) */ /* Fixed PID 0522 tablet report descriptor, interface 0 (stylus) */
__u8 uclogic_rdesc_twhl850_fixed0_arr[] = { __u8 uclogic_rdesc_twhl850_fixed0_arr[] = {
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x09, /* Report ID (9), */ 0x85, 0x09, /* Report ID (9), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
...@@ -457,7 +457,7 @@ const size_t uclogic_rdesc_twhl850_fixed2_size = ...@@ -457,7 +457,7 @@ const size_t uclogic_rdesc_twhl850_fixed2_size =
/* Fixed TWHA60 report descriptor, interface 0 (stylus) */ /* Fixed TWHA60 report descriptor, interface 0 (stylus) */
__u8 uclogic_rdesc_twha60_fixed0_arr[] = { __u8 uclogic_rdesc_twha60_fixed0_arr[] = {
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x09, /* Report ID (9), */ 0x85, 0x09, /* Report ID (9), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
...@@ -534,7 +534,7 @@ const size_t uclogic_rdesc_twha60_fixed1_size = ...@@ -534,7 +534,7 @@ const size_t uclogic_rdesc_twha60_fixed1_size =
/* Fixed report descriptor template for (tweaked) v1 pen reports */ /* Fixed report descriptor template for (tweaked) v1 pen reports */
const __u8 uclogic_rdesc_v1_pen_template_arr[] = { const __u8 uclogic_rdesc_v1_pen_template_arr[] = {
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x07, /* Report ID (7), */ 0x85, 0x07, /* Report ID (7), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
...@@ -588,7 +588,7 @@ const size_t uclogic_rdesc_v1_pen_template_size = ...@@ -588,7 +588,7 @@ const size_t uclogic_rdesc_v1_pen_template_size =
/* Fixed report descriptor template for (tweaked) v2 pen reports */ /* Fixed report descriptor template for (tweaked) v2 pen reports */
const __u8 uclogic_rdesc_v2_pen_template_arr[] = { const __u8 uclogic_rdesc_v2_pen_template_arr[] = {
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x08, /* Report ID (8), */ 0x85, 0x08, /* Report ID (8), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
/* Fixed report descriptor of PD1011 signature pad */ /* Fixed report descriptor of PD1011 signature pad */
static __u8 pd1011_rdesc_fixed[] = { static __u8 pd1011_rdesc_fixed[] = {
0x05, 0x0D, /* Usage Page (Digitizer), */ 0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */ 0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */ 0xA1, 0x01, /* Collection (Application), */
0x85, 0x02, /* Report ID (2), */ 0x85, 0x02, /* Report ID (2), */
0x09, 0x20, /* Usage (Stylus), */ 0x09, 0x20, /* Usage (Stylus), */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment