aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorNikolai Kondrashov <spbnick@gmail.com>2012-03-06 02:54:23 -0500
committerJiri Kosina <jkosina@suse.cz>2012-03-06 05:20:54 -0500
commit56d27dd6ec6e832b3b22b0c0fab960476b9694fc (patch)
tree34e6fa7d25ccc74a39428dc2f33ffb0616e5ae66 /drivers
parent51153a78dfd090529472735ba1a4e7f50ac7542f (diff)
HID: waltop: Replace original rdescs with links
Replace original report descriptor dumps in the comments with links to tablet descriptions in a wiki, to make code clearer. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hid/hid-waltop.c803
1 files changed, 15 insertions, 788 deletions
diff --git a/drivers/hid/hid-waltop.c b/drivers/hid/hid-waltop.c
index 0ec169646ec..c1dce51b1c1 100644
--- a/drivers/hid/hid-waltop.c
+++ b/drivers/hid/hid-waltop.c
@@ -43,139 +43,14 @@
43 */ 43 */
44 44
45/* 45/*
46 * Original Slim Tablet 5.8 inch report descriptor. 46 * See Slim Tablet 5.8 inch description, device and HID report descriptors at
47 * 47 * http://sf.net/apps/mediawiki/digimend/?title=Waltop_Slim_Tablet_5.8%22
48 * All the reports except the report with ID 16 (the stylus) are unused,
49 * possibly because the tablet is not configured to, or because they were
50 * just copied from a more capable model. The full purpose of features
51 * described for report ID 2 is unknown.
52 *
53 * The stylus buttons are described as three bit fields, whereas actually
54 * it's an "array", i.e. they're reported as button numbers (1, 2 and 3).
55 * The "eraser" field is not used. There is also a "push" without a "pop" in
56 * the stylus description.
57 *
58 * Usage Page (Desktop), ; Generic desktop controls (01h)
59 * Usage (Mouse), ; Mouse (02h, application collection)
60 * Collection (Application),
61 * Report ID (1),
62 * Usage (Pointer), ; Pointer (01h, physical collection)
63 * Collection (Physical),
64 * Usage Page (Button), ; Button (09h)
65 * Usage Minimum (01h),
66 * Usage Maximum (05h),
67 * Logical Minimum (0),
68 * Logical Maximum (1),
69 * Report Size (1),
70 * Report Count (5),
71 * Input (Variable),
72 * Report Size (3),
73 * Report Count (1),
74 * Input (Constant, Variable),
75 * Usage Page (Desktop), ; Generic desktop controls (01h)
76 * Usage (X), ; X (30h, dynamic value)
77 * Usage (Y), ; Y (31h, dynamic value)
78 * Usage (Wheel), ; Wheel (38h, dynamic value)
79 * Logical Minimum (-127),
80 * Logical Maximum (127),
81 * Report Size (8),
82 * Report Count (3),
83 * Input (Variable, Relative),
84 * End Collection,
85 * End Collection,
86 * Usage Page (Digitizer), ; Digitizer (0Dh)
87 * Usage (Pen), ; Pen (02h, application collection)
88 * Collection (Application),
89 * Report ID (2),
90 * Usage (Stylus), ; Stylus (20h, logical collection)
91 * Collection (Physical),
92 * Usage (00h),
93 * Logical Minimum (0),
94 * Logical Maximum (255),
95 * Report Size (8),
96 * Report Count (7),
97 * Input (Variable),
98 * Usage (Azimuth), ; Azimuth (3Fh, dynamic value)
99 * Usage (Altitude), ; Altitude (40h, dynamic value)
100 * Logical Minimum (0),
101 * Logical Maximum (255),
102 * Report Size (8),
103 * Report Count (2),
104 * Feature (Variable),
105 * End Collection,
106 * Report ID (5),
107 * Usage Page (Digitizer), ; Digitizer (0Dh)
108 * Usage (Stylus), ; Stylus (20h, logical collection)
109 * Collection (Physical),
110 * Usage (00h),
111 * Logical Minimum (0),
112 * Logical Maximum (255),
113 * Report Size (8),
114 * Report Count (7),
115 * Input (Variable),
116 * End Collection,
117 * Report ID (10),
118 * Usage Page (Digitizer), ; Digitizer (0Dh)
119 * Usage (Stylus), ; Stylus (20h, logical collection)
120 * Collection (Physical),
121 * Usage (00h),
122 * Logical Minimum (0),
123 * Logical Maximum (255),
124 * Report Size (8),
125 * Report Count (3),
126 * Input (Variable),
127 * End Collection,
128 * Report ID (16),
129 * Usage (Stylus), ; Stylus (20h, logical collection)
130 * Collection (Physical),
131 * Usage (Tip Switch), ; Tip switch (42h, momentary control)
132 * Usage (Barrel Switch), ; Barrel switch (44h, momentary control)
133 * Usage (Invert), ; Invert (3Ch, momentary control)
134 * Usage (Eraser), ; Eraser (45h, momentary control)
135 * Usage (In Range), ; In range (32h, momentary control)
136 * Logical Minimum (0),
137 * Logical Maximum (1),
138 * Report Size (1),
139 * Report Count (5),
140 * Input (Variable),
141 * Report Count (3),
142 * Input (Constant, Variable),
143 * Usage Page (Desktop), ; Generic desktop controls (01h)
144 * Usage (X), ; X (30h, dynamic value)
145 * Report Size (16),
146 * Report Count (1),
147 * Push,
148 * Unit Exponent (13),
149 * Unit (Inch^3),
150 * Logical Minimum (0),
151 * Logical Maximum (10000),
152 * Physical Minimum (0),
153 * Physical Maximum (10000),
154 * Input (Variable),
155 * Usage (Y), ; Y (31h, dynamic value)
156 * Logical Maximum (6000),
157 * Physical Maximum (6000),
158 * Input (Variable),
159 * Usage Page (Digitizer), ; Digitizer (0Dh)
160 * Usage (Tip Pressure), ; Tip pressure (30h, dynamic value)
161 * Logical Minimum (0),
162 * Logical Maximum (1023),
163 * Physical Minimum (0),
164 * Physical Maximum (1023),
165 * Input (Variable),
166 * End Collection,
167 * End Collection
168 */ 48 */
169 49
170/* Size of the original report descriptor of Slim Tablet 5.8 inch */ 50/* Size of the original report descriptor of Slim Tablet 5.8 inch */
171#define SLIM_TABLET_5_8_INCH_RDESC_ORIG_SIZE 222 51#define SLIM_TABLET_5_8_INCH_RDESC_ORIG_SIZE 222
172 52
173/* 53/* Fixed Slim Tablet 5.8 inch descriptor */
174 * Fixed Slim Tablet 5.8 inch descriptor.
175 *
176 * All the reports except the stylus report (ID 16) were removed as unused.
177 * The stylus buttons description was fixed.
178 */
179static __u8 slim_tablet_5_8_inch_rdesc_fixed[] = { 54static __u8 slim_tablet_5_8_inch_rdesc_fixed[] = {
180 0x05, 0x0D, /* Usage Page (Digitizer), */ 55 0x05, 0x0D, /* Usage Page (Digitizer), */
181 0x09, 0x02, /* Usage (Pen), */ 56 0x09, 0x02, /* Usage (Pen), */
@@ -224,158 +99,14 @@ static __u8 slim_tablet_5_8_inch_rdesc_fixed[] = {
224}; 99};
225 100
226/* 101/*
227 * Original Slim Tablet 12.1 inch report descriptor. 102 * See Slim Tablet 12.1 inch description, device and HID report descriptors at
228 * 103 * http://sf.net/apps/mediawiki/digimend/?title=Waltop_Slim_Tablet_12.1%22
229 * The descriptor is similar to the Slim Tablet 5.8 inch descriptor with the
230 * addition of a keyboard report, seemingly unused. It may have get here
231 * from a Media Tablet - probably an unimplemented feature.
232 *
233 * Usage Page (Desktop), ; Generic desktop controls (01h)
234 * Usage (Mouse), ; Mouse (02h, application collection)
235 * Collection (Application),
236 * Report ID (1),
237 * Usage (Pointer), ; Pointer (01h, physical collection)
238 * Collection (Physical),
239 * Usage Page (Button), ; Button (09h)
240 * Usage Minimum (01h),
241 * Usage Maximum (05h),
242 * Logical Minimum (0),
243 * Logical Maximum (1),
244 * Report Size (1),
245 * Report Count (5),
246 * Input (Variable),
247 * Report Size (3),
248 * Report Count (1),
249 * Input (Constant, Variable),
250 * Usage Page (Desktop), ; Generic desktop controls (01h)
251 * Usage (X), ; X (30h, dynamic value)
252 * Usage (Y), ; Y (31h, dynamic value)
253 * Usage (Wheel), ; Wheel (38h, dynamic value)
254 * Logical Minimum (-127),
255 * Logical Maximum (127),
256 * Report Size (8),
257 * Report Count (3),
258 * Input (Variable, Relative),
259 * End Collection,
260 * End Collection,
261 * Usage Page (Digitizer), ; Digitizer (0Dh)
262 * Usage (Pen), ; Pen (02h, application collection)
263 * Collection (Application),
264 * Report ID (2),
265 * Usage (Stylus), ; Stylus (20h, logical collection)
266 * Collection (Physical),
267 * Usage (00h),
268 * Logical Minimum (0),
269 * Logical Maximum (255),
270 * Report Size (8),
271 * Report Count (7),
272 * Input (Variable),
273 * Usage (Azimuth), ; Azimuth (3Fh, dynamic value)
274 * Usage (Altitude), ; Altitude (40h, dynamic value)
275 * Logical Minimum (0),
276 * Logical Maximum (255),
277 * Report Size (8),
278 * Report Count (2),
279 * Feature (Variable),
280 * End Collection,
281 * Report ID (5),
282 * Usage Page (Digitizer), ; Digitizer (0Dh)
283 * Usage (Stylus), ; Stylus (20h, logical collection)
284 * Collection (Physical),
285 * Usage (00h),
286 * Logical Minimum (0),
287 * Logical Maximum (255),
288 * Report Size (8),
289 * Report Count (7),
290 * Input (Variable),
291 * End Collection,
292 * Report ID (10),
293 * Usage Page (Digitizer), ; Digitizer (0Dh)
294 * Usage (Stylus), ; Stylus (20h, logical collection)
295 * Collection (Physical),
296 * Usage (00h),
297 * Logical Minimum (0),
298 * Logical Maximum (255),
299 * Report Size (8),
300 * Report Count (3),
301 * Input (Variable),
302 * End Collection,
303 * Report ID (16),
304 * Usage (Stylus), ; Stylus (20h, logical collection)
305 * Collection (Physical),
306 * Usage (Tip Switch), ; Tip switch (42h, momentary control)
307 * Usage (Barrel Switch), ; Barrel switch (44h, momentary control)
308 * Usage (Invert), ; Invert (3Ch, momentary control)
309 * Usage (Eraser), ; Eraser (45h, momentary control)
310 * Usage (In Range), ; In range (32h, momentary control)
311 * Logical Minimum (0),
312 * Logical Maximum (1),
313 * Report Size (1),
314 * Report Count (5),
315 * Input (Variable),
316 * Report Count (3),
317 * Input (Constant, Variable),
318 * Usage Page (Desktop), ; Generic desktop controls (01h)
319 * Usage (X), ; X (30h, dynamic value)
320 * Report Size (16),
321 * Report Count (1),
322 * Push,
323 * Unit Exponent (13),
324 * Unit (Inch^3),
325 * Logical Minimum (0),
326 * Logical Maximum (20000),
327 * Physical Minimum (0),
328 * Physical Maximum (20000),
329 * Input (Variable),
330 * Usage (Y), ; Y (31h, dynamic value)
331 * Logical Maximum (12500),
332 * Physical Maximum (12500),
333 * Input (Variable),
334 * Usage Page (Digitizer), ; Digitizer (0Dh)
335 * Usage (Tip Pressure), ; Tip pressure (30h, dynamic value)
336 * Logical Minimum (0),
337 * Logical Maximum (1023),
338 * Physical Minimum (0),
339 * Physical Maximum (1023),
340 * Input (Variable),
341 * End Collection,
342 * End Collection,
343 * Usage Page (Desktop), ; Generic desktop controls (01h)
344 * Usage (Keyboard), ; Keyboard (06h, application collection)
345 * Collection (Application),
346 * Report ID (13),
347 * Usage Page (Keyboard), ; Keyboard/keypad (07h)
348 * Usage Minimum (KB Leftcontrol), ; Keyboard left control
349 * ; (E0h, dynamic value)
350 * Usage Maximum (KB Right GUI), ; Keyboard right GUI (E7h, dynamic value)
351 * Logical Minimum (0),
352 * Logical Maximum (1),
353 * Report Size (1),
354 * Report Count (8),
355 * Input (Variable),
356 * Report Size (8),
357 * Report Count (1),
358 * Input (Constant),
359 * Usage Page (Keyboard), ; Keyboard/keypad (07h)
360 * Usage Minimum (None), ; No event (00h, selector)
361 * Usage Maximum (KB Application), ; Keyboard Application (65h, selector)
362 * Logical Minimum (0),
363 * Logical Maximum (101),
364 * Report Size (8),
365 * Report Count (5),
366 * Input,
367 * End Collection
368 */ 104 */
369 105
370/* Size of the original report descriptor of Slim Tablet 12.1 inch */ 106/* Size of the original report descriptor of Slim Tablet 12.1 inch */
371#define SLIM_TABLET_12_1_INCH_RDESC_ORIG_SIZE 269 107#define SLIM_TABLET_12_1_INCH_RDESC_ORIG_SIZE 269
372 108
373/* 109/* Fixed Slim Tablet 12.1 inch descriptor */
374 * Fixed Slim Tablet 12.1 inch descriptor.
375 *
376 * All the reports except the stylus report (ID 16) were removed as unused.
377 * The stylus buttons description was fixed.
378 */
379static __u8 slim_tablet_12_1_inch_rdesc_fixed[] = { 110static __u8 slim_tablet_12_1_inch_rdesc_fixed[] = {
380 0x05, 0x0D, /* Usage Page (Digitizer), */ 111 0x05, 0x0D, /* Usage Page (Digitizer), */
381 0x09, 0x02, /* Usage (Pen), */ 112 0x09, 0x02, /* Usage (Pen), */
@@ -424,142 +155,14 @@ static __u8 slim_tablet_12_1_inch_rdesc_fixed[] = {
424}; 155};
425 156
426/* 157/*
427 * Original Q Pad report descriptor. 158 * See Q Pad description, device and HID report descriptors at
428 * 159 * http://sf.net/apps/mediawiki/digimend/?title=Waltop_Q_Pad
429 * The descriptor is similar to the Slim Tablet 5.8 inch descriptor with the
430 * addition of consumer AC Pan field to the report ID 1, which seems to be
431 * unused in the default mode. However, this tablet has resolution of 2048 LPI.
432 *
433 * Usage Page (Desktop), ; Generic desktop controls (01h)
434 * Usage (Mouse), ; Mouse (02h, application collection)
435 * Collection (Application),
436 * Report ID (1),
437 * Usage (Pointer), ; Pointer (01h, physical collection)
438 * Collection (Physical),
439 * Usage Page (Button), ; Button (09h)
440 * Usage Minimum (01h),
441 * Usage Maximum (05h),
442 * Logical Minimum (0),
443 * Logical Maximum (1),
444 * Report Size (1),
445 * Report Count (5),
446 * Input (Variable),
447 * Report Size (3),
448 * Report Count (1),
449 * Input (Constant, Variable),
450 * Usage Page (Desktop), ; Generic desktop controls (01h)
451 * Usage (X), ; X (30h, dynamic value)
452 * Usage (Y), ; Y (31h, dynamic value)
453 * Usage (Wheel), ; Wheel (38h, dynamic value)
454 * Logical Minimum (-127),
455 * Logical Maximum (127),
456 * Report Size (8),
457 * Report Count (3),
458 * Input (Variable, Relative),
459 * Usage Page (Consumer), ; Consumer (0Ch)
460 * Logical Minimum (-127),
461 * Logical Maximum (127),
462 * Report Size (8),
463 * Report Count (1),
464 * Usage (AC Pan), ; AC pan (0238h, linear control)
465 * Input (Variable, Relative),
466 * End Collection,
467 * End Collection,
468 * Usage Page (Digitizer), ; Digitizer (0Dh)
469 * Usage (Pen), ; Pen (02h, application collection)
470 * Collection (Application),
471 * Report ID (2),
472 * Usage (Stylus), ; Stylus (20h, logical collection)
473 * Collection (Physical),
474 * Usage (00h),
475 * Logical Minimum (0),
476 * Logical Maximum (255),
477 * Report Size (8),
478 * Report Count (7),
479 * Input (Variable),
480 * Usage (Azimuth), ; Azimuth (3Fh, dynamic value)
481 * Usage (Altitude), ; Altitude (40h, dynamic value)
482 * Logical Minimum (0),
483 * Logical Maximum (255),
484 * Report Size (8),
485 * Report Count (2),
486 * Feature (Variable),
487 * End Collection,
488 * Report ID (5),
489 * Usage Page (Digitizer), ; Digitizer (0Dh)
490 * Usage (Stylus), ; Stylus (20h, logical collection)
491 * Collection (Physical),
492 * Usage (00h),
493 * Logical Minimum (0),
494 * Logical Maximum (255),
495 * Report Size (8),
496 * Report Count (7),
497 * Input (Variable),
498 * End Collection,
499 * Report ID (10),
500 * Usage Page (Digitizer), ; Digitizer (0Dh)
501 * Usage (Stylus), ; Stylus (20h, logical collection)
502 * Collection (Physical),
503 * Usage (00h),
504 * Logical Minimum (0),
505 * Logical Maximum (255),
506 * Report Size (8),
507 * Report Count (7),
508 * Input (Variable),
509 * End Collection,
510 * Report ID (16),
511 * Usage (Stylus), ; Stylus (20h, logical collection)
512 * Collection (Physical),
513 * Usage (Tip Switch), ; Tip switch (42h, momentary control)
514 * Usage (Barrel Switch), ; Barrel switch (44h, momentary control)
515 * Usage (Invert), ; Invert (3Ch, momentary control)
516 * Usage (Eraser), ; Eraser (45h, momentary control)
517 * Usage (In Range), ; In range (32h, momentary control)
518 * Logical Minimum (0),
519 * Logical Maximum (1),
520 * Report Size (1),
521 * Report Count (5),
522 * Input (Variable),
523 * Report Count (3),
524 * Input (Constant, Variable),
525 * Usage Page (Desktop), ; Generic desktop controls (01h)
526 * Usage (X), ; X (30h, dynamic value)
527 * Report Size (16),
528 * Report Count (1),
529 * Push,
530 * Unit Exponent (13),
531 * Unit (Inch^3),
532 * Logical Minimum (0),
533 * Logical Maximum (12288),
534 * Physical Minimum (0),
535 * Physical Maximum (12288),
536 * Input (Variable),
537 * Usage (Y), ; Y (31h, dynamic value)
538 * Logical Minimum (0),
539 * Logical Maximum (9216),
540 * Physical Minimum (0),
541 * Physical Maximum (9216),
542 * Input (Variable),
543 * Usage Page (Digitizer), ; Digitizer (0Dh)
544 * Usage (Tip Pressure), ; Tip pressure (30h, dynamic value)
545 * Logical Minimum (0),
546 * Logical Maximum (1023),
547 * Physical Minimum (0),
548 * Physical Maximum (1023),
549 * Input (Variable),
550 * End Collection,
551 * End Collection
552 */ 160 */
553 161
554/* Size of the original report descriptor of Q Pad */ 162/* Size of the original report descriptor of Q Pad */
555#define Q_PAD_RDESC_ORIG_SIZE 241 163#define Q_PAD_RDESC_ORIG_SIZE 241
556 164
557/* 165/* Fixed Q Pad descriptor */
558 * Fixed Q Pad descriptor.
559 *
560 * All the reports except the stylus report (ID 16) were removed as unused.
561 * The stylus buttons description was fixed.
562 */
563static __u8 q_pad_rdesc_fixed[] = { 166static __u8 q_pad_rdesc_fixed[] = {
564 0x05, 0x0D, /* Usage Page (Digitizer), */ 167 0x05, 0x0D, /* Usage Page (Digitizer), */
565 0x09, 0x02, /* Usage (Pen), */ 168 0x09, 0x02, /* Usage (Pen), */
@@ -608,217 +211,14 @@ static __u8 q_pad_rdesc_fixed[] = {
608}; 211};
609 212
610/* 213/*
611 * Original Media Tablet 10.6 inch report descriptor. 214 * See Media Tablet 10.6 inch description, device and HID report descriptors at
612 * 215 * http://sf.net/apps/mediawiki/digimend/?title=Waltop_Media_Tablet_10.6%22
613 * There are at least two versions of this model in the wild. They are
614 * represented by Genius G-Pen M609 (older version) and Genius G-Pen M609X
615 * (newer version).
616 *
617 * Both versions have the usual pen with two barrel buttons and two
618 * identical wheels with center buttons in the top corners of the tablet
619 * base. They also have buttons on the top, between the wheels, for
620 * selecting the wheels' functions and wide/standard mode. In the wide mode
621 * the whole working surface is sensed, in the standard mode a narrower area
622 * is sensed, but the logical report extents remain the same. These modes
623 * correspond roughly to 16:9 and 4:3 aspect ratios respectively.
624 *
625 * The older version has three wheel function buttons ("scroll", "zoom" and
626 * "volume") and two separate buttons for wide and standard mode. The newer
627 * version has four wheel function buttons (plus "brush") and only one
628 * button is used for selecting wide/standard mode. So, the total number of
629 * buttons remains the same, but one of the mode buttons is repurposed as a
630 * wheels' function button in the newer version.
631 *
632 * The wheel functions are:
633 * scroll - the wheels act as scroll wheels, the center buttons switch
634 * between vertical and horizontal scrolling;
635 * zoom - the wheels zoom in/out, the buttons supposedly reset to 100%;
636 * volume - the wheels control the sound volume, the buttons mute;
637 * brush - the wheels are supposed to control brush width in a graphics
638 * editor, the buttons do nothing.
639 *
640 * Below is the newer version's report descriptor. It may very well be that
641 * the older version's descriptor is different and thus it won't be
642 * supported.
643 *
644 * The mouse report (ID 1) only uses the wheel field for reporting the tablet
645 * wheels' scroll mode. The keyboard report (ID 13) is used to report the
646 * wheels' zoom and brush control functions as key presses. The report ID 12
647 * is used to report the wheels' volume control functions. The stylus report
648 * (ID 16) has the same problems as the Slim Tablet 5.8 inch report has.
649 *
650 * The rest of the reports are unused, at least in the default configuration.
651 * The purpose of the features is unknown.
652 *
653 * Usage Page (Desktop),
654 * Usage (Mouse),
655 * Collection (Application),
656 * Report ID (1),
657 * Usage (Pointer),
658 * Collection (Physical),
659 * Usage Page (Button),
660 * Usage Minimum (01h),
661 * Usage Maximum (05h),
662 * Logical Minimum (0),
663 * Logical Maximum (1),
664 * Report Size (1),
665 * Report Count (5),
666 * Input (Variable),
667 * Report Size (3),
668 * Report Count (1),
669 * Input (Constant, Variable),
670 * Usage Page (Desktop),
671 * Usage (X),
672 * Usage (Y),
673 * Usage (Wheel),
674 * Logical Minimum (-127),
675 * Logical Maximum (127),
676 * Report Size (8),
677 * Report Count (3),
678 * Input (Variable, Relative),
679 * End Collection,
680 * End Collection,
681 * Usage Page (Digitizer),
682 * Usage (Pen),
683 * Collection (Application),
684 * Report ID (2),
685 * Usage (Stylus),
686 * Collection (Physical),
687 * Usage (00h),
688 * Logical Minimum (0),
689 * Logical Maximum (255),
690 * Report Size (8),
691 * Report Count (7),
692 * Input (Variable),
693 * Usage (Azimuth),
694 * Usage (Altitude),
695 * Logical Minimum (0),
696 * Logical Maximum (255),
697 * Report Size (8),
698 * Report Count (2),
699 * Feature (Variable),
700 * End Collection,
701 * Report ID (5),
702 * Usage Page (Digitizer),
703 * Usage (Stylus),
704 * Collection (Physical),
705 * Usage (00h),
706 * Logical Minimum (0),
707 * Logical Maximum (255),
708 * Report Size (8),
709 * Report Count (7),
710 * Input (Variable),
711 * End Collection,
712 * Report ID (10),
713 * Usage Page (Digitizer),
714 * Usage (Stylus),
715 * Collection (Physical),
716 * Usage (00h),
717 * Logical Minimum (0),
718 * Logical Maximum (255),
719 * Report Size (8),
720 * Report Count (7),
721 * Input (Variable),
722 * End Collection,
723 * Report ID (16),
724 * Usage (Stylus),
725 * Collection (Physical),
726 * Usage (Tip Switch),
727 * Usage (Barrel Switch),
728 * Usage (Invert),
729 * Usage (Eraser),
730 * Usage (In Range),
731 * Logical Minimum (0),
732 * Logical Maximum (1),
733 * Report Size (1),
734 * Report Count (5),
735 * Input (Variable),
736 * Report Count (3),
737 * Input (Constant, Variable),
738 * Usage Page (Desktop),
739 * Usage (X),
740 * Report Size (16),
741 * Report Count (1),
742 * Push,
743 * Unit Exponent (13),
744 * Unit (Inch^3),
745 * Logical Minimum (0),
746 * Logical Maximum (18000),
747 * Physical Minimum (0),
748 * Physical Maximum (18000),
749 * Input (Variable),
750 * Usage (Y),
751 * Logical Maximum (11000),
752 * Physical Maximum (11000),
753 * Input (Variable),
754 * Usage Page (Digitizer),
755 * Usage (Tip Pressure),
756 * Logical Minimum (0),
757 * Logical Maximum (1023),
758 * Physical Minimum (0),
759 * Physical Maximum (1023),
760 * Input (Variable),
761 * End Collection,
762 * End Collection,
763 * Usage Page (Desktop),
764 * Usage (Keyboard),
765 * Collection (Application),
766 * Report ID (13),
767 * Usage Page (Keyboard),
768 * Usage Minimum (KB Leftcontrol),
769 * Usage Maximum (KB Right GUI),
770 * Logical Minimum (0),
771 * Logical Maximum (1),
772 * Report Size (1),
773 * Report Count (8),
774 * Input (Variable),
775 * Report Size (8),
776 * Report Count (1),
777 * Input (Constant),
778 * Usage Page (Keyboard),
779 * Usage Minimum (None),
780 * Usage Maximum (KB Application),
781 * Logical Minimum (0),
782 * Logical Maximum (101),
783 * Report Size (8),
784 * Report Count (5),
785 * Input,
786 * End Collection,
787 * Usage Page (Consumer),
788 * Usage (Consumer Control),
789 * Collection (Application),
790 * Report ID (12),
791 * Usage (Volume Inc),
792 * Usage (Volume Dec),
793 * Usage (Mute),
794 * Logical Minimum (0),
795 * Logical Maximum (1),
796 * Report Size (1),
797 * Report Count (3),
798 * Input (Variable, Relative),
799 * Report Size (5),
800 * Report Count (1),
801 * Input (Constant, Variable, Relative),
802 * End Collection
803 */ 216 */
804 217
805/* Size of the original report descriptor of Media Tablet 10.6 inch */ 218/* Size of the original report descriptor of Media Tablet 10.6 inch */
806#define MEDIA_TABLET_10_6_INCH_RDESC_ORIG_SIZE 300 219#define MEDIA_TABLET_10_6_INCH_RDESC_ORIG_SIZE 300
807 220
808/* 221/* Fixed Media Tablet 10.6 inch descriptor */
809 * Fixed Media Tablet 10.6 inch descriptor.
810 *
811 * The descriptions of reports unused in the default configuration are
812 * removed. The stylus report (ID 16) is fixed similarly to Slim Tablet 5.8
813 * inch. The unused mouse report (ID 1) fields are replaced with constant
814 * padding.
815 *
816 * The keyboard report (ID 13) is hacked to instead have an "array" field
817 * reporting consumer page controls, and all the unused bits are masked out
818 * with constant padding. The "brush" wheels' function is represented as "Scan
819 * Previous/Next Track" controls due to the lack of brush controls in the
820 * usage tables specification.
821 */
822static __u8 media_tablet_10_6_inch_rdesc_fixed[] = { 222static __u8 media_tablet_10_6_inch_rdesc_fixed[] = {
823 0x05, 0x0D, /* Usage Page (Digitizer), */ 223 0x05, 0x0D, /* Usage Page (Digitizer), */
824 0x09, 0x02, /* Usage (Pen), */ 224 0x09, 0x02, /* Usage (Pen), */
@@ -929,187 +329,14 @@ static __u8 media_tablet_10_6_inch_rdesc_fixed[] = {
929}; 329};
930 330
931/* 331/*
932 * Original Media Tablet 14.1 inch report descriptor. 332 * See Media Tablet 14.1 inch description, device and HID report descriptors at
933 * 333 * http://sf.net/apps/mediawiki/digimend/?title=Waltop_Media_Tablet_14.1%22
934 * There are at least two versions of this model in the wild. They are
935 * represented by Genius G-Pen M712 (older version) and Genius G-Pen M712X
936 * (newer version). The hardware difference between these versions is the same
937 * as between older and newer versions of Media Tablet 10.6 inch. The report
938 * descriptors are identical for both versions.
939 *
940 * The function, behavior and report descriptor of this tablet is similar to
941 * that of Media Tablet 10.6 inch. However, there is one more field (with
942 * Consumer AC Pan usage) in the mouse description. Then the tablet X and Y
943 * logical extents both get scaled to 0..16383 range (a hardware limit?),
944 * which kind of defeats the advertised 4000 LPI resolution, considering the
945 * physical extents of 12x7.25 inches. Plus, reports 5, 10 and 255 are used
946 * sometimes (while moving the pen) with unknown purpose. Also, the key codes
947 * generated for zoom in/out are different.
948 *
949 * Usage Page (Desktop),
950 * Usage (Mouse),
951 * Collection (Application),
952 * Report ID (1),
953 * Usage (Pointer),
954 * Collection (Physical),
955 * Usage Page (Button),
956 * Usage Minimum (01h),
957 * Usage Maximum (05h),
958 * Logical Minimum (0),
959 * Logical Maximum (1),
960 * Report Size (1),
961 * Report Count (5),
962 * Input (Variable),
963 * Report Size (3),
964 * Report Count (1),
965 * Input (Constant, Variable),
966 * Usage Page (Desktop),
967 * Usage (X),
968 * Usage (Y),
969 * Usage (Wheel),
970 * Logical Minimum (-127),
971 * Logical Maximum (127),
972 * Report Size (8),
973 * Report Count (3),
974 * Input (Variable, Relative),
975 * Usage Page (Consumer),
976 * Logical Minimum (-127),
977 * Logical Maximum (127),
978 * Report Size (8),
979 * Report Count (1),
980 * Usage (AC Pan),
981 * Input (Variable, Relative),
982 * End Collection,
983 * End Collection,
984 * Usage Page (Digitizer),
985 * Usage (Pen),
986 * Collection (Application),
987 * Report ID (2),
988 * Usage (Stylus),
989 * Collection (Physical),
990 * Usage (00h),
991 * Logical Minimum (0),
992 * Logical Maximum (255),
993 * Report Size (8),
994 * Report Count (7),
995 * Input (Variable),
996 * Usage (Azimuth),
997 * Usage (Altitude),
998 * Logical Minimum (0),
999 * Logical Maximum (255),
1000 * Report Size (8),
1001 * Report Count (2),
1002 * Feature (Variable),
1003 * End Collection,
1004 * Report ID (5),
1005 * Usage Page (Digitizer),
1006 * Usage (Stylus),
1007 * Collection (Physical),
1008 * Usage (00h),
1009 * Logical Minimum (0),
1010 * Logical Maximum (255),
1011 * Report Size (8),
1012 * Report Count (7),
1013 * Input (Variable),
1014 * End Collection,
1015 * Report ID (10),
1016 * Usage Page (Digitizer),
1017 * Usage (Stylus),
1018 * Collection (Physical),
1019 * Usage (00h),
1020 * Logical Minimum (0),
1021 * Logical Maximum (255),
1022 * Report Size (8),
1023 * Report Count (7),
1024 * Input (Variable),
1025 * End Collection,
1026 * Report ID (16),
1027 * Usage (Stylus),
1028 * Collection (Physical),
1029 * Usage (Tip Switch),
1030 * Usage (Barrel Switch),
1031 * Usage (Invert),
1032 * Usage (Eraser),
1033 * Usage (In Range),
1034 * Logical Minimum (0),
1035 * Logical Maximum (1),
1036 * Report Size (1),
1037 * Report Count (5),
1038 * Input (Variable),
1039 * Report Count (3),
1040 * Input (Constant, Variable),
1041 * Usage Page (Desktop),
1042 * Usage (X),
1043 * Report Size (16),
1044 * Report Count (1),
1045 * Push,
1046 * Unit Exponent (13),
1047 * Unit (Inch^3),
1048 * Logical Minimum (0),
1049 * Logical Maximum (16383),
1050 * Physical Minimum (0),
1051 * Physical Maximum (16383),
1052 * Input (Variable),
1053 * Usage (Y),
1054 * Input (Variable),
1055 * Usage Page (Digitizer),
1056 * Usage (Tip Pressure),
1057 * Logical Minimum (0),
1058 * Logical Maximum (1023),
1059 * Physical Minimum (0),
1060 * Physical Maximum (1023),
1061 * Input (Variable),
1062 * End Collection,
1063 * End Collection,
1064 * Usage Page (Desktop),
1065 * Usage (Keyboard),
1066 * Collection (Application),
1067 * Report ID (13),
1068 * Usage Page (Keyboard),
1069 * Usage Minimum (KB Leftcontrol),
1070 * Usage Maximum (KB Right GUI),
1071 * Logical Minimum (0),
1072 * Logical Maximum (1),
1073 * Report Size (1),
1074 * Report Count (8),
1075 * Input (Variable),
1076 * Report Size (8),
1077 * Report Count (1),
1078 * Input (Constant),
1079 * Usage Page (Keyboard),
1080 * Usage Minimum (None),
1081 * Usage Maximum (KB Application),
1082 * Logical Minimum (0),
1083 * Logical Maximum (101),
1084 * Report Size (8),
1085 * Report Count (5),
1086 * Input,
1087 * End Collection,
1088 * Usage Page (Consumer),
1089 * Usage (Consumer Control),
1090 * Collection (Application),
1091 * Report ID (12),
1092 * Usage (Volume Inc),
1093 * Usage (Volume Dec),
1094 * Usage (Mute),
1095 * Logical Minimum (0),
1096 * Logical Maximum (1),
1097 * Report Size (1),
1098 * Report Count (3),
1099 * Input (Variable, Relative),
1100 * Report Size (5),
1101 * Report Count (1),
1102 * Input (Constant, Variable, Relative),
1103 * End Collection
1104 */ 334 */
1105 335
1106/* Size of the original report descriptor of Media Tablet 14.1 inch */ 336/* Size of the original report descriptor of Media Tablet 14.1 inch */
1107#define MEDIA_TABLET_14_1_INCH_RDESC_ORIG_SIZE 309 337#define MEDIA_TABLET_14_1_INCH_RDESC_ORIG_SIZE 309
1108 338
1109/* 339/* Fixed Media Tablet 14.1 inch descriptor */
1110 * Fixed Media Tablet 14.1 inch descriptor.
1111 * It is fixed similarly to the Media Tablet 10.6 inch descriptor.
1112 */
1113static __u8 media_tablet_14_1_inch_rdesc_fixed[] = { 340static __u8 media_tablet_14_1_inch_rdesc_fixed[] = {
1114 0x05, 0x0D, /* Usage Page (Digitizer), */ 341 0x05, 0x0D, /* Usage Page (Digitizer), */
1115 0x09, 0x02, /* Usage (Pen), */ 342 0x09, 0x02, /* Usage (Pen), */