Skip to content

Commit f7d8e38

Browse files
spbnickJiri Kosina
authored andcommitted
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/[email protected]/ Signed-off-by: Nikolai Kondrashov <[email protected]> Signed-off-by: José Expósito <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 61b1db5 commit f7d8e38

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

drivers/hid/hid-kye.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static __u8 easypen_i405x_rdesc_fixed[] = {
3333
0xB1, 0x02, /* Feature (Variable), */
3434
0xC0, /* End Collection, */
3535
0x05, 0x0D, /* Usage Page (Digitizer), */
36-
0x09, 0x02, /* Usage (Pen), */
36+
0x09, 0x01, /* Usage (Digitizer), */
3737
0xA1, 0x01, /* Collection (Application), */
3838
0x85, 0x10, /* Report ID (16), */
3939
0x09, 0x20, /* Usage (Stylus), */
@@ -91,7 +91,7 @@ static __u8 mousepen_i608x_rdesc_fixed[] = {
9191
0xB1, 0x02, /* Feature (Variable), */
9292
0xC0, /* End Collection, */
9393
0x05, 0x0D, /* Usage Page (Digitizer), */
94-
0x09, 0x02, /* Usage (Pen), */
94+
0x09, 0x01, /* Usage (Digitizer), */
9595
0xA1, 0x01, /* Collection (Application), */
9696
0x85, 0x10, /* Report ID (16), */
9797
0x09, 0x20, /* Usage (Stylus), */
@@ -190,7 +190,7 @@ static __u8 mousepen_i608x_v2_rdesc_fixed[] = {
190190
0xB1, 0x02, /* Feature (Variable), */
191191
0xC0, /* End Collection, */
192192
0x05, 0x0D, /* Usage Page (Digitizer), */
193-
0x09, 0x02, /* Usage (Pen), */
193+
0x09, 0x01, /* Usage (Digitizer), */
194194
0xA1, 0x01, /* Collection (Application), */
195195
0x85, 0x10, /* Report ID (16), */
196196
0x09, 0x20, /* Usage (Stylus), */
@@ -289,7 +289,7 @@ static __u8 easypen_m610x_rdesc_fixed[] = {
289289
0xB1, 0x02, /* Feature (Variable), */
290290
0xC0, /* End Collection, */
291291
0x05, 0x0D, /* Usage Page (Digitizer), */
292-
0x09, 0x02, /* Usage (Pen), */
292+
0x09, 0x01, /* Usage (Digitizer), */
293293
0xA1, 0x01, /* Collection (Application), */
294294
0x85, 0x10, /* Report ID (16), */
295295
0x09, 0x20, /* Usage (Stylus), */
@@ -368,7 +368,7 @@ static __u8 pensketch_m912_rdesc_fixed[] = {
368368
0xB1, 0x02, /* Feature (Variable), */
369369
0xC0, /* End Collection, */
370370
0x05, 0x0D, /* Usage Page (Digitizer), */
371-
0x09, 0x02, /* Usage (Pen), */
371+
0x09, 0x01, /* Usage (Digitizer), */
372372
0xA1, 0x01, /* Collection (Application), */
373373
0x85, 0x10, /* Report ID (16), */
374374
0x09, 0x20, /* Usage (Stylus), */
@@ -497,7 +497,7 @@ static __u8 easypen_m406xe_rdesc_fixed[] = {
497497
0xB1, 0x02, /* Feature (Variable), */
498498
0xC0, /* End Collection, */
499499
0x05, 0x0D, /* Usage Page (Digitizer), */
500-
0x09, 0x02, /* Usage (Pen), */
500+
0x09, 0x01, /* Usage (Digitizer), */
501501
0xA1, 0x01, /* Collection (Application), */
502502
0x85, 0x10, /* Report ID (16), */
503503
0x09, 0x20, /* Usage (Stylus), */

drivers/hid/hid-uclogic-rdesc.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/* Fixed WP4030U report descriptor */
2222
__u8 uclogic_rdesc_wp4030u_fixed_arr[] = {
2323
0x05, 0x0D, /* Usage Page (Digitizer), */
24-
0x09, 0x02, /* Usage (Pen), */
24+
0x09, 0x01, /* Usage (Digitizer), */
2525
0xA1, 0x01, /* Collection (Application), */
2626
0x85, 0x09, /* Report ID (9), */
2727
0x09, 0x20, /* Usage (Stylus), */
@@ -66,7 +66,7 @@ const size_t uclogic_rdesc_wp4030u_fixed_size =
6666
/* Fixed WP5540U report descriptor */
6767
__u8 uclogic_rdesc_wp5540u_fixed_arr[] = {
6868
0x05, 0x0D, /* Usage Page (Digitizer), */
69-
0x09, 0x02, /* Usage (Pen), */
69+
0x09, 0x01, /* Usage (Digitizer), */
7070
0xA1, 0x01, /* Collection (Application), */
7171
0x85, 0x09, /* Report ID (9), */
7272
0x09, 0x20, /* Usage (Stylus), */
@@ -143,7 +143,7 @@ const size_t uclogic_rdesc_wp5540u_fixed_size =
143143
/* Fixed WP8060U report descriptor */
144144
__u8 uclogic_rdesc_wp8060u_fixed_arr[] = {
145145
0x05, 0x0D, /* Usage Page (Digitizer), */
146-
0x09, 0x02, /* Usage (Pen), */
146+
0x09, 0x01, /* Usage (Digitizer), */
147147
0xA1, 0x01, /* Collection (Application), */
148148
0x85, 0x09, /* Report ID (9), */
149149
0x09, 0x20, /* Usage (Stylus), */
@@ -220,7 +220,7 @@ const size_t uclogic_rdesc_wp8060u_fixed_size =
220220
/* Fixed WP1062 report descriptor */
221221
__u8 uclogic_rdesc_wp1062_fixed_arr[] = {
222222
0x05, 0x0D, /* Usage Page (Digitizer), */
223-
0x09, 0x02, /* Usage (Pen), */
223+
0x09, 0x01, /* Usage (Digitizer), */
224224
0xA1, 0x01, /* Collection (Application), */
225225
0x85, 0x09, /* Report ID (9), */
226226
0x09, 0x20, /* Usage (Stylus), */
@@ -268,7 +268,7 @@ const size_t uclogic_rdesc_wp1062_fixed_size =
268268
/* Fixed PF1209 report descriptor */
269269
__u8 uclogic_rdesc_pf1209_fixed_arr[] = {
270270
0x05, 0x0D, /* Usage Page (Digitizer), */
271-
0x09, 0x02, /* Usage (Pen), */
271+
0x09, 0x01, /* Usage (Digitizer), */
272272
0xA1, 0x01, /* Collection (Application), */
273273
0x85, 0x09, /* Report ID (9), */
274274
0x09, 0x20, /* Usage (Stylus), */
@@ -345,7 +345,7 @@ const size_t uclogic_rdesc_pf1209_fixed_size =
345345
/* Fixed PID 0522 tablet report descriptor, interface 0 (stylus) */
346346
__u8 uclogic_rdesc_twhl850_fixed0_arr[] = {
347347
0x05, 0x0D, /* Usage Page (Digitizer), */
348-
0x09, 0x02, /* Usage (Pen), */
348+
0x09, 0x01, /* Usage (Digitizer), */
349349
0xA1, 0x01, /* Collection (Application), */
350350
0x85, 0x09, /* Report ID (9), */
351351
0x09, 0x20, /* Usage (Stylus), */
@@ -457,7 +457,7 @@ const size_t uclogic_rdesc_twhl850_fixed2_size =
457457
/* Fixed TWHA60 report descriptor, interface 0 (stylus) */
458458
__u8 uclogic_rdesc_twha60_fixed0_arr[] = {
459459
0x05, 0x0D, /* Usage Page (Digitizer), */
460-
0x09, 0x02, /* Usage (Pen), */
460+
0x09, 0x01, /* Usage (Digitizer), */
461461
0xA1, 0x01, /* Collection (Application), */
462462
0x85, 0x09, /* Report ID (9), */
463463
0x09, 0x20, /* Usage (Stylus), */
@@ -534,7 +534,7 @@ const size_t uclogic_rdesc_twha60_fixed1_size =
534534
/* Fixed report descriptor template for (tweaked) v1 pen reports */
535535
const __u8 uclogic_rdesc_v1_pen_template_arr[] = {
536536
0x05, 0x0D, /* Usage Page (Digitizer), */
537-
0x09, 0x02, /* Usage (Pen), */
537+
0x09, 0x01, /* Usage (Digitizer), */
538538
0xA1, 0x01, /* Collection (Application), */
539539
0x85, 0x07, /* Report ID (7), */
540540
0x09, 0x20, /* Usage (Stylus), */
@@ -588,7 +588,7 @@ const size_t uclogic_rdesc_v1_pen_template_size =
588588
/* Fixed report descriptor template for (tweaked) v2 pen reports */
589589
const __u8 uclogic_rdesc_v2_pen_template_arr[] = {
590590
0x05, 0x0D, /* Usage Page (Digitizer), */
591-
0x09, 0x02, /* Usage (Pen), */
591+
0x09, 0x01, /* Usage (Digitizer), */
592592
0xA1, 0x01, /* Collection (Application), */
593593
0x85, 0x08, /* Report ID (8), */
594594
0x09, 0x20, /* Usage (Stylus), */

drivers/hid/hid-viewsonic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/* Fixed report descriptor of PD1011 signature pad */
2525
static __u8 pd1011_rdesc_fixed[] = {
2626
0x05, 0x0D, /* Usage Page (Digitizer), */
27-
0x09, 0x02, /* Usage (Pen), */
27+
0x09, 0x01, /* Usage (Digitizer), */
2828
0xA1, 0x01, /* Collection (Application), */
2929
0x85, 0x02, /* Report ID (2), */
3030
0x09, 0x20, /* Usage (Stylus), */

0 commit comments

Comments
 (0)