Lines Matching +full:0 +full:x392
93 switch (data[0]) { in wacom_penpartner_irq()
95 if (data[5] & 0x80) { in wacom_penpartner_irq()
96 wacom->tool[0] = (data[5] & 0x20) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN; in wacom_penpartner_irq()
97 wacom->id[0] = (data[5] & 0x20) ? ERASER_DEVICE_ID : STYLUS_DEVICE_ID; in wacom_penpartner_irq()
98 input_report_key(input, wacom->tool[0], 1); in wacom_penpartner_irq()
99 input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */ in wacom_penpartner_irq()
104 input_report_key(input, BTN_STYLUS, (data[5] & 0x40)); in wacom_penpartner_irq()
106 input_report_key(input, wacom->tool[0], 0); in wacom_penpartner_irq()
107 input_report_abs(input, ABS_MISC, 0); /* report tool id */ in wacom_penpartner_irq()
109 input_report_key(input, BTN_TOUCH, 0); in wacom_penpartner_irq()
119 input_report_key(input, BTN_TOUCH, ((signed char)data[6] > -80) && !(data[5] & 0x20)); in wacom_penpartner_irq()
120 input_report_key(input, BTN_STYLUS, (data[5] & 0x40)); in wacom_penpartner_irq()
125 "%s: received unknown report #%d\n", __func__, data[0]); in wacom_penpartner_irq()
126 return 0; in wacom_penpartner_irq()
139 if (data[0] != WACOM_REPORT_PENABLED) { in wacom_pl_irq()
141 "%s: received unknown report #%d\n", __func__, data[0]); in wacom_pl_irq()
142 return 0; in wacom_pl_irq()
145 prox = data[1] & 0x40; in wacom_pl_irq()
147 if (!wacom->id[0]) { in wacom_pl_irq()
148 if ((data[0] & 0x10) || (data[4] & 0x20)) { in wacom_pl_irq()
149 wacom->tool[0] = BTN_TOOL_RUBBER; in wacom_pl_irq()
150 wacom->id[0] = ERASER_DEVICE_ID; in wacom_pl_irq()
153 wacom->tool[0] = BTN_TOOL_PEN; in wacom_pl_irq()
154 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_pl_irq()
162 if (wacom->tool[0] == BTN_TOOL_RUBBER && !(data[4] & 0x20)) { in wacom_pl_irq()
163 input_report_key(input, BTN_TOOL_RUBBER, 0); in wacom_pl_irq()
164 input_report_abs(input, ABS_MISC, 0); in wacom_pl_irq()
166 wacom->tool[0] = BTN_TOOL_PEN; in wacom_pl_irq()
167 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_pl_irq()
176 input_report_abs(input, ABS_X, data[3] | (data[2] << 7) | ((data[1] & 0x03) << 14)); in wacom_pl_irq()
177 input_report_abs(input, ABS_Y, data[6] | (data[5] << 7) | ((data[4] & 0x03) << 14)); in wacom_pl_irq()
180 input_report_key(input, BTN_TOUCH, data[4] & 0x08); in wacom_pl_irq()
181 input_report_key(input, BTN_STYLUS, data[4] & 0x10); in wacom_pl_irq()
183 input_report_key(input, BTN_STYLUS2, (wacom->tool[0] == BTN_TOOL_PEN) && (data[4] & 0x20)); in wacom_pl_irq()
187 wacom->id[0] = 0; in wacom_pl_irq()
188 input_report_key(input, wacom->tool[0], prox); in wacom_pl_irq()
189 input_report_abs(input, ABS_MISC, wacom->id[0]); in wacom_pl_irq()
198 if (data[0] != WACOM_REPORT_PENABLED) { in wacom_ptu_irq()
200 "%s: received unknown report #%d\n", __func__, data[0]); in wacom_ptu_irq()
201 return 0; in wacom_ptu_irq()
204 if (data[1] & 0x04) { in wacom_ptu_irq()
205 input_report_key(input, BTN_TOOL_RUBBER, data[1] & 0x20); in wacom_ptu_irq()
206 input_report_key(input, BTN_TOUCH, data[1] & 0x08); in wacom_ptu_irq()
207 wacom->id[0] = ERASER_DEVICE_ID; in wacom_ptu_irq()
209 input_report_key(input, BTN_TOOL_PEN, data[1] & 0x20); in wacom_ptu_irq()
210 input_report_key(input, BTN_TOUCH, data[1] & 0x01); in wacom_ptu_irq()
211 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_ptu_irq()
213 input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */ in wacom_ptu_irq()
217 input_report_key(input, BTN_STYLUS, data[1] & 0x02); in wacom_ptu_irq()
218 input_report_key(input, BTN_STYLUS2, data[1] & 0x10); in wacom_ptu_irq()
226 int prox = data[1] & 0x20; in wacom_dtu_irq()
229 "%s: received report #%d", __func__, data[0]); in wacom_dtu_irq()
233 wacom->tool[0] = (data[1] & 0x0c) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN; in wacom_dtu_irq()
234 if (wacom->tool[0] == BTN_TOOL_PEN) in wacom_dtu_irq()
235 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_dtu_irq()
237 wacom->id[0] = ERASER_DEVICE_ID; in wacom_dtu_irq()
239 input_report_key(input, BTN_STYLUS, data[1] & 0x02); in wacom_dtu_irq()
240 input_report_key(input, BTN_STYLUS2, data[1] & 0x10); in wacom_dtu_irq()
243 input_report_abs(input, ABS_PRESSURE, ((data[7] & 0x01) << 8) | data[6]); in wacom_dtu_irq()
244 input_report_key(input, BTN_TOUCH, data[1] & 0x05); in wacom_dtu_irq()
246 wacom->id[0] = 0; in wacom_dtu_irq()
247 input_report_key(input, wacom->tool[0], prox); in wacom_dtu_irq()
248 input_report_abs(input, ABS_MISC, wacom->id[0]); in wacom_dtu_irq()
256 unsigned short prox, pressure = 0; in wacom_dtus_irq()
258 if (data[0] != WACOM_REPORT_DTUS && data[0] != WACOM_REPORT_DTUSPAD) { in wacom_dtus_irq()
260 "%s: received unknown report #%d", __func__, data[0]); in wacom_dtus_irq()
261 return 0; in wacom_dtus_irq()
262 } else if (data[0] == WACOM_REPORT_DTUSPAD) { in wacom_dtus_irq()
264 input_report_key(input, BTN_0, (data[1] & 0x01)); in wacom_dtus_irq()
265 input_report_key(input, BTN_1, (data[1] & 0x02)); in wacom_dtus_irq()
266 input_report_key(input, BTN_2, (data[1] & 0x04)); in wacom_dtus_irq()
267 input_report_key(input, BTN_3, (data[1] & 0x08)); in wacom_dtus_irq()
269 data[1] & 0x0f ? PAD_DEVICE_ID : 0); in wacom_dtus_irq()
272 prox = data[1] & 0x80; in wacom_dtus_irq()
276 wacom->tool[0] = BTN_TOOL_RUBBER; in wacom_dtus_irq()
277 wacom->id[0] = ERASER_DEVICE_ID; in wacom_dtus_irq()
281 wacom->tool[0] = BTN_TOOL_PEN; in wacom_dtus_irq()
282 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_dtus_irq()
287 input_report_key(input, BTN_STYLUS, data[1] & 0x20); in wacom_dtus_irq()
288 input_report_key(input, BTN_STYLUS2, data[1] & 0x40); in wacom_dtus_irq()
291 pressure = ((data[1] & 0x03) << 8) | (data[2] & 0xff); in wacom_dtus_irq()
296 wacom->id[0] = 0; in wacom_dtus_irq()
297 input_report_key(input, wacom->tool[0], prox); in wacom_dtus_irq()
298 input_report_abs(input, ABS_MISC, wacom->id[0]); in wacom_dtus_irq()
311 int rw = 0; in wacom_graphire_irq()
312 int retval = 0; in wacom_graphire_irq()
315 if (data[0] != WACOM_REPORT_PENABLED_BT) { in wacom_graphire_irq()
318 data[0]); in wacom_graphire_irq()
321 } else if (data[0] != WACOM_REPORT_PENABLED) { in wacom_graphire_irq()
323 "%s: received unknown report #%d\n", __func__, data[0]); in wacom_graphire_irq()
327 prox = data[1] & 0x80; in wacom_graphire_irq()
328 if (prox || wacom->id[0]) { in wacom_graphire_irq()
332 case 0: /* Pen */ in wacom_graphire_irq()
333 wacom->tool[0] = BTN_TOOL_PEN; in wacom_graphire_irq()
334 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_graphire_irq()
338 wacom->tool[0] = BTN_TOOL_RUBBER; in wacom_graphire_irq()
339 wacom->id[0] = ERASER_DEVICE_ID; in wacom_graphire_irq()
343 input_report_key(input, BTN_MIDDLE, data[1] & 0x04); in wacom_graphire_irq()
347 wacom->tool[0] = BTN_TOOL_MOUSE; in wacom_graphire_irq()
348 wacom->id[0] = CURSOR_DEVICE_ID; in wacom_graphire_irq()
354 if (wacom->tool[0] != BTN_TOOL_MOUSE) { in wacom_graphire_irq()
357 (((__u16) (data[1] & 0x08)) << 5)); in wacom_graphire_irq()
360 ((data[7] & 0x03) << 8)); in wacom_graphire_irq()
361 input_report_key(input, BTN_TOUCH, data[1] & 0x01); in wacom_graphire_irq()
362 input_report_key(input, BTN_STYLUS, data[1] & 0x02); in wacom_graphire_irq()
363 input_report_key(input, BTN_STYLUS2, data[1] & 0x04); in wacom_graphire_irq()
365 input_report_key(input, BTN_LEFT, data[1] & 0x01); in wacom_graphire_irq()
366 input_report_key(input, BTN_RIGHT, data[1] & 0x02); in wacom_graphire_irq()
369 input_report_abs(input, ABS_DISTANCE, data[6] & 0x3f); in wacom_graphire_irq()
370 rw = (data[7] & 0x04) - (data[7] & 0x03); in wacom_graphire_irq()
374 rw = clamp_val(rw, 0, 31); in wacom_graphire_irq()
379 data[1] & 0x04); in wacom_graphire_irq()
380 rw = (data[6] & 0x01) ? -1 : in wacom_graphire_irq()
381 (data[6] & 0x02) ? 1 : 0; in wacom_graphire_irq()
383 rw = 0; in wacom_graphire_irq()
386 input_report_abs(input, ABS_DISTANCE, data[7] & 0x3f); in wacom_graphire_irq()
393 wacom->id[0] = 0; in wacom_graphire_irq()
394 input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */ in wacom_graphire_irq()
395 input_report_key(input, wacom->tool[0], prox); in wacom_graphire_irq()
402 prox = data[7] & 0xf8; in wacom_graphire_irq()
405 input_report_key(pad_input, BTN_BACK, (data[7] & 0x40)); in wacom_graphire_irq()
406 input_report_key(pad_input, BTN_FORWARD, (data[7] & 0x80)); in wacom_graphire_irq()
407 rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); in wacom_graphire_irq()
410 wacom->id[1] = 0; in wacom_graphire_irq()
417 prox = (data[7] & 0xf8) || data[8]; in wacom_graphire_irq()
420 input_report_key(pad_input, BTN_BACK, (data[7] & 0x08)); in wacom_graphire_irq()
421 input_report_key(pad_input, BTN_LEFT, (data[7] & 0x20)); in wacom_graphire_irq()
422 input_report_key(pad_input, BTN_FORWARD, (data[7] & 0x10)); in wacom_graphire_irq()
423 input_report_key(pad_input, BTN_RIGHT, (data[7] & 0x40)); in wacom_graphire_irq()
424 input_report_abs(pad_input, ABS_WHEEL, (data[8] & 0x7f)); in wacom_graphire_irq()
426 wacom->id[1] = 0; in wacom_graphire_irq()
432 prox = data[7] & 0x03; in wacom_graphire_irq()
435 input_report_key(pad_input, BTN_0, (data[7] & 0x02)); in wacom_graphire_irq()
436 input_report_key(pad_input, BTN_1, (data[7] & 0x01)); in wacom_graphire_irq()
438 wacom->id[1] = 0; in wacom_graphire_irq()
447 rw = (data[7] >> 2 & 0x07); in wacom_graphire_irq()
481 int buttons = 0, nbuttons = features->numbered_buttons; in wacom_intuos_pad()
482 int keys = 0, nkeys = 0; in wacom_intuos_pad()
483 int ring1 = 0, ring2 = 0; in wacom_intuos_pad()
484 int strip1 = 0, strip2 = 0; in wacom_intuos_pad()
490 if (!(data[0] == WACOM_REPORT_INTUOSPAD || data[0] == WACOM_REPORT_INTUOS5PAD || in wacom_intuos_pad()
491 data[0] == WACOM_REPORT_CINTIQPAD)) in wacom_intuos_pad()
492 return 0; in wacom_intuos_pad()
495 buttons = (data[3] << 1) | (data[2] & 0x01); in wacom_intuos_pad()
500 buttons = (data[4] << 1) | (data[3] & 0x01); in wacom_intuos_pad()
511 * ((data[3] & 0x1f) << 8) | data[4]) in wacom_intuos_pad()
514 keys = ((data[3] & 0x1C) ? 1<<2 : 0) | in wacom_intuos_pad()
515 ((data[4] & 0xE0) ? 1<<1 : 0) | in wacom_intuos_pad()
516 ((data[4] & 0x07) ? 1<<0 : 0); in wacom_intuos_pad()
517 keyboard = !!(data[4] & 0xE0); in wacom_intuos_pad()
518 info = !!(data[3] & 0x1C); in wacom_intuos_pad()
521 mute_touch = !!(data[4] & 0x07); in wacom_intuos_pad()
526 wrench = !!(data[4] & 0x07); in wacom_intuos_pad()
530 keys = data[2] & 0x07; in wacom_intuos_pad()
532 wrench = !!(data[2] & 0x01); in wacom_intuos_pad()
533 keyboard = !!(data[2] & 0x02); in wacom_intuos_pad()
536 mute_touch = !!(data[2] & 0x04); in wacom_intuos_pad()
541 menu = !!(data[2] & 0x04); in wacom_intuos_pad()
552 * d-pad right -> data[4] & 0x10 in wacom_intuos_pad()
553 * d-pad up -> data[4] & 0x20 in wacom_intuos_pad()
554 * d-pad left -> data[4] & 0x40 in wacom_intuos_pad()
555 * d-pad down -> data[4] & 0x80 in wacom_intuos_pad()
556 * d-pad center -> data[3] & 0x01 in wacom_intuos_pad()
558 buttons = (data[4] << 1) | (data[3] & 0x01); in wacom_intuos_pad()
560 /* d-pad right -> data[2] & 0x10 in wacom_intuos_pad()
561 * d-pad up -> data[2] & 0x20 in wacom_intuos_pad()
562 * d-pad left -> data[2] & 0x40 in wacom_intuos_pad()
563 * d-pad down -> data[2] & 0x80 in wacom_intuos_pad()
564 * d-pad center -> data[1] & 0x01 in wacom_intuos_pad()
567 ((data[1] & 0x04) << 4) | in wacom_intuos_pad()
568 ((data[2] & 0x0F) << 2) | in wacom_intuos_pad()
569 (data[1] & 0x03); in wacom_intuos_pad()
578 buttons = (data[4] << 1) | (data[3] & 0x01); in wacom_intuos_pad()
582 buttons = (data[8] << 10) | ((data[7] & 0x01) << 9) | in wacom_intuos_pad()
583 (data[6] << 1) | (data[5] & 0x01); in wacom_intuos_pad()
587 keys = data[9] & 0x07; in wacom_intuos_pad()
589 info = !!(data[9] & 0x01); in wacom_intuos_pad()
590 wrench = !!(data[9] & 0x02); in wacom_intuos_pad()
593 buttons = ((data[6] & 0x10) << 5) | in wacom_intuos_pad()
594 ((data[5] & 0x10) << 4) | in wacom_intuos_pad()
595 ((data[6] & 0x0F) << 4) | in wacom_intuos_pad()
596 (data[5] & 0x0F); in wacom_intuos_pad()
598 strip1 = ((data[1] & 0x1f) << 8) | data[2]; in wacom_intuos_pad()
599 strip2 = ((data[3] & 0x1f) << 8) | data[4]; in wacom_intuos_pad()
602 prox = (buttons & ~(~0U << nbuttons)) | (keys & ~(~0U << nkeys)) | in wacom_intuos_pad()
603 (ring1 & 0x80) | (ring2 & 0x80) | strip1 | strip2; in wacom_intuos_pad()
607 for (i = 0; i < nkeys; i++) in wacom_intuos_pad()
625 input_report_abs(input, ABS_WHEEL, (ring1 & 0x80) ? (ring1 & 0x7f) : 0); in wacom_intuos_pad()
626 input_report_abs(input, ABS_THROTTLE, (ring2 & 0x80) ? (ring2 & 0x7f) : 0); in wacom_intuos_pad()
628 input_report_key(input, wacom->tool[1], prox ? 1 : 0); in wacom_intuos_pad()
629 input_report_abs(input, ABS_MISC, prox ? PAD_DEVICE_ID : 0); in wacom_intuos_pad()
631 input_event(input, EV_MSC, MSC_SERIAL, 0xffffffff); in wacom_intuos_pad()
638 return (tool_id & ~0xFFF) << 4 | (tool_id & 0xFFF); in wacom_intuos_id_mangle()
646 case 0x812: /* Inking pen */ in wacom_intuos_get_tool_type()
647 case 0x801: /* Intuos3 Inking pen */ in wacom_intuos_get_tool_type()
648 case 0x12802: /* Intuos4/5 Inking Pen */ in wacom_intuos_get_tool_type()
649 case 0x012: in wacom_intuos_get_tool_type()
653 case 0x822: /* Pen */ in wacom_intuos_get_tool_type()
654 case 0x842: in wacom_intuos_get_tool_type()
655 case 0x852: in wacom_intuos_get_tool_type()
656 case 0x823: /* Intuos3 Grip Pen */ in wacom_intuos_get_tool_type()
657 case 0x813: /* Intuos3 Classic Pen */ in wacom_intuos_get_tool_type()
658 case 0x885: /* Intuos3 Marker Pen */ in wacom_intuos_get_tool_type()
659 case 0x802: /* Intuos4/5 13HD/24HD General Pen */ in wacom_intuos_get_tool_type()
660 case 0x804: /* Intuos4/5 13HD/24HD Marker Pen */ in wacom_intuos_get_tool_type()
661 case 0x8e2: /* IntuosHT2 pen */ in wacom_intuos_get_tool_type()
662 case 0x022: in wacom_intuos_get_tool_type()
663 case 0x10804: /* Intuos4/5 13HD/24HD Art Pen */ in wacom_intuos_get_tool_type()
664 case 0x10842: /* MobileStudio Pro Pro Pen slim */ in wacom_intuos_get_tool_type()
665 case 0x14802: /* Intuos4/5 13HD/24HD Classic Pen */ in wacom_intuos_get_tool_type()
666 case 0x16802: /* Cintiq 13HD Pro Pen */ in wacom_intuos_get_tool_type()
667 case 0x18802: /* DTH2242 Pen */ in wacom_intuos_get_tool_type()
668 case 0x10802: /* Intuos4/5 13HD/24HD General Pen */ in wacom_intuos_get_tool_type()
672 case 0x832: /* Stroke pen */ in wacom_intuos_get_tool_type()
673 case 0x032: in wacom_intuos_get_tool_type()
677 case 0x007: /* Mouse 4D and 2D */ in wacom_intuos_get_tool_type()
678 case 0x09c: in wacom_intuos_get_tool_type()
679 case 0x094: in wacom_intuos_get_tool_type()
680 case 0x017: /* Intuos3 2D Mouse */ in wacom_intuos_get_tool_type()
681 case 0x806: /* Intuos4 Mouse */ in wacom_intuos_get_tool_type()
685 case 0x096: /* Lens cursor */ in wacom_intuos_get_tool_type()
686 case 0x097: /* Intuos3 Lens cursor */ in wacom_intuos_get_tool_type()
687 case 0x006: /* Intuos4 Lens cursor */ in wacom_intuos_get_tool_type()
691 case 0x82a: /* Eraser */ in wacom_intuos_get_tool_type()
692 case 0x84a: in wacom_intuos_get_tool_type()
693 case 0x85a: in wacom_intuos_get_tool_type()
694 case 0x91a: in wacom_intuos_get_tool_type()
695 case 0xd1a: in wacom_intuos_get_tool_type()
696 case 0x0fa: in wacom_intuos_get_tool_type()
697 case 0x82b: /* Intuos3 Grip Pen Eraser */ in wacom_intuos_get_tool_type()
698 case 0x81b: /* Intuos3 Classic Pen Eraser */ in wacom_intuos_get_tool_type()
699 case 0x91b: /* Intuos3 Airbrush Eraser */ in wacom_intuos_get_tool_type()
700 case 0x80c: /* Intuos4/5 13HD/24HD Marker Pen Eraser */ in wacom_intuos_get_tool_type()
701 case 0x80a: /* Intuos4/5 13HD/24HD General Pen Eraser */ in wacom_intuos_get_tool_type()
702 case 0x90a: /* Intuos4/5 13HD/24HD Airbrush Eraser */ in wacom_intuos_get_tool_type()
703 case 0x1480a: /* Intuos4/5 13HD/24HD Classic Pen Eraser */ in wacom_intuos_get_tool_type()
704 case 0x1090a: /* Intuos4/5 13HD/24HD Airbrush Eraser */ in wacom_intuos_get_tool_type()
705 case 0x1080c: /* Intuos4/5 13HD/24HD Art Pen Eraser */ in wacom_intuos_get_tool_type()
706 case 0x1084a: /* MobileStudio Pro Pro Pen slim Eraser */ in wacom_intuos_get_tool_type()
707 case 0x1680a: /* Cintiq 13HD Pro Pen Eraser */ in wacom_intuos_get_tool_type()
708 case 0x1880a: /* DTH2242 Eraser */ in wacom_intuos_get_tool_type()
709 case 0x1080a: /* Intuos4/5 13HD/24HD General Pen Eraser */ in wacom_intuos_get_tool_type()
713 case 0xd12: in wacom_intuos_get_tool_type()
714 case 0x912: in wacom_intuos_get_tool_type()
715 case 0x112: in wacom_intuos_get_tool_type()
716 case 0x913: /* Intuos3 Airbrush */ in wacom_intuos_get_tool_type()
717 case 0x902: /* Intuos4/5 13HD/24HD Airbrush */ in wacom_intuos_get_tool_type()
718 case 0x10902: /* Intuos4/5 13HD/24HD Airbrush */ in wacom_intuos_get_tool_type()
734 int idx = (features->type == INTUOS) ? (data[1] & 0x01) : 0; in wacom_exit_report()
740 input_report_abs(input, ABS_X, 0); in wacom_exit_report()
741 input_report_abs(input, ABS_Y, 0); in wacom_exit_report()
742 input_report_abs(input, ABS_DISTANCE, 0); in wacom_exit_report()
743 input_report_abs(input, ABS_TILT_X, 0); in wacom_exit_report()
744 input_report_abs(input, ABS_TILT_Y, 0); in wacom_exit_report()
746 input_report_key(input, BTN_LEFT, 0); in wacom_exit_report()
747 input_report_key(input, BTN_MIDDLE, 0); in wacom_exit_report()
748 input_report_key(input, BTN_RIGHT, 0); in wacom_exit_report()
749 input_report_key(input, BTN_SIDE, 0); in wacom_exit_report()
750 input_report_key(input, BTN_EXTRA, 0); in wacom_exit_report()
751 input_report_abs(input, ABS_THROTTLE, 0); in wacom_exit_report()
752 input_report_abs(input, ABS_RZ, 0); in wacom_exit_report()
754 input_report_abs(input, ABS_PRESSURE, 0); in wacom_exit_report()
755 input_report_key(input, BTN_STYLUS, 0); in wacom_exit_report()
756 input_report_key(input, BTN_STYLUS2, 0); in wacom_exit_report()
757 input_report_key(input, BTN_TOUCH, 0); in wacom_exit_report()
758 input_report_abs(input, ABS_WHEEL, 0); in wacom_exit_report()
760 input_report_abs(input, ABS_Z, 0); in wacom_exit_report()
762 input_report_key(input, wacom->tool[idx], 0); in wacom_exit_report()
763 input_report_abs(input, ABS_MISC, 0); /* reset tool id */ in wacom_exit_report()
765 wacom->id[idx] = 0; in wacom_exit_report()
773 int idx = (features->type == INTUOS) ? (data[1] & 0x01) : 0; in wacom_intuos_inout()
775 if (!(((data[1] & 0xfc) == 0xc0) || /* in prox */ in wacom_intuos_inout()
776 ((data[1] & 0xfe) == 0x20) || /* in range */ in wacom_intuos_inout()
777 ((data[1] & 0xfe) == 0x80))) /* out prox */ in wacom_intuos_inout()
778 return 0; in wacom_intuos_inout()
781 if ((data[1] & 0xfc) == 0xc0) { in wacom_intuos_inout()
783 wacom->serial[idx] = ((data[3] & 0x0f) << 28) + in wacom_intuos_inout()
788 ((data[7] & 0x0f) << 16) | ((data[8] & 0xf0) << 8); in wacom_intuos_inout()
797 if ((data[1] & 0xfe) == 0x20) { in wacom_intuos_inout()
803 input_report_key(input, BTN_TOUCH, 0); in wacom_intuos_inout()
804 input_report_abs(input, ABS_PRESSURE, 0); in wacom_intuos_inout()
812 if ((data[1] & 0xfe) == 0x80) { in wacom_intuos_inout()
824 return 0; in wacom_intuos_inout()
849 int idx = (features->type == INTUOS) ? (data[1] & 0x01) : 0; in wacom_intuos_general()
850 unsigned char type = (data[1] >> 1) & 0x0F; in wacom_intuos_general()
853 if (data[0] != WACOM_REPORT_PENABLED && data[0] != WACOM_REPORT_CINTIQ && in wacom_intuos_general()
854 data[0] != WACOM_REPORT_INTUOS_PEN) in wacom_intuos_general()
855 return 0; in wacom_intuos_general()
871 if ((!((wacom->id[idx] >> 16) & 0x01) && in wacom_intuos_general()
884 (features->type == CINTIQ && !(data[1] & 0x40))) in wacom_intuos_general()
902 case 0x00: in wacom_intuos_general()
903 case 0x01: in wacom_intuos_general()
904 case 0x02: in wacom_intuos_general()
905 case 0x03: in wacom_intuos_general()
907 t = (data[6] << 3) | ((data[7] & 0xC0) >> 5) | (data[1] & 1); in wacom_intuos_general()
913 (((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64); in wacom_intuos_general()
914 input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64); in wacom_intuos_general()
921 case 0x0a: in wacom_intuos_general()
926 (((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64); in wacom_intuos_general()
927 input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64); in wacom_intuos_general()
930 case 0x05: in wacom_intuos_general()
935 t = (data[7] & 0x20) ? ((t > 900) ? ((t-1) / 2 - 1350) : in wacom_intuos_general()
941 input_report_abs(input, ABS_RZ, (data[7] & 0x20) ? in wacom_intuos_general()
946 case 0x04: in wacom_intuos_general()
948 input_report_key(input, BTN_LEFT, data[8] & 0x01); in wacom_intuos_general()
949 input_report_key(input, BTN_MIDDLE, data[8] & 0x02); in wacom_intuos_general()
950 input_report_key(input, BTN_RIGHT, data[8] & 0x04); in wacom_intuos_general()
952 input_report_key(input, BTN_SIDE, data[8] & 0x20); in wacom_intuos_general()
953 input_report_key(input, BTN_EXTRA, data[8] & 0x10); in wacom_intuos_general()
955 input_report_abs(input, ABS_THROTTLE, (data[8] & 0x08) ? -t : t); in wacom_intuos_general()
958 case 0x06: in wacom_intuos_general()
960 input_report_key(input, BTN_LEFT, data[6] & 0x01); in wacom_intuos_general()
961 input_report_key(input, BTN_MIDDLE, data[6] & 0x02); in wacom_intuos_general()
962 input_report_key(input, BTN_RIGHT, data[6] & 0x04); in wacom_intuos_general()
963 input_report_rel(input, REL_WHEEL, ((data[7] & 0x80) >> 7) in wacom_intuos_general()
964 - ((data[7] & 0x40) >> 6)); in wacom_intuos_general()
965 input_report_key(input, BTN_SIDE, data[6] & 0x08); in wacom_intuos_general()
966 input_report_key(input, BTN_EXTRA, data[6] & 0x10); in wacom_intuos_general()
969 (((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64); in wacom_intuos_general()
970 input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64); in wacom_intuos_general()
973 case 0x08: in wacom_intuos_general()
976 input_report_key(input, BTN_LEFT, data[8] & 0x04); in wacom_intuos_general()
977 input_report_key(input, BTN_MIDDLE, data[8] & 0x08); in wacom_intuos_general()
978 input_report_key(input, BTN_RIGHT, data[8] & 0x10); in wacom_intuos_general()
979 input_report_rel(input, REL_WHEEL, (data[8] & 0x01) in wacom_intuos_general()
980 - ((data[8] & 0x02) >> 1)); in wacom_intuos_general()
984 input_report_key(input, BTN_SIDE, data[8] & 0x40); in wacom_intuos_general()
985 input_report_key(input, BTN_EXTRA, data[8] & 0x20); in wacom_intuos_general()
990 input_report_key(input, BTN_LEFT, data[8] & 0x01); in wacom_intuos_general()
991 input_report_key(input, BTN_MIDDLE, data[8] & 0x02); in wacom_intuos_general()
992 input_report_key(input, BTN_RIGHT, data[8] & 0x04); in wacom_intuos_general()
993 input_report_key(input, BTN_SIDE, data[8] & 0x10); in wacom_intuos_general()
994 input_report_key(input, BTN_EXTRA, data[8] & 0x08); in wacom_intuos_general()
998 case 0x07: in wacom_intuos_general()
999 case 0x09: in wacom_intuos_general()
1000 case 0x0b: in wacom_intuos_general()
1001 case 0x0c: in wacom_intuos_general()
1002 case 0x0d: in wacom_intuos_general()
1003 case 0x0e: in wacom_intuos_general()
1004 case 0x0f: in wacom_intuos_general()
1023 if (data[0] != WACOM_REPORT_PENABLED && in wacom_intuos_irq()
1024 data[0] != WACOM_REPORT_INTUOS_ID1 && in wacom_intuos_irq()
1025 data[0] != WACOM_REPORT_INTUOS_ID2 && in wacom_intuos_irq()
1026 data[0] != WACOM_REPORT_INTUOSPAD && in wacom_intuos_irq()
1027 data[0] != WACOM_REPORT_INTUOS_PEN && in wacom_intuos_irq()
1028 data[0] != WACOM_REPORT_CINTIQ && in wacom_intuos_irq()
1029 data[0] != WACOM_REPORT_CINTIQPAD && in wacom_intuos_irq()
1030 data[0] != WACOM_REPORT_INTUOS5PAD) { in wacom_intuos_irq()
1032 "%s: received unknown report #%d\n", __func__, data[0]); in wacom_intuos_irq()
1033 return 0; in wacom_intuos_irq()
1051 return 0; in wacom_intuos_irq()
1065 if (data[0] != WACOM_REPORT_REMOTE) { in wacom_remote_irq()
1067 __func__, data[0]); in wacom_remote_irq()
1068 return 0; in wacom_remote_irq()
1072 wacom_wac->id[0] = PAD_DEVICE_ID; in wacom_remote_irq()
1076 for (i = 0; i < WACOM_MAX_REMOTES; i++) { in wacom_remote_irq()
1083 if (index < 0 || !remote->remotes[index].registered) in wacom_remote_irq()
1088 input_report_key(input, BTN_0, (data[9] & 0x01)); in wacom_remote_irq()
1089 input_report_key(input, BTN_1, (data[9] & 0x02)); in wacom_remote_irq()
1090 input_report_key(input, BTN_2, (data[9] & 0x04)); in wacom_remote_irq()
1091 input_report_key(input, BTN_3, (data[9] & 0x08)); in wacom_remote_irq()
1092 input_report_key(input, BTN_4, (data[9] & 0x10)); in wacom_remote_irq()
1093 input_report_key(input, BTN_5, (data[9] & 0x20)); in wacom_remote_irq()
1094 input_report_key(input, BTN_6, (data[9] & 0x40)); in wacom_remote_irq()
1095 input_report_key(input, BTN_7, (data[9] & 0x80)); in wacom_remote_irq()
1097 input_report_key(input, BTN_8, (data[10] & 0x01)); in wacom_remote_irq()
1098 input_report_key(input, BTN_9, (data[10] & 0x02)); in wacom_remote_irq()
1099 input_report_key(input, BTN_A, (data[10] & 0x04)); in wacom_remote_irq()
1100 input_report_key(input, BTN_B, (data[10] & 0x08)); in wacom_remote_irq()
1101 input_report_key(input, BTN_C, (data[10] & 0x10)); in wacom_remote_irq()
1102 input_report_key(input, BTN_X, (data[10] & 0x20)); in wacom_remote_irq()
1103 input_report_key(input, BTN_Y, (data[10] & 0x40)); in wacom_remote_irq()
1104 input_report_key(input, BTN_Z, (data[10] & 0x80)); in wacom_remote_irq()
1106 input_report_key(input, BTN_BASE, (data[11] & 0x01)); in wacom_remote_irq()
1107 input_report_key(input, BTN_BASE2, (data[11] & 0x02)); in wacom_remote_irq()
1109 if (data[12] & 0x80) in wacom_remote_irq()
1110 input_report_abs(input, ABS_WHEEL, (data[12] & 0x7f) - 1); in wacom_remote_irq()
1112 input_report_abs(input, ABS_WHEEL, 0); in wacom_remote_irq()
1114 bat_percent = data[7] & 0x7f; in wacom_remote_irq()
1115 bat_charging = !!(data[7] & 0x80); in wacom_remote_irq()
1117 if (data[9] | data[10] | (data[11] & 0x03) | data[12]) in wacom_remote_irq()
1120 input_report_abs(input, ABS_MISC, 0); in wacom_remote_irq()
1127 touch_ring_mode = (data[11] & 0xC0) >> 6; in wacom_remote_irq()
1129 for (i = 0; i < WACOM_MAX_REMOTES; i++) { in wacom_remote_irq()
1140 return 0; in wacom_remote_irq()
1152 if (data[0] != WACOM_REPORT_DEVICE_LIST) in wacom_remote_status_irq()
1155 memset(&remote_data, 0, sizeof(struct wacom_remote_data)); in wacom_remote_status_irq()
1157 for (i = 0; i < WACOM_MAX_REMOTES; i++) { in wacom_remote_status_irq()
1207 switch (data[0]) { in wacom_intuos_bt_irq()
1208 case 0x04: in wacom_intuos_bt_irq()
1212 case 0x03: in wacom_intuos_bt_irq()
1218 bat_charging = (power_raw & 0x08) ? 1 : 0; in wacom_intuos_bt_irq()
1219 ps_connected = (power_raw & 0x10) ? 1 : 0; in wacom_intuos_bt_irq()
1220 battery_capacity = batcap_i4[power_raw & 0x07]; in wacom_intuos_bt_irq()
1229 data[0], data[1], len); in wacom_intuos_bt_irq()
1230 return 0; in wacom_intuos_bt_irq()
1232 return 0; in wacom_intuos_bt_irq()
1239 int count = 0; in wacom_wac_finger_count_touches()
1243 return 0; in wacom_wac_finger_count_touches()
1249 for (i = 0; i < input->mt->num_slots; i++) { in wacom_wac_finger_count_touches()
1252 if (id >= 0) in wacom_wac_finger_count_touches()
1269 wacom->serial[0] = get_unaligned_le64(&data[99]); in wacom_intuos_pro2_bt_pen()
1270 wacom->id[0] = get_unaligned_le16(&data[107]); in wacom_intuos_pro2_bt_pen()
1274 wacom->serial[0] = get_unaligned_le64(&data[33]); in wacom_intuos_pro2_bt_pen()
1275 wacom->id[0] = get_unaligned_le16(&data[41]); in wacom_intuos_pro2_bt_pen()
1280 if (wacom->serial[0] >> 52 == 1) { in wacom_intuos_pro2_bt_pen()
1282 wacom->id[0] |= (wacom->serial[0] >> 32) & 0xFFFFF; in wacom_intuos_pro2_bt_pen()
1285 for (i = 0; i < pen_frames; i++) { in wacom_intuos_pro2_bt_pen()
1287 bool valid = frame[0] & 0x80; in wacom_intuos_pro2_bt_pen()
1288 bool prox = frame[0] & 0x40; in wacom_intuos_pro2_bt_pen()
1289 bool range = frame[0] & 0x20; in wacom_intuos_pro2_bt_pen()
1290 bool invert = frame[0] & 0x10; in wacom_intuos_pro2_bt_pen()
1300 wacom->tool[0] = 0; in wacom_intuos_pro2_bt_pen()
1301 wacom->id[0] = 0; in wacom_intuos_pro2_bt_pen()
1302 wacom->serial[0] = 0; in wacom_intuos_pro2_bt_pen()
1307 if (!wacom->tool[0]) { /* first in range */ in wacom_intuos_pro2_bt_pen()
1310 wacom->tool[0] = BTN_TOOL_RUBBER; in wacom_intuos_pro2_bt_pen()
1311 else if (wacom->id[0]) in wacom_intuos_pro2_bt_pen()
1312 wacom->tool[0] = wacom_intuos_get_tool_type(wacom->id[0]); in wacom_intuos_pro2_bt_pen()
1314 wacom->tool[0] = BTN_TOOL_PEN; in wacom_intuos_pro2_bt_pen()
1339 if (wacom->tool[0]) { in wacom_intuos_pro2_bt_pen()
1350 input_report_key(pen_input, BTN_TOUCH, frame[0] & 0x09); in wacom_intuos_pro2_bt_pen()
1351 input_report_key(pen_input, BTN_STYLUS, frame[0] & 0x02); in wacom_intuos_pro2_bt_pen()
1352 input_report_key(pen_input, BTN_STYLUS2, frame[0] & 0x04); in wacom_intuos_pro2_bt_pen()
1354 input_report_key(pen_input, wacom->tool[0], prox); in wacom_intuos_pro2_bt_pen()
1355 input_event(pen_input, EV_MSC, MSC_SERIAL, wacom->serial[0]); in wacom_intuos_pro2_bt_pen()
1357 wacom_intuos_id_mangle(wacom->id[0])); /* report tool id */ in wacom_intuos_pro2_bt_pen()
1377 for (i = 0; i < finger_frames; i++) { in wacom_intuos_pro2_bt_touch()
1379 int current_num_contacts = frame[0] & 0x7F; in wacom_intuos_pro2_bt_touch()
1382 if (!(frame[0] & 0x80)) in wacom_intuos_pro2_bt_touch()
1394 for (j = 0; j < contacts_to_send; j++) { in wacom_intuos_pro2_bt_touch()
1396 int slot = input_mt_get_slot_by_key(touch_input, touch[0]); in wacom_intuos_pro2_bt_touch()
1402 if (slot < 0) in wacom_intuos_pro2_bt_touch()
1406 input_mt_report_slot_state(touch_input, MT_TOOL_FINGER, touch[1] & 0x01); in wacom_intuos_pro2_bt_touch()
1417 if (wacom->num_contacts_left <= 0) { in wacom_intuos_pro2_bt_touch()
1418 wacom->num_contacts_left = 0; in wacom_intuos_pro2_bt_touch()
1424 if (wacom->num_contacts_left == 0) { in wacom_intuos_pro2_bt_touch()
1440 int center = (data[281] & 0x40) >> 6; in wacom_intuos_pro2_bt_pad()
1441 int ring = data[285] & 0x7F; in wacom_intuos_pro2_bt_pad()
1442 bool ringstatus = data[285] & 0x80; in wacom_intuos_pro2_bt_pad()
1445 /* Fix touchring data: userspace expects 0 at left and increasing clockwise */ in wacom_intuos_pro2_bt_pad()
1454 input_report_abs(pad_input, ABS_WHEEL, ringstatus ? ring : 0); in wacom_intuos_pro2_bt_pad()
1456 input_report_key(pad_input, wacom->tool[1], prox ? 1 : 0); in wacom_intuos_pro2_bt_pad()
1457 input_report_abs(pad_input, ABS_MISC, prox ? PAD_DEVICE_ID : 0); in wacom_intuos_pro2_bt_pad()
1458 input_event(pad_input, EV_MSC, MSC_SERIAL, 0xffffffff); in wacom_intuos_pro2_bt_pad()
1467 bool chg = data[284] & 0x80; in wacom_intuos_pro2_bt_battery()
1468 int battery_status = data[284] & 0x7F; in wacom_intuos_pro2_bt_battery()
1483 input_report_key(pad_input, wacom->tool[1], buttons ? 1 : 0); in wacom_intuos_gen3_bt_pad()
1484 input_report_abs(pad_input, ABS_MISC, buttons ? PAD_DEVICE_ID : 0); in wacom_intuos_gen3_bt_pad()
1485 input_event(pad_input, EV_MSC, MSC_SERIAL, 0xffffffff); in wacom_intuos_gen3_bt_pad()
1494 bool chg = data[45] & 0x80; in wacom_intuos_gen3_bt_battery()
1495 int battery_status = data[45] & 0x7F; in wacom_intuos_gen3_bt_battery()
1505 if (data[0] != 0x80 && data[0] != 0x81) { in wacom_intuos_pro2_bt_irq()
1507 "%s: received unknown report #%d\n", __func__, data[0]); in wacom_intuos_pro2_bt_irq()
1508 return 0; in wacom_intuos_pro2_bt_irq()
1521 return 0; in wacom_intuos_pro2_bt_irq()
1530 int contacts_to_send = 0; in wacom_24hdt_irq()
1536 return 0; in wacom_24hdt_irq()
1542 y_offset = 0; in wacom_24hdt_irq()
1554 for (i = 0; i < contacts_to_send; i++) { in wacom_24hdt_irq()
1556 bool touch = (data[offset] & 0x1) && report_touch_events(wacom); in wacom_24hdt_irq()
1559 if (slot < 0) in wacom_24hdt_irq()
1588 if (wacom->num_contacts_left <= 0) { in wacom_24hdt_irq()
1589 wacom->num_contacts_left = 0; in wacom_24hdt_irq()
1601 int contacts_to_send = 0; in wacom_mt_touch()
1602 int x_offset = 0; in wacom_mt_touch()
1618 for (i = 0; i < contacts_to_send; i++) { in wacom_mt_touch()
1620 bool touch = (data[offset] & 0x1) && report_touch_events(wacom); in wacom_mt_touch()
1624 if (slot < 0) in wacom_mt_touch()
1639 if (wacom->num_contacts_left <= 0) { in wacom_mt_touch()
1640 wacom->num_contacts_left = 0; in wacom_mt_touch()
1652 for (i = 0; i < 2; i++) { in wacom_tpc_mt_touch()
1659 int x = le16_to_cpup((__le16 *)&data[i * 2 + 2]) & 0x7fff; in wacom_tpc_mt_touch()
1660 int y = le16_to_cpup((__le16 *)&data[i * 2 + 6]) & 0x7fff; in wacom_tpc_mt_touch()
1679 int x = 0, y = 0; in wacom_tpc_single_touch()
1682 return 0; in wacom_tpc_single_touch()
1685 prox = prox && (data[0] & 0x01); in wacom_tpc_single_touch()
1689 prox = prox && (data[2] & 0x01); in wacom_tpc_single_touch()
1693 prox = prox && (data[1] & 0x01); in wacom_tpc_single_touch()
1714 bool prox = data[1] & 0x20; in wacom_tpc_pen()
1718 wacom->tool[0] = (data[1] & 0x0c) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN; in wacom_tpc_pen()
1727 input_report_key(input, BTN_STYLUS, data[1] & 0x02); in wacom_tpc_pen()
1728 input_report_key(input, BTN_STYLUS2, data[1] & 0x10); in wacom_tpc_pen()
1731 input_report_abs(input, ABS_PRESSURE, ((data[7] & 0x07) << 8) | data[6]); in wacom_tpc_pen()
1732 input_report_key(input, BTN_TOUCH, data[1] & 0x05); in wacom_tpc_pen()
1733 input_report_key(input, wacom->tool[0], prox); in wacom_tpc_pen()
1737 return 0; in wacom_tpc_pen()
1746 "%s: received report #%d\n", __func__, data[0]); in wacom_tpc_irq()
1749 data[0] == WACOM_REPORT_PENABLED) in wacom_tpc_irq()
1754 "%s: received report #%d\n", __func__, data[0]); in wacom_tpc_irq()
1764 switch (data[0]) { in wacom_tpc_irq()
1779 return 0; in wacom_tpc_irq()
1799 int subpage = (usage & 0xFF00) << 8; in wacom_equivalent_usage()
1800 int subusage = (usage & 0xFF); in wacom_equivalent_usage()
1825 int subpage = (usage & 0xFF00) << 8; in wacom_equivalent_usage()
1826 int subusage = (usage & 0xFF); in wacom_equivalent_usage()
1869 input_set_abs_params(input, code, fmin, fmax, fuzz, 0); in wacom_map_usage()
1907 if (value == 0) { in wacom_wac_battery_event()
1969 wacom_map_usage(input, usage, field, EV_ABS, ABS_X, 0); in wacom_wac_pad_usage_mapping()
1974 wacom_map_usage(input, usage, field, EV_ABS, ABS_Y, 0); in wacom_wac_pad_usage_mapping()
1979 wacom_map_usage(input, usage, field, EV_ABS, ABS_Z, 0); in wacom_wac_pad_usage_mapping()
1990 0); in wacom_wac_pad_usage_mapping()
2013 wacom_map_usage(input, usage, field, EV_ABS, ABS_RX, 0); in wacom_wac_pad_usage_mapping()
2017 wacom_map_usage(input, usage, field, EV_ABS, ABS_RY, 0); in wacom_wac_pad_usage_mapping()
2021 wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0); in wacom_wac_pad_usage_mapping()
2035 wacom_map_usage(input, usage, field, EV_KEY, KEY_BUTTONCONFIG, 0); in wacom_wac_pad_usage_mapping()
2039 wacom_map_usage(input, usage, field, EV_KEY, KEY_ONSCREEN_KEYBOARD, 0); in wacom_wac_pad_usage_mapping()
2043 wacom_map_usage(input, usage, field, EV_KEY, KEY_CONTROLPANEL, 0); in wacom_wac_pad_usage_mapping()
2056 switch (equivalent_usage & 0xfffffff0) { in wacom_wac_pad_usage_mapping()
2060 0); in wacom_wac_pad_usage_mapping()
2099 if (hdev->vendor == 0x56a && in wacom_wac_pad_event()
2100 (hdev->product == 0x34d || hdev->product == 0x34e || /* MobileStudio Pro */ in wacom_wac_pad_event()
2101 hdev->product == 0x357 || hdev->product == 0x358 || /* Intuos Pro 2 */ in wacom_wac_pad_event()
2102 hdev->product == 0x392 || /* Intuos Pro 2 */ in wacom_wac_pad_event()
2103 hdev->product == 0x398 || hdev->product == 0x399 || /* MobileStudio Pro */ in wacom_wac_pad_event()
2104 hdev->product == 0x3AA)) { /* MobileStudio Pro */ in wacom_wac_pad_event()
2107 if (hdev->product == 0x357 || hdev->product == 0x358 || in wacom_wac_pad_event()
2108 hdev->product == 0x392) in wacom_wac_pad_event()
2110 else if (hdev->product == 0x34d || hdev->product == 0x34e || in wacom_wac_pad_event()
2111 hdev->product == 0x398 || hdev->product == 0x399 || in wacom_wac_pad_event()
2112 hdev->product == 0x3AA) in wacom_wac_pad_event()
2122 input_event(input, usage->type, usage->code, 0); in wacom_wac_pad_event()
2149 for (i = 0; i < wacom->led.count; i++) in wacom_wac_pad_event()
2171 wacom_wac->hid_data.inrange_state = 0; in wacom_wac_pad_pre_report()
2180 bool active = wacom_wac->hid_data.inrange_state != 0; in wacom_wac_pad_report()
2184 input_event(input, EV_ABS, ABS_MISC, active ? PAD_DEVICE_ID : 0); in wacom_wac_pad_report()
2221 wacom_map_usage(input, usage, field, EV_ABS, ABS_DISTANCE, 0); in wacom_wac_pen_usage_mapping()
2224 wacom_map_usage(input, usage, field, EV_ABS, ABS_PRESSURE, 0); in wacom_wac_pen_usage_mapping()
2227 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOOL_PEN, 0); in wacom_wac_pen_usage_mapping()
2231 BTN_TOOL_RUBBER, 0); in wacom_wac_pen_usage_mapping()
2234 wacom_map_usage(input, usage, field, EV_ABS, ABS_TILT_X, 0); in wacom_wac_pen_usage_mapping()
2237 wacom_map_usage(input, usage, field, EV_ABS, ABS_TILT_Y, 0); in wacom_wac_pen_usage_mapping()
2240 wacom_map_usage(input, usage, field, EV_ABS, ABS_Z, 0); in wacom_wac_pen_usage_mapping()
2244 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOUCH, 0); in wacom_wac_pen_usage_mapping()
2248 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOUCH, 0); in wacom_wac_pen_usage_mapping()
2253 wacom_map_usage(input, usage, field, EV_KEY, BTN_STYLUS, 0); in wacom_wac_pen_usage_mapping()
2258 wacom_map_usage(input, usage, field, EV_KEY, BTN_STYLUS2, 0); in wacom_wac_pen_usage_mapping()
2262 wacom_map_usage(input, usage, field, EV_MSC, MSC_SERIAL, 0); in wacom_wac_pen_usage_mapping()
2266 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOOL_PEN, 0); in wacom_wac_pen_usage_mapping()
2271 wacom_map_usage(input, usage, field, EV_ABS, ABS_MISC, 0); in wacom_wac_pen_usage_mapping()
2275 wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0); in wacom_wac_pen_usage_mapping()
2321 wacom_wac->serial[0] = (wacom_wac->serial[0] & ~0xFFFFFFFFULL); in wacom_wac_pen_event()
2322 wacom_wac->serial[0] |= wacom_s32tou(value, field->report_size); in wacom_wac_pen_event()
2340 wacom_wac->serial[0] = (wacom_wac->serial[0] & 0xFFFFFFFF); in wacom_wac_pen_event()
2341 wacom_wac->serial[0] |= ((__u64)raw_value) << 32; in wacom_wac_pen_event()
2348 wacom_wac->id[0] |= raw_value & 0xFFFFF; in wacom_wac_pen_event()
2360 wacom_wac->id[0] |= wacom_s32tou(value, field->report_size); in wacom_wac_pen_event()
2405 input_event(input, usage->type, usage->code, 0); in wacom_wac_pen_event()
2430 if (!wacom_wac->tool[0] && range) { /* first in range */ in wacom_wac_pen_report()
2433 wacom_wac->tool[0] = BTN_TOOL_RUBBER; in wacom_wac_pen_report()
2434 else if (wacom_wac->id[0]) in wacom_wac_pen_report()
2435 wacom_wac->tool[0] = wacom_intuos_get_tool_type(wacom_wac->id[0]); in wacom_wac_pen_report()
2437 wacom_wac->tool[0] = BTN_TOOL_PEN; in wacom_wac_pen_report()
2443 if (!delay_pen_events(wacom_wac) && wacom_wac->tool[0]) { in wacom_wac_pen_report()
2444 int id = wacom_wac->id[0]; in wacom_wac_pen_report()
2456 if (wacom_wac->serial[0] >> 52 == 1) in wacom_wac_pen_report()
2466 input_report_key(input, wacom_wac->tool[0], sense); in wacom_wac_pen_report()
2467 if (wacom_wac->serial[0]) { in wacom_wac_pen_report()
2468 input_event(input, EV_MSC, MSC_SERIAL, wacom_wac->serial[0]); in wacom_wac_pen_report()
2469 input_report_abs(input, ABS_MISC, sense ? id : 0); in wacom_wac_pen_report()
2478 wacom_wac->tool[0] = 0; in wacom_wac_pen_report()
2479 wacom_wac->id[0] = 0; in wacom_wac_pen_report()
2480 wacom_wac->serial[0] = 0; in wacom_wac_pen_report()
2510 wacom_map_usage(input, usage, field, EV_ABS, ABS_MT_TOUCH_MAJOR, 0); in wacom_wac_finger_usage_mapping()
2511 wacom_map_usage(input, usage, field, EV_ABS, ABS_MT_TOUCH_MINOR, 0); in wacom_wac_finger_usage_mapping()
2512 input_set_abs_params(input, ABS_MT_ORIENTATION, 0, 1, 0, 0); in wacom_wac_finger_usage_mapping()
2515 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOUCH, 0); in wacom_wac_finger_usage_mapping()
2557 if (slot < 0) { in wacom_wac_finger_slot()
2563 if (!prox && mt_id < 0) { in wacom_wac_finger_slot()
2586 input_report_abs(input, ABS_MT_ORIENTATION, hid_data->width <= hid_data->height ? 0 : 1); in wacom_wac_finger_slot()
2656 for (i = 0; i < report->maxfield; i++) { in wacom_wac_finger_pre_report()
2660 for (j = 0; j < field->maxusage; j++) { in wacom_wac_finger_pre_report()
2685 if (hid_data->cc_report != 0 && in wacom_wac_finger_pre_report()
2686 hid_data->cc_index >= 0) { in wacom_wac_finger_pre_report()
2706 if (wacom_wac->hid_data.num_expected == 0) in wacom_wac_finger_report()
2720 wacom_wac->hid_data.num_received = 0; in wacom_wac_finger_report()
2785 for (n = 0 ; n < count; n++) { in wacom_report_events()
2814 return 0; in wacom_wac_collection()
2820 return 0; in wacom_wac_collection()
2836 for (r = 0; r < report->maxfield; r++) { in wacom_wac_report()
2858 for (r = 0; r < report->maxfield; r++) { in wacom_wac_report()
2861 if (field->usage[0].collection_index != prev_collection) { in wacom_wac_report()
2863 field->usage[0].collection_index, field, r) < 0) in wacom_wac_report()
2865 prev_collection = field->usage[0].collection_index; in wacom_wac_report()
2883 if (data[0] != 0x02) in wacom_bpt_touch()
2884 return 0; in wacom_bpt_touch()
2886 for (i = 0; i < 2; i++) { in wacom_bpt_touch()
2887 int offset = (data[1] & 0x80) ? (8 * i) : (9 * i); in wacom_bpt_touch()
2889 && (data[offset + 3] & 0x80); in wacom_bpt_touch()
2894 int x = get_unaligned_be16(&data[offset + 3]) & 0x7ff; in wacom_bpt_touch()
2895 int y = get_unaligned_be16(&data[offset + 5]) & 0x7ff; in wacom_bpt_touch()
2907 input_report_key(pad_input, BTN_LEFT, (data[1] & 0x08) != 0); in wacom_bpt_touch()
2908 input_report_key(pad_input, BTN_FORWARD, (data[1] & 0x04) != 0); in wacom_bpt_touch()
2909 input_report_key(pad_input, BTN_BACK, (data[1] & 0x02) != 0); in wacom_bpt_touch()
2910 input_report_key(pad_input, BTN_RIGHT, (data[1] & 0x01) != 0); in wacom_bpt_touch()
2920 bool touch = data[1] & 0x80; in wacom_bpt3_touch_msg()
2921 int slot = input_mt_get_slot_by_key(input, data[0]); in wacom_bpt3_touch_msg()
2923 if (slot < 0) in wacom_bpt3_touch_msg()
2933 int y = (data[3] << 4) | (data[4] & 0x0f); in wacom_bpt3_touch_msg()
2965 input_report_key(input, BTN_LEFT, (data[1] & 0x02) != 0); in wacom_bpt3_button_msg()
2966 input_report_key(input, BTN_BACK, (data[1] & 0x08) != 0); in wacom_bpt3_button_msg()
2968 input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0); in wacom_bpt3_button_msg()
2969 input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0); in wacom_bpt3_button_msg()
2971 input_report_key(input, BTN_FORWARD, (data[1] & 0x04) != 0); in wacom_bpt3_button_msg()
2972 input_report_key(input, BTN_RIGHT, (data[1] & 0x01) != 0); in wacom_bpt3_button_msg()
2978 int count = data[1] & 0x07; in wacom_bpt3_touch()
2979 int touch_changed = 0, i; in wacom_bpt3_touch()
2981 if (data[0] != 0x02) in wacom_bpt3_touch()
2982 return 0; in wacom_bpt3_touch()
2985 for (i = 0; i < count; i++) { in wacom_bpt3_touch()
3011 int x = 0, y = 0, p = 0, d = 0; in wacom_bpt_pen()
3015 if (data[0] != WACOM_REPORT_PENABLED) in wacom_bpt_pen()
3016 return 0; in wacom_bpt_pen()
3018 range = (data[1] & 0x80) == 0x80; in wacom_bpt_pen()
3019 prox = (data[1] & 0x40) == 0x40; in wacom_bpt_pen()
3020 rdy = (data[1] & 0x20) == 0x20; in wacom_bpt_pen()
3024 return 0; in wacom_bpt_pen()
3028 pen = data[1] & 0x01; in wacom_bpt_pen()
3029 btn1 = data[1] & 0x02; in wacom_bpt_pen()
3030 btn2 = data[1] & 0x04; in wacom_bpt_pen()
3036 if (data[1] & 0x08) { in wacom_bpt_pen()
3037 wacom->tool[0] = BTN_TOOL_RUBBER; in wacom_bpt_pen()
3038 wacom->id[0] = ERASER_DEVICE_ID; in wacom_bpt_pen()
3040 wacom->tool[0] = BTN_TOOL_PEN; in wacom_bpt_pen()
3041 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_bpt_pen()
3055 wacom->id[0] = 0; in wacom_bpt_pen()
3070 input_report_key(input, wacom->tool[0], range); /* PEN or RUBBER */ in wacom_bpt_pen()
3071 input_report_abs(input, ABS_MISC, wacom->id[0]); /* TOOL ID */ in wacom_bpt_pen()
3095 return 0; in wacom_bpt_irq()
3110 prefix = data[0]; in wacom_bamboo_pad_pen_event()
3111 data[0] = WACOM_REPORT_BPAD_PEN; in wacom_bamboo_pad_pen_event()
3121 data[0] = prefix; in wacom_bamboo_pad_pen_event()
3133 prefix = data[0]; in wacom_bamboo_pad_touch_event()
3135 for (id = 0; id < wacom->features.touch_max; id++) { in wacom_bamboo_pad_touch_event()
3146 x = finger_data[0] | ((finger_data[1] & 0x0f) << 8); in wacom_bamboo_pad_touch_event()
3155 input_report_key(input, BTN_LEFT, prefix & 0x40); in wacom_bamboo_pad_touch_event()
3156 input_report_key(input, BTN_RIGHT, prefix & 0x80); in wacom_bamboo_pad_touch_event()
3170 (data[0] != WACOM_REPORT_BPAD_TOUCH)) in wacom_bamboo_pad_irq()
3171 return 0; in wacom_bamboo_pad_irq()
3173 if (data[1] & 0x01) in wacom_bamboo_pad_irq()
3176 if (data[1] & 0x02) in wacom_bamboo_pad_irq()
3179 return 0; in wacom_bamboo_pad_irq()
3187 if (len != WACOM_PKGLEN_WIRELESS || data[0] != WACOM_REPORT_WL) in wacom_wireless_irq()
3188 return 0; in wacom_wireless_irq()
3190 connected = data[1] & 0x01; in wacom_wireless_irq()
3199 SW_MUTE_DEVICE, data[5] & 0x40); in wacom_wireless_irq()
3204 battery = (data[5] & 0x3f) * 100 / 31; in wacom_wireless_irq()
3205 charging = !!(data[5] & 0x80); in wacom_wireless_irq()
3212 battery, charging, 1, 0); in wacom_wireless_irq()
3214 } else if (wacom->pid != 0) { in wacom_wireless_irq()
3216 wacom->pid = 0; in wacom_wireless_irq()
3218 wacom_notify_battery(wacom, POWER_SUPPLY_STATUS_UNKNOWN, 0, 0, 0, 0); in wacom_wireless_irq()
3221 return 0; in wacom_wireless_irq()
3230 if (data[0] != WACOM_REPORT_USB) in wacom_status_irq()
3231 return 0; in wacom_status_irq()
3238 SW_MUTE_DEVICE, data[8] & 0x40); in wacom_status_irq()
3242 if (data[9] & 0x02) { /* wireless module is attached */ in wacom_status_irq()
3243 int battery = (data[8] & 0x3f) * 100 / 31; in wacom_status_irq()
3244 bool charging = !!(data[8] & 0x80); in wacom_status_irq()
3259 wacom_notify_battery(wacom_wac, POWER_SUPPLY_STATUS_UNKNOWN, 0, 0, 0, 0); in wacom_status_irq()
3261 return 0; in wacom_status_irq()
3334 else if (wacom_wac->data[0] == WACOM_REPORT_USB) in wacom_wac_irq()
3360 if (wacom_wac->data[0] == WACOM_REPORT_USB) in wacom_wac_irq()
3376 if (wacom_wac->data[0] == WACOM_REPORT_DEVICE_LIST) in wacom_wac_irq()
3408 0, wacom_wac->features.distance_max, wacom_wac->features.distance_fuzz, 0); in wacom_setup_basic_pro_pen()
3423 input_set_abs_params(input_dev, ABS_WHEEL, 0, 1023, 0, 0); in wacom_setup_cintiq()
3424 input_set_abs_params(input_dev, ABS_TILT_X, -64, 63, features->tilt_fuzz, 0); in wacom_setup_cintiq()
3426 input_set_abs_params(input_dev, ABS_TILT_Y, -64, 63, features->tilt_fuzz, 0); in wacom_setup_cintiq()
3446 input_set_abs_params(input_dev, ABS_RZ, -900, 899, 0, 0); in wacom_setup_intuos()
3448 input_set_abs_params(input_dev, ABS_THROTTLE, -1023, 1023, 0, 0); in wacom_setup_intuos()
3511 * 0, whose HID descriptor has an application usage of 0xFF0D in wacom_setup_device_quirks()
3588 if (wacom->hdev->product == 0x382 || wacom->hdev->product == 0x37d) { in wacom_setup_device_quirks()
3619 return 0; in wacom_setup_pen_input_capabilities()
3621 input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in wacom_setup_pen_input_capabilities()
3625 input_set_abs_params(input_dev, ABS_X, 0 + features->offset_left, in wacom_setup_pen_input_capabilities()
3627 features->x_fuzz, 0); in wacom_setup_pen_input_capabilities()
3628 input_set_abs_params(input_dev, ABS_Y, 0 + features->offset_top, in wacom_setup_pen_input_capabilities()
3630 features->y_fuzz, 0); in wacom_setup_pen_input_capabilities()
3631 input_set_abs_params(input_dev, ABS_PRESSURE, 0, in wacom_setup_pen_input_capabilities()
3632 features->pressure_max, features->pressure_fuzz, 0); in wacom_setup_pen_input_capabilities()
3645 input_set_abs_params(input_dev, ABS_DISTANCE, 0, in wacom_setup_pen_input_capabilities()
3647 features->distance_fuzz, 0); in wacom_setup_pen_input_capabilities()
3674 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); in wacom_setup_pen_input_capabilities()
3686 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); in wacom_setup_pen_input_capabilities()
3702 input_set_abs_params(input_dev, ABS_DISTANCE, 0, in wacom_setup_pen_input_capabilities()
3704 features->distance_fuzz, 0); in wacom_setup_pen_input_capabilities()
3706 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); in wacom_setup_pen_input_capabilities()
3757 input_set_abs_params(input_dev, ABS_DISTANCE, 0, in wacom_setup_pen_input_capabilities()
3759 features->distance_fuzz, 0); in wacom_setup_pen_input_capabilities()
3766 return 0; in wacom_setup_pen_input_capabilities()
3784 return 0; in wacom_setup_touch_input_capabilities()
3786 input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in wacom_setup_touch_input_capabilities()
3790 input_set_abs_params(input_dev, ABS_X, 0, in wacom_setup_touch_input_capabilities()
3791 features->x_max, features->x_fuzz, 0); in wacom_setup_touch_input_capabilities()
3792 input_set_abs_params(input_dev, ABS_Y, 0, in wacom_setup_touch_input_capabilities()
3793 features->y_max, features->y_fuzz, 0); in wacom_setup_touch_input_capabilities()
3800 input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, in wacom_setup_touch_input_capabilities()
3801 features->x_max, features->x_fuzz, 0); in wacom_setup_touch_input_capabilities()
3802 input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, in wacom_setup_touch_input_capabilities()
3803 features->y_max, features->y_fuzz, 0); in wacom_setup_touch_input_capabilities()
3813 input_dev->evbit[0] |= BIT_MASK(EV_SW); in wacom_setup_touch_input_capabilities()
3816 if (wacom_wac->shared->touch->product == 0x361) { in wacom_setup_touch_input_capabilities()
3818 0, 12440, 4, 0); in wacom_setup_touch_input_capabilities()
3820 0, 8640, 4, 0); in wacom_setup_touch_input_capabilities()
3822 else if (wacom_wac->shared->touch->product == 0x360) { in wacom_setup_touch_input_capabilities()
3824 0, 8960, 4, 0); in wacom_setup_touch_input_capabilities()
3826 0, 5920, 4, 0); in wacom_setup_touch_input_capabilities()
3828 else if (wacom_wac->shared->touch->product == 0x393) { in wacom_setup_touch_input_capabilities()
3830 0, 6400, 4, 0); in wacom_setup_touch_input_capabilities()
3832 0, 4000, 4, 0); in wacom_setup_touch_input_capabilities()
3845 input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
3846 input_set_abs_params(input_dev, ABS_MT_TOUCH_MINOR, 0, features->y_max, 0, 0); in wacom_setup_touch_input_capabilities()
3851 input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
3852 input_set_abs_params(input_dev, ABS_MT_WIDTH_MAJOR, 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
3853 input_set_abs_params(input_dev, ABS_MT_WIDTH_MINOR, 0, features->y_max, 0, 0); in wacom_setup_touch_input_capabilities()
3854 input_set_abs_params(input_dev, ABS_MT_ORIENTATION, 0, 1, 0, 0); in wacom_setup_touch_input_capabilities()
3858 if (wacom_wac->shared->touch->product == 0x32C || in wacom_setup_touch_input_capabilities()
3859 wacom_wac->shared->touch->product == 0xF6) { in wacom_setup_touch_input_capabilities()
3860 input_dev->evbit[0] |= BIT_MASK(EV_SW); in wacom_setup_touch_input_capabilities()
3880 input_dev->evbit[0] |= BIT_MASK(EV_SW); in wacom_setup_touch_input_capabilities()
3889 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
3892 0, features->y_max, 0, 0); in wacom_setup_touch_input_capabilities()
3904 return 0; in wacom_setup_touch_input_capabilities()
3916 return 0; in wacom_numbered_button_to_key()
3924 for (i = 0; i < button_count; i++) { in wacom_setup_numbered_buttons()
3939 * 24HD has LED group 1 to the left and LED group 0 to the right. in wacom_24hd_update_leds()
3940 * So group 0 matches the second half of the buttons and thus the mask in wacom_24hd_update_leds()
3943 if (group == 0) in wacom_24hd_update_leds()
3946 for (i = 0; i < 3; i++) { in wacom_24hd_update_leds()
3968 * 21UX2 has LED group 1 to the left and LED group 0 in wacom_is_led_toggled()
4031 for (i = 0; i < wacom->led.count; i++) in wacom_report_numbered_buttons()
4034 for (i = 0; i < button_count; i++) { in wacom_report_numbered_buttons()
4047 if ((features->type == HID_GENERIC) && features->numbered_buttons > 0) in wacom_setup_pad_input_capabilities()
4056 input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in wacom_setup_pad_input_capabilities()
4064 input_set_abs_params(input_dev, ABS_X, 0, 1, 0, 0); in wacom_setup_pad_input_capabilities()
4067 input_set_abs_params(input_dev, ABS_Y, 0, 1, 0, 0); in wacom_setup_pad_input_capabilities()
4088 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4108 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4109 input_set_abs_params(input_dev, ABS_THROTTLE, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4122 input_set_abs_params(input_dev, ABS_X, -2048, 2048, 0, 0); in wacom_setup_pad_input_capabilities()
4124 input_set_abs_params(input_dev, ABS_Y, -2048, 2048, 0, 0); in wacom_setup_pad_input_capabilities()
4126 input_set_abs_params(input_dev, ABS_Z, -2048, 2048, 0, 0); in wacom_setup_pad_input_capabilities()
4143 input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4144 input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4148 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4153 input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4157 input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4168 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4183 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4201 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4212 return 0; in wacom_setup_pad_input_capabilities()
4216 { "Wacom Penpartner", 5040, 3780, 255, 0,
4294 { "Wacom PL400", 5408, 4056, 255, 0,
4297 { "Wacom PL500", 6144, 4608, 255, 0,
4300 { "Wacom PL600", 6126, 4604, 255, 0,
4303 { "Wacom PL600SX", 6260, 5016, 255, 0,
4306 { "Wacom PL550", 6144, 4608, 511, 0,
4309 { "Wacom PL800", 7220, 5780, 511, 0,
4312 { "Wacom PL700", 6758, 5406, 511, 0,
4315 { "Wacom PL510", 6282, 4762, 511, 0,
4318 { "Wacom DTU710", 34080, 27660, 511, 0,
4321 { "Wacom DTF521", 6282, 4762, 511, 0,
4324 { "Wacom DTF720", 6858, 5506, 511, 0,
4327 { "Wacom DTF720a", 6858, 5506, 511, 0,
4330 { "Wacom Cintiq Partner", 20480, 15360, 511, 0,
4423 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf6 };
4426 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf8, .touch_max = 10,
4430 WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 0,
4435 WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 0,
4438 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x32C };
4441 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x32B, .touch_max = 10 };
4461 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x335 };
4464 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x333, .touch_max = 10,
4467 { "Wacom DTU1931", 37832, 30305, 511, 0,
4470 { "Wacom DTU2231", 47864, 27011, 511, 0,
4474 { "Wacom DTU1631", 34623, 19553, 511, 0,
4477 { "Wacom DTU1031", 22096, 13960, 511, 0,
4482 { "Wacom DTU1031X", 22672, 12928, 511, 0,
4483 DTUSX, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 0,
4487 { "Wacom DTU1141", 23672, 13403, 1023, 0,
4501 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5D };
4504 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x59, .touch_max = 10,
4521 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5e };
4524 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5b, .touch_max = 10,
4527 { "Wacom ISDv4 90", 26202, 16325, 255, 0,
4530 { "Wacom ISDv4 93", 26202, 16325, 255, 0,
4533 { "Wacom ISDv4 97", 26202, 16325, 511, 0,
4536 { "Wacom ISDv4 9A", 26202, 16325, 255, 0,
4539 { "Wacom ISDv4 9F", 26202, 16325, 255, 0,
4542 { "Wacom ISDv4 E2", 26202, 16325, 255, 0,
4545 { "Wacom ISDv4 E3", 26202, 16325, 255, 0,
4548 { "Wacom ISDv4 E5", 26202, 16325, 255, 0,
4551 { "Wacom ISDv4 E6", 27760, 15694, 255, 0,
4554 { "Wacom ISDv4 EC", 25710, 14500, 255, 0,
4557 { "Wacom ISDv4 ED", 26202, 16325, 255, 0,
4560 { "Wacom ISDv4 EF", 26202, 16325, 255, 0,
4563 { "Wacom ISDv4 100", 26202, 16325, 255, 0,
4566 { "Wacom ISDv4 101", 26202, 16325, 255, 0,
4569 { "Wacom ISDv4 10D", 26202, 16325, 255, 0,
4572 { "Wacom ISDv4 10E", 27760, 15694, 255, 0,
4575 { "Wacom ISDv4 10F", 27760, 15694, 255, 0,
4578 { "Wacom ISDv4 116", 26202, 16325, 255, 0,
4581 { "Wacom ISDv4 12C", 27848, 15752, 2047, 0,
4584 { "Wacom ISDv4 4001", 26202, 16325, 255, 0,
4587 { "Wacom ISDv4 4004", 11060, 6220, 255, 0,
4590 { "Wacom ISDv4 5000", 27848, 15752, 1023, 0,
4593 { "Wacom ISDv4 5002", 29576, 16724, 1023, 0,
4661 { "ISD-V4", 12800, 8000, 255, 0,
4668 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x309 };
4671 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x0307, .touch_max = 10,
4678 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x30C };
4681 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x30A, .touch_max = 10,
4694 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x326 };
4697 .oPid = 0x325 };
4723 { "Wacom DTK1651", 34816, 19759, 1023, 0,
4776 { USB_DEVICE_WACOM(0x00) },
4777 { USB_DEVICE_WACOM(0x03) },
4778 { USB_DEVICE_WACOM(0x10) },
4779 { USB_DEVICE_WACOM(0x11) },
4780 { USB_DEVICE_WACOM(0x12) },
4781 { USB_DEVICE_WACOM(0x13) },
4782 { USB_DEVICE_WACOM(0x14) },
4783 { USB_DEVICE_WACOM(0x15) },
4784 { USB_DEVICE_WACOM(0x16) },
4785 { USB_DEVICE_WACOM(0x17) },
4786 { USB_DEVICE_WACOM(0x18) },
4787 { USB_DEVICE_WACOM(0x19) },
4788 { USB_DEVICE_WACOM(0x20) },
4789 { USB_DEVICE_WACOM(0x21) },
4790 { USB_DEVICE_WACOM(0x22) },
4791 { USB_DEVICE_WACOM(0x23) },
4792 { USB_DEVICE_WACOM(0x24) },
4793 { USB_DEVICE_WACOM(0x26) },
4794 { USB_DEVICE_WACOM(0x27) },
4795 { USB_DEVICE_WACOM(0x28) },
4796 { USB_DEVICE_WACOM(0x29) },
4797 { USB_DEVICE_WACOM(0x2A) },
4798 { USB_DEVICE_WACOM(0x30) },
4799 { USB_DEVICE_WACOM(0x31) },
4800 { USB_DEVICE_WACOM(0x32) },
4801 { USB_DEVICE_WACOM(0x33) },
4802 { USB_DEVICE_WACOM(0x34) },
4803 { USB_DEVICE_WACOM(0x35) },
4804 { USB_DEVICE_WACOM(0x37) },
4805 { USB_DEVICE_WACOM(0x38) },
4806 { USB_DEVICE_WACOM(0x39) },
4807 { USB_DEVICE_WACOM(0x3F) },
4808 { USB_DEVICE_WACOM(0x41) },
4809 { USB_DEVICE_WACOM(0x42) },
4810 { USB_DEVICE_WACOM(0x43) },
4811 { USB_DEVICE_WACOM(0x44) },
4812 { USB_DEVICE_WACOM(0x45) },
4813 { USB_DEVICE_WACOM(0x47) },
4814 { USB_DEVICE_WACOM(0x57) },
4815 { USB_DEVICE_WACOM(0x59) },
4816 { USB_DEVICE_WACOM(0x5B) },
4817 { USB_DEVICE_WACOM(0x5D) },
4818 { USB_DEVICE_WACOM(0x5E) },
4819 { USB_DEVICE_WACOM(0x60) },
4820 { USB_DEVICE_WACOM(0x61) },
4821 { USB_DEVICE_WACOM(0x62) },
4822 { USB_DEVICE_WACOM(0x63) },
4823 { USB_DEVICE_WACOM(0x64) },
4824 { USB_DEVICE_WACOM(0x65) },
4825 { USB_DEVICE_WACOM(0x69) },
4826 { USB_DEVICE_WACOM(0x6A) },
4827 { USB_DEVICE_WACOM(0x6B) },
4828 { BT_DEVICE_WACOM(0x81) },
4829 { USB_DEVICE_WACOM(0x84) },
4830 { USB_DEVICE_WACOM(0x90) },
4831 { USB_DEVICE_WACOM(0x93) },
4832 { USB_DEVICE_WACOM(0x97) },
4833 { USB_DEVICE_WACOM(0x9A) },
4834 { USB_DEVICE_WACOM(0x9F) },
4835 { USB_DEVICE_WACOM(0xB0) },
4836 { USB_DEVICE_WACOM(0xB1) },
4837 { USB_DEVICE_WACOM(0xB2) },
4838 { USB_DEVICE_WACOM(0xB3) },
4839 { USB_DEVICE_WACOM(0xB4) },
4840 { USB_DEVICE_WACOM(0xB5) },
4841 { USB_DEVICE_WACOM(0xB7) },
4842 { USB_DEVICE_WACOM(0xB8) },
4843 { USB_DEVICE_WACOM(0xB9) },
4844 { USB_DEVICE_WACOM(0xBA) },
4845 { USB_DEVICE_WACOM(0xBB) },
4846 { USB_DEVICE_WACOM(0xBC) },
4847 { BT_DEVICE_WACOM(0xBD) },
4848 { USB_DEVICE_WACOM(0xC0) },
4849 { USB_DEVICE_WACOM(0xC2) },
4850 { USB_DEVICE_WACOM(0xC4) },
4851 { USB_DEVICE_WACOM(0xC5) },
4852 { USB_DEVICE_WACOM(0xC6) },
4853 { USB_DEVICE_WACOM(0xC7) },
4854 { USB_DEVICE_WACOM(0xCC) },
4855 { USB_DEVICE_WACOM(0xCE) },
4856 { USB_DEVICE_WACOM(0xD0) },
4857 { USB_DEVICE_WACOM(0xD1) },
4858 { USB_DEVICE_WACOM(0xD2) },
4859 { USB_DEVICE_WACOM(0xD3) },
4860 { USB_DEVICE_WACOM(0xD4) },
4861 { USB_DEVICE_WACOM(0xD5) },
4862 { USB_DEVICE_WACOM(0xD6) },
4863 { USB_DEVICE_WACOM(0xD7) },
4864 { USB_DEVICE_WACOM(0xD8) },
4865 { USB_DEVICE_WACOM(0xDA) },
4866 { USB_DEVICE_WACOM(0xDB) },
4867 { USB_DEVICE_WACOM(0xDD) },
4868 { USB_DEVICE_WACOM(0xDE) },
4869 { USB_DEVICE_WACOM(0xDF) },
4870 { USB_DEVICE_WACOM(0xE2) },
4871 { USB_DEVICE_WACOM(0xE3) },
4872 { USB_DEVICE_WACOM(0xE5) },
4873 { USB_DEVICE_WACOM(0xE6) },
4874 { USB_DEVICE_WACOM(0xEC) },
4875 { USB_DEVICE_WACOM(0xED) },
4876 { USB_DEVICE_WACOM(0xEF) },
4877 { USB_DEVICE_WACOM(0xF0) },
4878 { USB_DEVICE_WACOM(0xF4) },
4879 { USB_DEVICE_WACOM(0xF6) },
4880 { USB_DEVICE_WACOM(0xF8) },
4881 { USB_DEVICE_WACOM(0xFA) },
4882 { USB_DEVICE_WACOM(0xFB) },
4883 { USB_DEVICE_WACOM(0x100) },
4884 { USB_DEVICE_WACOM(0x101) },
4885 { USB_DEVICE_WACOM(0x10D) },
4886 { USB_DEVICE_WACOM(0x10E) },
4887 { USB_DEVICE_WACOM(0x10F) },
4888 { USB_DEVICE_WACOM(0x116) },
4889 { USB_DEVICE_WACOM(0x12C) },
4890 { USB_DEVICE_WACOM(0x300) },
4891 { USB_DEVICE_WACOM(0x301) },
4892 { USB_DEVICE_WACOM(0x302) },
4893 { USB_DEVICE_WACOM(0x303) },
4894 { USB_DEVICE_WACOM(0x304) },
4895 { USB_DEVICE_WACOM(0x307) },
4896 { USB_DEVICE_WACOM(0x309) },
4897 { USB_DEVICE_WACOM(0x30A) },
4898 { USB_DEVICE_WACOM(0x30C) },
4899 { USB_DEVICE_WACOM(0x30E) },
4900 { USB_DEVICE_WACOM(0x314) },
4901 { USB_DEVICE_WACOM(0x315) },
4902 { USB_DEVICE_WACOM(0x317) },
4903 { USB_DEVICE_WACOM(0x318) },
4904 { USB_DEVICE_WACOM(0x319) },
4905 { USB_DEVICE_WACOM(0x323) },
4906 { USB_DEVICE_WACOM(0x325) },
4907 { USB_DEVICE_WACOM(0x326) },
4908 { USB_DEVICE_WACOM(0x32A) },
4909 { USB_DEVICE_WACOM(0x32B) },
4910 { USB_DEVICE_WACOM(0x32C) },
4911 { USB_DEVICE_WACOM(0x32F) },
4912 { USB_DEVICE_WACOM(0x331) },
4913 { USB_DEVICE_WACOM(0x333) },
4914 { USB_DEVICE_WACOM(0x335) },
4915 { USB_DEVICE_WACOM(0x336) },
4916 { USB_DEVICE_WACOM(0x33B) },
4917 { USB_DEVICE_WACOM(0x33C) },
4918 { USB_DEVICE_WACOM(0x33D) },
4919 { USB_DEVICE_WACOM(0x33E) },
4920 { USB_DEVICE_WACOM(0x343) },
4921 { BT_DEVICE_WACOM(0x360) },
4922 { BT_DEVICE_WACOM(0x361) },
4923 { BT_DEVICE_WACOM(0x377) },
4924 { BT_DEVICE_WACOM(0x379) },
4925 { USB_DEVICE_WACOM(0x37A) },
4926 { USB_DEVICE_WACOM(0x37B) },
4927 { BT_DEVICE_WACOM(0x393) },
4928 { BT_DEVICE_WACOM(0x3c6) },
4929 { BT_DEVICE_WACOM(0x3c8) },
4930 { USB_DEVICE_WACOM(0x4001) },
4931 { USB_DEVICE_WACOM(0x4004) },
4932 { USB_DEVICE_WACOM(0x5000) },
4933 { USB_DEVICE_WACOM(0x5002) },
4934 { USB_DEVICE_LENOVO(0x6004) },