Lines Matching +full:0 +full:x392

45 	wacom_wac->shared->stylus_in_proximity = 0;  in wacom_force_proxout()
47 input_report_key(input, BTN_TOUCH, 0); in wacom_force_proxout()
48 input_report_key(input, BTN_STYLUS, 0); in wacom_force_proxout()
49 input_report_key(input, BTN_STYLUS2, 0); in wacom_force_proxout()
50 input_report_key(input, BTN_STYLUS3, 0); in wacom_force_proxout()
51 input_report_key(input, wacom_wac->tool[0], 0); in wacom_force_proxout()
52 if (wacom_wac->serial[0]) { in wacom_force_proxout()
53 input_report_abs(input, ABS_MISC, 0); in wacom_force_proxout()
55 input_report_abs(input, ABS_PRESSURE, 0); in wacom_force_proxout()
57 wacom_wac->tool[0] = 0; in wacom_force_proxout()
58 wacom_wac->id[0] = 0; in wacom_force_proxout()
59 wacom_wac->serial[0] = 0; in wacom_force_proxout()
131 switch (data[0]) { in wacom_penpartner_irq()
133 if (data[5] & 0x80) { in wacom_penpartner_irq()
134 wacom->tool[0] = (data[5] & 0x20) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN; in wacom_penpartner_irq()
135 wacom->id[0] = (data[5] & 0x20) ? ERASER_DEVICE_ID : STYLUS_DEVICE_ID; in wacom_penpartner_irq()
136 input_report_key(input, wacom->tool[0], 1); in wacom_penpartner_irq()
137 input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */ in wacom_penpartner_irq()
142 input_report_key(input, BTN_STYLUS, (data[5] & 0x40)); in wacom_penpartner_irq()
144 input_report_key(input, wacom->tool[0], 0); in wacom_penpartner_irq()
145 input_report_abs(input, ABS_MISC, 0); /* report tool id */ in wacom_penpartner_irq()
147 input_report_key(input, BTN_TOUCH, 0); in wacom_penpartner_irq()
157 input_report_key(input, BTN_TOUCH, ((signed char)data[6] > -80) && !(data[5] & 0x20)); in wacom_penpartner_irq()
158 input_report_key(input, BTN_STYLUS, (data[5] & 0x40)); in wacom_penpartner_irq()
163 "%s: received unknown report #%d\n", __func__, data[0]); in wacom_penpartner_irq()
164 return 0; in wacom_penpartner_irq()
177 if (data[0] != WACOM_REPORT_PENABLED) { in wacom_pl_irq()
179 "%s: received unknown report #%d\n", __func__, data[0]); in wacom_pl_irq()
180 return 0; in wacom_pl_irq()
183 prox = data[1] & 0x40; in wacom_pl_irq()
185 if (!wacom->id[0]) { in wacom_pl_irq()
186 if ((data[0] & 0x10) || (data[4] & 0x20)) { in wacom_pl_irq()
187 wacom->tool[0] = BTN_TOOL_RUBBER; in wacom_pl_irq()
188 wacom->id[0] = ERASER_DEVICE_ID; in wacom_pl_irq()
191 wacom->tool[0] = BTN_TOOL_PEN; in wacom_pl_irq()
192 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_pl_irq()
200 if (wacom->tool[0] == BTN_TOOL_RUBBER && !(data[4] & 0x20)) { in wacom_pl_irq()
201 input_report_key(input, BTN_TOOL_RUBBER, 0); in wacom_pl_irq()
202 input_report_abs(input, ABS_MISC, 0); in wacom_pl_irq()
204 wacom->tool[0] = BTN_TOOL_PEN; in wacom_pl_irq()
205 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_pl_irq()
214 input_report_abs(input, ABS_X, data[3] | (data[2] << 7) | ((data[1] & 0x03) << 14)); in wacom_pl_irq()
215 input_report_abs(input, ABS_Y, data[6] | (data[5] << 7) | ((data[4] & 0x03) << 14)); in wacom_pl_irq()
218 input_report_key(input, BTN_TOUCH, data[4] & 0x08); in wacom_pl_irq()
219 input_report_key(input, BTN_STYLUS, data[4] & 0x10); in wacom_pl_irq()
221 input_report_key(input, BTN_STYLUS2, (wacom->tool[0] == BTN_TOOL_PEN) && (data[4] & 0x20)); in wacom_pl_irq()
225 wacom->id[0] = 0; in wacom_pl_irq()
226 input_report_key(input, wacom->tool[0], prox); in wacom_pl_irq()
227 input_report_abs(input, ABS_MISC, wacom->id[0]); in wacom_pl_irq()
236 if (data[0] != WACOM_REPORT_PENABLED) { in wacom_ptu_irq()
238 "%s: received unknown report #%d\n", __func__, data[0]); in wacom_ptu_irq()
239 return 0; in wacom_ptu_irq()
242 if (data[1] & 0x04) { in wacom_ptu_irq()
243 input_report_key(input, BTN_TOOL_RUBBER, data[1] & 0x20); in wacom_ptu_irq()
244 input_report_key(input, BTN_TOUCH, data[1] & 0x08); in wacom_ptu_irq()
245 wacom->id[0] = ERASER_DEVICE_ID; in wacom_ptu_irq()
247 input_report_key(input, BTN_TOOL_PEN, data[1] & 0x20); in wacom_ptu_irq()
248 input_report_key(input, BTN_TOUCH, data[1] & 0x01); in wacom_ptu_irq()
249 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_ptu_irq()
251 input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */ in wacom_ptu_irq()
255 input_report_key(input, BTN_STYLUS, data[1] & 0x02); in wacom_ptu_irq()
256 input_report_key(input, BTN_STYLUS2, data[1] & 0x10); in wacom_ptu_irq()
264 int prox = data[1] & 0x20; in wacom_dtu_irq()
267 "%s: received report #%d", __func__, data[0]); in wacom_dtu_irq()
271 wacom->tool[0] = (data[1] & 0x0c) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN; in wacom_dtu_irq()
272 if (wacom->tool[0] == BTN_TOOL_PEN) in wacom_dtu_irq()
273 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_dtu_irq()
275 wacom->id[0] = ERASER_DEVICE_ID; in wacom_dtu_irq()
277 input_report_key(input, BTN_STYLUS, data[1] & 0x02); in wacom_dtu_irq()
278 input_report_key(input, BTN_STYLUS2, data[1] & 0x10); in wacom_dtu_irq()
281 input_report_abs(input, ABS_PRESSURE, ((data[7] & 0x01) << 8) | data[6]); in wacom_dtu_irq()
282 input_report_key(input, BTN_TOUCH, data[1] & 0x05); in wacom_dtu_irq()
284 wacom->id[0] = 0; in wacom_dtu_irq()
285 input_report_key(input, wacom->tool[0], prox); in wacom_dtu_irq()
286 input_report_abs(input, ABS_MISC, wacom->id[0]); in wacom_dtu_irq()
294 unsigned short prox, pressure = 0; in wacom_dtus_irq()
296 if (data[0] != WACOM_REPORT_DTUS && data[0] != WACOM_REPORT_DTUSPAD) { in wacom_dtus_irq()
298 "%s: received unknown report #%d", __func__, data[0]); in wacom_dtus_irq()
299 return 0; in wacom_dtus_irq()
300 } else if (data[0] == WACOM_REPORT_DTUSPAD) { in wacom_dtus_irq()
302 input_report_key(input, BTN_0, (data[1] & 0x01)); in wacom_dtus_irq()
303 input_report_key(input, BTN_1, (data[1] & 0x02)); in wacom_dtus_irq()
304 input_report_key(input, BTN_2, (data[1] & 0x04)); in wacom_dtus_irq()
305 input_report_key(input, BTN_3, (data[1] & 0x08)); in wacom_dtus_irq()
307 data[1] & 0x0f ? PAD_DEVICE_ID : 0); in wacom_dtus_irq()
310 prox = data[1] & 0x80; in wacom_dtus_irq()
314 wacom->tool[0] = BTN_TOOL_RUBBER; in wacom_dtus_irq()
315 wacom->id[0] = ERASER_DEVICE_ID; in wacom_dtus_irq()
319 wacom->tool[0] = BTN_TOOL_PEN; in wacom_dtus_irq()
320 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_dtus_irq()
325 input_report_key(input, BTN_STYLUS, data[1] & 0x20); in wacom_dtus_irq()
326 input_report_key(input, BTN_STYLUS2, data[1] & 0x40); in wacom_dtus_irq()
329 pressure = ((data[1] & 0x03) << 8) | (data[2] & 0xff); in wacom_dtus_irq()
334 wacom->id[0] = 0; in wacom_dtus_irq()
335 input_report_key(input, wacom->tool[0], prox); in wacom_dtus_irq()
336 input_report_abs(input, ABS_MISC, wacom->id[0]); in wacom_dtus_irq()
349 int rw = 0; in wacom_graphire_irq()
350 int retval = 0; in wacom_graphire_irq()
353 if (data[0] != WACOM_REPORT_PENABLED_BT) { in wacom_graphire_irq()
356 data[0]); in wacom_graphire_irq()
359 } else if (data[0] != WACOM_REPORT_PENABLED) { in wacom_graphire_irq()
361 "%s: received unknown report #%d\n", __func__, data[0]); in wacom_graphire_irq()
365 prox = data[1] & 0x80; in wacom_graphire_irq()
366 if (prox || wacom->id[0]) { in wacom_graphire_irq()
370 case 0: /* Pen */ in wacom_graphire_irq()
371 wacom->tool[0] = BTN_TOOL_PEN; in wacom_graphire_irq()
372 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_graphire_irq()
376 wacom->tool[0] = BTN_TOOL_RUBBER; in wacom_graphire_irq()
377 wacom->id[0] = ERASER_DEVICE_ID; in wacom_graphire_irq()
381 input_report_key(input, BTN_MIDDLE, data[1] & 0x04); in wacom_graphire_irq()
385 wacom->tool[0] = BTN_TOOL_MOUSE; in wacom_graphire_irq()
386 wacom->id[0] = CURSOR_DEVICE_ID; in wacom_graphire_irq()
392 if (wacom->tool[0] != BTN_TOOL_MOUSE) { in wacom_graphire_irq()
395 (((__u16) (data[1] & 0x08)) << 5)); in wacom_graphire_irq()
398 ((data[7] & 0x03) << 8)); in wacom_graphire_irq()
399 input_report_key(input, BTN_TOUCH, data[1] & 0x01); in wacom_graphire_irq()
400 input_report_key(input, BTN_STYLUS, data[1] & 0x02); in wacom_graphire_irq()
401 input_report_key(input, BTN_STYLUS2, data[1] & 0x04); in wacom_graphire_irq()
403 input_report_key(input, BTN_LEFT, data[1] & 0x01); in wacom_graphire_irq()
404 input_report_key(input, BTN_RIGHT, data[1] & 0x02); in wacom_graphire_irq()
407 input_report_abs(input, ABS_DISTANCE, data[6] & 0x3f); in wacom_graphire_irq()
408 rw = (data[7] & 0x04) - (data[7] & 0x03); in wacom_graphire_irq()
412 rw = clamp_val(rw, 0, 31); in wacom_graphire_irq()
417 data[1] & 0x04); in wacom_graphire_irq()
418 rw = (data[6] & 0x01) ? -1 : in wacom_graphire_irq()
419 (data[6] & 0x02) ? 1 : 0; in wacom_graphire_irq()
421 rw = 0; in wacom_graphire_irq()
424 input_report_abs(input, ABS_DISTANCE, data[7] & 0x3f); in wacom_graphire_irq()
431 wacom->id[0] = 0; in wacom_graphire_irq()
432 input_report_abs(input, ABS_MISC, wacom->id[0]); /* report tool id */ in wacom_graphire_irq()
433 input_report_key(input, wacom->tool[0], prox); in wacom_graphire_irq()
440 prox = data[7] & 0xf8; in wacom_graphire_irq()
443 input_report_key(pad_input, BTN_BACK, (data[7] & 0x40)); in wacom_graphire_irq()
444 input_report_key(pad_input, BTN_FORWARD, (data[7] & 0x80)); in wacom_graphire_irq()
445 rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); in wacom_graphire_irq()
448 wacom->id[1] = 0; in wacom_graphire_irq()
455 prox = (data[7] & 0xf8) || data[8]; in wacom_graphire_irq()
458 input_report_key(pad_input, BTN_BACK, (data[7] & 0x08)); in wacom_graphire_irq()
459 input_report_key(pad_input, BTN_LEFT, (data[7] & 0x20)); in wacom_graphire_irq()
460 input_report_key(pad_input, BTN_FORWARD, (data[7] & 0x10)); in wacom_graphire_irq()
461 input_report_key(pad_input, BTN_RIGHT, (data[7] & 0x40)); in wacom_graphire_irq()
462 input_report_abs(pad_input, ABS_WHEEL, (data[8] & 0x7f)); in wacom_graphire_irq()
464 wacom->id[1] = 0; in wacom_graphire_irq()
470 prox = data[7] & 0x03; in wacom_graphire_irq()
473 input_report_key(pad_input, BTN_0, (data[7] & 0x02)); in wacom_graphire_irq()
474 input_report_key(pad_input, BTN_1, (data[7] & 0x01)); in wacom_graphire_irq()
476 wacom->id[1] = 0; in wacom_graphire_irq()
485 rw = (data[7] >> 2 & 0x07); in wacom_graphire_irq()
519 int buttons = 0, nbuttons = features->numbered_buttons; in wacom_intuos_pad()
520 int keys = 0, nkeys = 0; in wacom_intuos_pad()
521 int ring1 = 0, ring2 = 0; in wacom_intuos_pad()
522 int strip1 = 0, strip2 = 0; in wacom_intuos_pad()
528 if (!(data[0] == WACOM_REPORT_INTUOSPAD || data[0] == WACOM_REPORT_INTUOS5PAD || in wacom_intuos_pad()
529 data[0] == WACOM_REPORT_CINTIQPAD)) in wacom_intuos_pad()
530 return 0; in wacom_intuos_pad()
533 buttons = (data[3] << 1) | (data[2] & 0x01); in wacom_intuos_pad()
538 buttons = (data[4] << 1) | (data[3] & 0x01); in wacom_intuos_pad()
549 * ((data[3] & 0x1f) << 8) | data[4]) in wacom_intuos_pad()
552 keys = ((data[3] & 0x1C) ? 1<<2 : 0) | in wacom_intuos_pad()
553 ((data[4] & 0xE0) ? 1<<1 : 0) | in wacom_intuos_pad()
554 ((data[4] & 0x07) ? 1<<0 : 0); in wacom_intuos_pad()
555 keyboard = !!(data[4] & 0xE0); in wacom_intuos_pad()
556 info = !!(data[3] & 0x1C); in wacom_intuos_pad()
559 mute_touch = !!(data[4] & 0x07); in wacom_intuos_pad()
564 wrench = !!(data[4] & 0x07); in wacom_intuos_pad()
568 keys = data[2] & 0x07; in wacom_intuos_pad()
570 wrench = !!(data[2] & 0x01); in wacom_intuos_pad()
571 keyboard = !!(data[2] & 0x02); in wacom_intuos_pad()
574 mute_touch = !!(data[2] & 0x04); in wacom_intuos_pad()
579 menu = !!(data[2] & 0x04); in wacom_intuos_pad()
590 * d-pad right -> data[4] & 0x10 in wacom_intuos_pad()
591 * d-pad up -> data[4] & 0x20 in wacom_intuos_pad()
592 * d-pad left -> data[4] & 0x40 in wacom_intuos_pad()
593 * d-pad down -> data[4] & 0x80 in wacom_intuos_pad()
594 * d-pad center -> data[3] & 0x01 in wacom_intuos_pad()
596 buttons = (data[4] << 1) | (data[3] & 0x01); in wacom_intuos_pad()
598 /* d-pad right -> data[2] & 0x10 in wacom_intuos_pad()
599 * d-pad up -> data[2] & 0x20 in wacom_intuos_pad()
600 * d-pad left -> data[2] & 0x40 in wacom_intuos_pad()
601 * d-pad down -> data[2] & 0x80 in wacom_intuos_pad()
602 * d-pad center -> data[1] & 0x01 in wacom_intuos_pad()
605 ((data[1] & 0x04) << 4) | in wacom_intuos_pad()
606 ((data[2] & 0x0F) << 2) | in wacom_intuos_pad()
607 (data[1] & 0x03); in wacom_intuos_pad()
616 buttons = (data[4] << 1) | (data[3] & 0x01); in wacom_intuos_pad()
620 buttons = (data[8] << 10) | ((data[7] & 0x01) << 9) | in wacom_intuos_pad()
621 (data[6] << 1) | (data[5] & 0x01); in wacom_intuos_pad()
625 keys = data[9] & 0x07; in wacom_intuos_pad()
627 info = !!(data[9] & 0x01); in wacom_intuos_pad()
628 wrench = !!(data[9] & 0x02); in wacom_intuos_pad()
631 buttons = ((data[6] & 0x10) << 5) | in wacom_intuos_pad()
632 ((data[5] & 0x10) << 4) | in wacom_intuos_pad()
633 ((data[6] & 0x0F) << 4) | in wacom_intuos_pad()
634 (data[5] & 0x0F); in wacom_intuos_pad()
636 strip1 = ((data[1] & 0x1f) << 8) | data[2]; in wacom_intuos_pad()
637 strip2 = ((data[3] & 0x1f) << 8) | data[4]; in wacom_intuos_pad()
640 prox = (buttons & ~(~0U << nbuttons)) | (keys & ~(~0U << nkeys)) | in wacom_intuos_pad()
641 (ring1 & 0x80) | (ring2 & 0x80) | strip1 | strip2; in wacom_intuos_pad()
645 for (i = 0; i < nkeys; i++) in wacom_intuos_pad()
663 input_report_abs(input, ABS_WHEEL, (ring1 & 0x80) ? (ring1 & 0x7f) : 0); in wacom_intuos_pad()
664 input_report_abs(input, ABS_THROTTLE, (ring2 & 0x80) ? (ring2 & 0x7f) : 0); in wacom_intuos_pad()
666 input_report_key(input, wacom->tool[1], prox ? 1 : 0); in wacom_intuos_pad()
667 input_report_abs(input, ABS_MISC, prox ? PAD_DEVICE_ID : 0); in wacom_intuos_pad()
669 input_event(input, EV_MSC, MSC_SERIAL, 0xffffffff); in wacom_intuos_pad()
676 return (tool_id & ~0xFFF) << 4 | (tool_id & 0xFFF); in wacom_intuos_id_mangle()
684 case 0x885: /* Intuos3 Marker Pen */ in wacom_is_art_pen()
685 case 0x804: /* Intuos4/5 13HD/24HD Marker Pen */ in wacom_is_art_pen()
686 case 0x10804: /* Intuos4/5 13HD/24HD Art Pen */ in wacom_is_art_pen()
696 case 0x812: /* Inking pen */ in wacom_intuos_get_tool_type()
697 case 0x801: /* Intuos3 Inking pen */ in wacom_intuos_get_tool_type()
698 case 0x12802: /* Intuos4/5 Inking Pen */ in wacom_intuos_get_tool_type()
699 case 0x012: in wacom_intuos_get_tool_type()
702 case 0x832: /* Stroke pen */ in wacom_intuos_get_tool_type()
703 case 0x032: in wacom_intuos_get_tool_type()
706 case 0x007: /* Mouse 4D and 2D */ in wacom_intuos_get_tool_type()
707 case 0x09c: in wacom_intuos_get_tool_type()
708 case 0x094: in wacom_intuos_get_tool_type()
709 case 0x017: /* Intuos3 2D Mouse */ in wacom_intuos_get_tool_type()
710 case 0x806: /* Intuos4 Mouse */ in wacom_intuos_get_tool_type()
713 case 0x096: /* Lens cursor */ in wacom_intuos_get_tool_type()
714 case 0x097: /* Intuos3 Lens cursor */ in wacom_intuos_get_tool_type()
715 case 0x006: /* Intuos4 Lens cursor */ in wacom_intuos_get_tool_type()
718 case 0xd12: in wacom_intuos_get_tool_type()
719 case 0x912: in wacom_intuos_get_tool_type()
720 case 0x112: in wacom_intuos_get_tool_type()
721 case 0x913: /* Intuos3 Airbrush */ in wacom_intuos_get_tool_type()
722 case 0x902: /* Intuos4/5 13HD/24HD Airbrush */ in wacom_intuos_get_tool_type()
723 case 0x10902: /* Intuos4/5 13HD/24HD Airbrush */ in wacom_intuos_get_tool_type()
727 if (tool_id & 0x0008) in wacom_intuos_get_tool_type()
738 int idx = (features->type == INTUOS) ? (data[1] & 0x01) : 0; in wacom_exit_report()
744 input_report_abs(input, ABS_X, 0); in wacom_exit_report()
745 input_report_abs(input, ABS_Y, 0); in wacom_exit_report()
746 input_report_abs(input, ABS_DISTANCE, 0); in wacom_exit_report()
747 input_report_abs(input, ABS_TILT_X, 0); in wacom_exit_report()
748 input_report_abs(input, ABS_TILT_Y, 0); in wacom_exit_report()
750 input_report_key(input, BTN_LEFT, 0); in wacom_exit_report()
751 input_report_key(input, BTN_MIDDLE, 0); in wacom_exit_report()
752 input_report_key(input, BTN_RIGHT, 0); in wacom_exit_report()
753 input_report_key(input, BTN_SIDE, 0); in wacom_exit_report()
754 input_report_key(input, BTN_EXTRA, 0); in wacom_exit_report()
755 input_report_abs(input, ABS_THROTTLE, 0); in wacom_exit_report()
756 input_report_abs(input, ABS_RZ, 0); in wacom_exit_report()
758 input_report_abs(input, ABS_PRESSURE, 0); in wacom_exit_report()
759 input_report_key(input, BTN_STYLUS, 0); in wacom_exit_report()
760 input_report_key(input, BTN_STYLUS2, 0); in wacom_exit_report()
761 input_report_key(input, BTN_TOUCH, 0); in wacom_exit_report()
762 input_report_abs(input, ABS_WHEEL, 0); in wacom_exit_report()
764 input_report_abs(input, ABS_Z, 0); in wacom_exit_report()
766 input_report_key(input, wacom->tool[idx], 0); in wacom_exit_report()
767 input_report_abs(input, ABS_MISC, 0); /* reset tool id */ in wacom_exit_report()
769 wacom->id[idx] = 0; in wacom_exit_report()
777 int idx = (features->type == INTUOS) ? (data[1] & 0x01) : 0; in wacom_intuos_inout()
779 if (!(((data[1] & 0xfc) == 0xc0) || /* in prox */ in wacom_intuos_inout()
780 ((data[1] & 0xfe) == 0x20) || /* in range */ in wacom_intuos_inout()
781 ((data[1] & 0xfe) == 0x80))) /* out prox */ in wacom_intuos_inout()
782 return 0; in wacom_intuos_inout()
785 if ((data[1] & 0xfc) == 0xc0) { in wacom_intuos_inout()
787 wacom->serial[idx] = ((__u64)(data[3] & 0x0f) << 28) + in wacom_intuos_inout()
792 ((data[7] & 0x0f) << 16) | ((data[8] & 0xf0) << 8); in wacom_intuos_inout()
801 if ((data[1] & 0xfe) == 0x20) { in wacom_intuos_inout()
807 input_report_key(input, BTN_TOUCH, 0); in wacom_intuos_inout()
808 input_report_abs(input, ABS_PRESSURE, 0); in wacom_intuos_inout()
816 if ((data[1] & 0xfe) == 0x80) { in wacom_intuos_inout()
828 return 0; in wacom_intuos_inout()
853 int idx = (features->type == INTUOS) ? (data[1] & 0x01) : 0; in wacom_intuos_general()
854 unsigned char type = (data[1] >> 1) & 0x0F; in wacom_intuos_general()
857 if (data[0] != WACOM_REPORT_PENABLED && data[0] != WACOM_REPORT_CINTIQ && in wacom_intuos_general()
858 data[0] != WACOM_REPORT_INTUOS_PEN) in wacom_intuos_general()
859 return 0; in wacom_intuos_general()
875 if ((!((wacom->id[idx] >> 16) & 0x01) && in wacom_intuos_general()
888 (features->type == CINTIQ && !(data[1] & 0x40))) in wacom_intuos_general()
906 case 0x00: in wacom_intuos_general()
907 case 0x01: in wacom_intuos_general()
908 case 0x02: in wacom_intuos_general()
909 case 0x03: in wacom_intuos_general()
911 t = (data[6] << 3) | ((data[7] & 0xC0) >> 5) | (data[1] & 1); in wacom_intuos_general()
917 (((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64); in wacom_intuos_general()
918 input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64); in wacom_intuos_general()
925 case 0x0a: in wacom_intuos_general()
930 (((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64); in wacom_intuos_general()
931 input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64); in wacom_intuos_general()
934 case 0x05: in wacom_intuos_general()
939 t = (data[7] & 0x20) ? ((t > 900) ? ((t-1) / 2 - 1350) : in wacom_intuos_general()
945 input_report_abs(input, ABS_RZ, (data[7] & 0x20) ? in wacom_intuos_general()
950 case 0x04: in wacom_intuos_general()
952 input_report_key(input, BTN_LEFT, data[8] & 0x01); in wacom_intuos_general()
953 input_report_key(input, BTN_MIDDLE, data[8] & 0x02); in wacom_intuos_general()
954 input_report_key(input, BTN_RIGHT, data[8] & 0x04); in wacom_intuos_general()
956 input_report_key(input, BTN_SIDE, data[8] & 0x20); in wacom_intuos_general()
957 input_report_key(input, BTN_EXTRA, data[8] & 0x10); in wacom_intuos_general()
959 input_report_abs(input, ABS_THROTTLE, (data[8] & 0x08) ? -t : t); in wacom_intuos_general()
962 case 0x06: in wacom_intuos_general()
964 input_report_key(input, BTN_LEFT, data[6] & 0x01); in wacom_intuos_general()
965 input_report_key(input, BTN_MIDDLE, data[6] & 0x02); in wacom_intuos_general()
966 input_report_key(input, BTN_RIGHT, data[6] & 0x04); in wacom_intuos_general()
967 input_report_rel(input, REL_WHEEL, ((data[7] & 0x80) >> 7) in wacom_intuos_general()
968 - ((data[7] & 0x40) >> 6)); in wacom_intuos_general()
969 input_report_key(input, BTN_SIDE, data[6] & 0x08); in wacom_intuos_general()
970 input_report_key(input, BTN_EXTRA, data[6] & 0x10); in wacom_intuos_general()
973 (((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64); in wacom_intuos_general()
974 input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64); in wacom_intuos_general()
977 case 0x08: in wacom_intuos_general()
980 input_report_key(input, BTN_LEFT, data[8] & 0x04); in wacom_intuos_general()
981 input_report_key(input, BTN_MIDDLE, data[8] & 0x08); in wacom_intuos_general()
982 input_report_key(input, BTN_RIGHT, data[8] & 0x10); in wacom_intuos_general()
983 input_report_rel(input, REL_WHEEL, (data[8] & 0x01) in wacom_intuos_general()
984 - ((data[8] & 0x02) >> 1)); in wacom_intuos_general()
988 input_report_key(input, BTN_SIDE, data[8] & 0x40); in wacom_intuos_general()
989 input_report_key(input, BTN_EXTRA, data[8] & 0x20); in wacom_intuos_general()
994 input_report_key(input, BTN_LEFT, data[8] & 0x01); in wacom_intuos_general()
995 input_report_key(input, BTN_MIDDLE, data[8] & 0x02); in wacom_intuos_general()
996 input_report_key(input, BTN_RIGHT, data[8] & 0x04); in wacom_intuos_general()
997 input_report_key(input, BTN_SIDE, data[8] & 0x10); in wacom_intuos_general()
998 input_report_key(input, BTN_EXTRA, data[8] & 0x08); in wacom_intuos_general()
1002 case 0x07: in wacom_intuos_general()
1003 case 0x09: in wacom_intuos_general()
1004 case 0x0b: in wacom_intuos_general()
1005 case 0x0c: in wacom_intuos_general()
1006 case 0x0d: in wacom_intuos_general()
1007 case 0x0e: in wacom_intuos_general()
1008 case 0x0f: in wacom_intuos_general()
1027 if (data[0] != WACOM_REPORT_PENABLED && in wacom_intuos_irq()
1028 data[0] != WACOM_REPORT_INTUOS_ID1 && in wacom_intuos_irq()
1029 data[0] != WACOM_REPORT_INTUOS_ID2 && in wacom_intuos_irq()
1030 data[0] != WACOM_REPORT_INTUOSPAD && in wacom_intuos_irq()
1031 data[0] != WACOM_REPORT_INTUOS_PEN && in wacom_intuos_irq()
1032 data[0] != WACOM_REPORT_CINTIQ && in wacom_intuos_irq()
1033 data[0] != WACOM_REPORT_CINTIQPAD && in wacom_intuos_irq()
1034 data[0] != WACOM_REPORT_INTUOS5PAD) { in wacom_intuos_irq()
1036 "%s: received unknown report #%d\n", __func__, data[0]); in wacom_intuos_irq()
1037 return 0; in wacom_intuos_irq()
1055 return 0; in wacom_intuos_irq()
1069 if (data[0] != WACOM_REPORT_REMOTE) { in wacom_remote_irq()
1071 __func__, data[0]); in wacom_remote_irq()
1072 return 0; in wacom_remote_irq()
1076 wacom_wac->id[0] = PAD_DEVICE_ID; in wacom_remote_irq()
1080 for (i = 0; i < WACOM_MAX_REMOTES; i++) { in wacom_remote_irq()
1087 if (index < 0 || !remote->remotes[index].registered) in wacom_remote_irq()
1093 input_report_key(input, BTN_0, (data[9] & 0x01)); in wacom_remote_irq()
1094 input_report_key(input, BTN_1, (data[9] & 0x02)); in wacom_remote_irq()
1095 input_report_key(input, BTN_2, (data[9] & 0x04)); in wacom_remote_irq()
1096 input_report_key(input, BTN_3, (data[9] & 0x08)); in wacom_remote_irq()
1097 input_report_key(input, BTN_4, (data[9] & 0x10)); in wacom_remote_irq()
1098 input_report_key(input, BTN_5, (data[9] & 0x20)); in wacom_remote_irq()
1099 input_report_key(input, BTN_6, (data[9] & 0x40)); in wacom_remote_irq()
1100 input_report_key(input, BTN_7, (data[9] & 0x80)); in wacom_remote_irq()
1102 input_report_key(input, BTN_8, (data[10] & 0x01)); in wacom_remote_irq()
1103 input_report_key(input, BTN_9, (data[10] & 0x02)); in wacom_remote_irq()
1104 input_report_key(input, BTN_A, (data[10] & 0x04)); in wacom_remote_irq()
1105 input_report_key(input, BTN_B, (data[10] & 0x08)); in wacom_remote_irq()
1106 input_report_key(input, BTN_C, (data[10] & 0x10)); in wacom_remote_irq()
1107 input_report_key(input, BTN_X, (data[10] & 0x20)); in wacom_remote_irq()
1108 input_report_key(input, BTN_Y, (data[10] & 0x40)); in wacom_remote_irq()
1109 input_report_key(input, BTN_Z, (data[10] & 0x80)); in wacom_remote_irq()
1111 input_report_key(input, BTN_BASE, (data[11] & 0x01)); in wacom_remote_irq()
1112 input_report_key(input, BTN_BASE2, (data[11] & 0x02)); in wacom_remote_irq()
1114 if (data[12] & 0x80) in wacom_remote_irq()
1115 input_report_abs(input, ABS_WHEEL, (data[12] & 0x7f) - 1); in wacom_remote_irq()
1117 input_report_abs(input, ABS_WHEEL, 0); in wacom_remote_irq()
1119 bat_percent = data[7] & 0x7f; in wacom_remote_irq()
1120 bat_charging = !!(data[7] & 0x80); in wacom_remote_irq()
1122 if (data[9] | data[10] | (data[11] & 0x03) | data[12]) in wacom_remote_irq()
1125 input_report_abs(input, ABS_MISC, 0); in wacom_remote_irq()
1132 touch_ring_mode = (data[11] & 0xC0) >> 6; in wacom_remote_irq()
1134 for (i = 0; i < WACOM_MAX_REMOTES; i++) { in wacom_remote_irq()
1145 return 0; in wacom_remote_irq()
1157 if (data[0] != WACOM_REPORT_DEVICE_LIST) in wacom_remote_status_irq()
1160 memset(&remote_data, 0, sizeof(struct wacom_remote_work_data)); in wacom_remote_status_irq()
1162 for (i = 0; i < WACOM_MAX_REMOTES; i++) { in wacom_remote_status_irq()
1210 switch (data[0]) { in wacom_intuos_bt_irq()
1211 case 0x04: in wacom_intuos_bt_irq()
1215 case 0x03: in wacom_intuos_bt_irq()
1221 bat_charging = (power_raw & 0x08) ? 1 : 0; in wacom_intuos_bt_irq()
1222 ps_connected = (power_raw & 0x10) ? 1 : 0; in wacom_intuos_bt_irq()
1223 battery_capacity = batcap_i4[power_raw & 0x07]; in wacom_intuos_bt_irq()
1232 data[0], data[1], len); in wacom_intuos_bt_irq()
1233 return 0; in wacom_intuos_bt_irq()
1235 return 0; in wacom_intuos_bt_irq()
1242 int count = 0; in wacom_wac_finger_count_touches()
1246 return 0; in wacom_wac_finger_count_touches()
1252 for (i = 0; i < input->mt->num_slots; i++) { in wacom_wac_finger_count_touches()
1255 if (id >= 0) in wacom_wac_finger_count_touches()
1268 int number_of_valid_frames = 0; in wacom_intuos_pro2_bt_pen()
1275 wacom->serial[0] = get_unaligned_le64(&data[99]); in wacom_intuos_pro2_bt_pen()
1276 wacom->id[0] = get_unaligned_le16(&data[107]); in wacom_intuos_pro2_bt_pen()
1280 wacom->serial[0] = get_unaligned_le64(&data[33]); in wacom_intuos_pro2_bt_pen()
1281 wacom->id[0] = get_unaligned_le16(&data[41]); in wacom_intuos_pro2_bt_pen()
1286 if (wacom->serial[0] >> 52 == 1) { in wacom_intuos_pro2_bt_pen()
1288 wacom->id[0] |= (wacom->serial[0] >> 32) & 0xFFFFF; in wacom_intuos_pro2_bt_pen()
1292 for (i = 0; i < pen_frames; i++) { in wacom_intuos_pro2_bt_pen()
1294 bool valid = frame[0] & 0x80; in wacom_intuos_pro2_bt_pen()
1307 for (i = 0; i < number_of_valid_frames; i++) { in wacom_intuos_pro2_bt_pen()
1309 bool valid = frame[0] & 0x80; in wacom_intuos_pro2_bt_pen()
1310 bool prox = frame[0] & 0x40; in wacom_intuos_pro2_bt_pen()
1311 bool range = frame[0] & 0x20; in wacom_intuos_pro2_bt_pen()
1312 bool invert = frame[0] & 0x10; in wacom_intuos_pro2_bt_pen()
1324 wacom->tool[0] = 0; in wacom_intuos_pro2_bt_pen()
1325 wacom->id[0] = 0; in wacom_intuos_pro2_bt_pen()
1326 wacom->serial[0] = 0; in wacom_intuos_pro2_bt_pen()
1327 wacom->hid_data.time_delayed = 0; in wacom_intuos_pro2_bt_pen()
1332 if (!wacom->tool[0]) { /* first in range */ in wacom_intuos_pro2_bt_pen()
1335 wacom->tool[0] = BTN_TOOL_RUBBER; in wacom_intuos_pro2_bt_pen()
1336 else if (wacom->id[0]) in wacom_intuos_pro2_bt_pen()
1337 wacom->tool[0] = wacom_intuos_get_tool_type(wacom->id[0]); in wacom_intuos_pro2_bt_pen()
1339 wacom->tool[0] = BTN_TOOL_PEN; in wacom_intuos_pro2_bt_pen()
1365 if (wacom->tool[0]) { in wacom_intuos_pro2_bt_pen()
1376 input_report_key(pen_input, BTN_TOUCH, frame[0] & 0x09); in wacom_intuos_pro2_bt_pen()
1377 input_report_key(pen_input, BTN_STYLUS, frame[0] & 0x02); in wacom_intuos_pro2_bt_pen()
1378 input_report_key(pen_input, BTN_STYLUS2, frame[0] & 0x04); in wacom_intuos_pro2_bt_pen()
1380 input_report_key(pen_input, wacom->tool[0], prox); in wacom_intuos_pro2_bt_pen()
1381 input_event(pen_input, EV_MSC, MSC_SERIAL, wacom->serial[0]); in wacom_intuos_pro2_bt_pen()
1383 wacom_intuos_id_mangle(wacom->id[0])); /* report tool id */ in wacom_intuos_pro2_bt_pen()
1406 for (i = 0; i < finger_frames; i++) { in wacom_intuos_pro2_bt_touch()
1408 int current_num_contacts = frame[0] & 0x7F; in wacom_intuos_pro2_bt_touch()
1411 if (!(frame[0] & 0x80)) in wacom_intuos_pro2_bt_touch()
1423 for (j = 0; j < contacts_to_send; j++) { in wacom_intuos_pro2_bt_touch()
1425 int slot = input_mt_get_slot_by_key(touch_input, touch[0]); in wacom_intuos_pro2_bt_touch()
1431 if (slot < 0) in wacom_intuos_pro2_bt_touch()
1435 input_mt_report_slot_state(touch_input, MT_TOOL_FINGER, touch[1] & 0x01); in wacom_intuos_pro2_bt_touch()
1446 if (wacom->num_contacts_left <= 0) { in wacom_intuos_pro2_bt_touch()
1447 wacom->num_contacts_left = 0; in wacom_intuos_pro2_bt_touch()
1453 if (wacom->num_contacts_left == 0) { in wacom_intuos_pro2_bt_touch()
1469 int center = (data[281] & 0x40) >> 6; in wacom_intuos_pro2_bt_pad()
1470 int ring = data[285] & 0x7F; in wacom_intuos_pro2_bt_pad()
1471 bool ringstatus = data[285] & 0x80; in wacom_intuos_pro2_bt_pad()
1474 /* Fix touchring data: userspace expects 0 at left and increasing clockwise */ in wacom_intuos_pro2_bt_pad()
1483 input_report_abs(pad_input, ABS_WHEEL, ringstatus ? ring : 0); in wacom_intuos_pro2_bt_pad()
1485 input_report_key(pad_input, wacom->tool[1], prox ? 1 : 0); in wacom_intuos_pro2_bt_pad()
1486 input_report_abs(pad_input, ABS_MISC, prox ? PAD_DEVICE_ID : 0); in wacom_intuos_pro2_bt_pad()
1487 input_event(pad_input, EV_MSC, MSC_SERIAL, 0xffffffff); in wacom_intuos_pro2_bt_pad()
1496 bool chg = data[284] & 0x80; in wacom_intuos_pro2_bt_battery()
1497 int battery_status = data[284] & 0x7F; in wacom_intuos_pro2_bt_battery()
1512 input_report_key(pad_input, wacom->tool[1], buttons ? 1 : 0); in wacom_intuos_gen3_bt_pad()
1513 input_report_abs(pad_input, ABS_MISC, buttons ? PAD_DEVICE_ID : 0); in wacom_intuos_gen3_bt_pad()
1514 input_event(pad_input, EV_MSC, MSC_SERIAL, 0xffffffff); in wacom_intuos_gen3_bt_pad()
1523 bool chg = data[45] & 0x80; in wacom_intuos_gen3_bt_battery()
1524 int battery_status = data[45] & 0x7F; in wacom_intuos_gen3_bt_battery()
1534 if (data[0] != 0x80 && data[0] != 0x81) { in wacom_intuos_pro2_bt_irq()
1536 "%s: received unknown report #%d\n", __func__, data[0]); in wacom_intuos_pro2_bt_irq()
1537 return 0; in wacom_intuos_pro2_bt_irq()
1550 return 0; in wacom_intuos_pro2_bt_irq()
1559 int contacts_to_send = 0; in wacom_24hdt_irq()
1565 return 0; in wacom_24hdt_irq()
1571 y_offset = 0; in wacom_24hdt_irq()
1583 for (i = 0; i < contacts_to_send; i++) { in wacom_24hdt_irq()
1585 bool touch = (data[offset] & 0x1) && report_touch_events(wacom); in wacom_24hdt_irq()
1588 if (slot < 0) in wacom_24hdt_irq()
1617 if (wacom->num_contacts_left <= 0) { in wacom_24hdt_irq()
1618 wacom->num_contacts_left = 0; in wacom_24hdt_irq()
1630 int contacts_to_send = 0; in wacom_mt_touch()
1631 int x_offset = 0; in wacom_mt_touch()
1647 for (i = 0; i < contacts_to_send; i++) { in wacom_mt_touch()
1649 bool touch = (data[offset] & 0x1) && report_touch_events(wacom); in wacom_mt_touch()
1653 if (slot < 0) in wacom_mt_touch()
1668 if (wacom->num_contacts_left <= 0) { in wacom_mt_touch()
1669 wacom->num_contacts_left = 0; in wacom_mt_touch()
1681 for (i = 0; i < 2; i++) { in wacom_tpc_mt_touch()
1688 int x = le16_to_cpup((__le16 *)&data[i * 2 + 2]) & 0x7fff; in wacom_tpc_mt_touch()
1689 int y = le16_to_cpup((__le16 *)&data[i * 2 + 6]) & 0x7fff; in wacom_tpc_mt_touch()
1708 int x = 0, y = 0; in wacom_tpc_single_touch()
1711 return 0; in wacom_tpc_single_touch()
1714 prox = prox && (data[0] & 0x01); in wacom_tpc_single_touch()
1718 prox = prox && (data[2] & 0x01); in wacom_tpc_single_touch()
1722 prox = prox && (data[1] & 0x01); in wacom_tpc_single_touch()
1743 bool prox = data[1] & 0x20; in wacom_tpc_pen()
1747 wacom->tool[0] = (data[1] & 0x0c) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN; in wacom_tpc_pen()
1756 input_report_key(input, BTN_STYLUS, data[1] & 0x02); in wacom_tpc_pen()
1757 input_report_key(input, BTN_STYLUS2, data[1] & 0x10); in wacom_tpc_pen()
1760 input_report_abs(input, ABS_PRESSURE, ((data[7] & 0x07) << 8) | data[6]); in wacom_tpc_pen()
1761 input_report_key(input, BTN_TOUCH, data[1] & 0x05); in wacom_tpc_pen()
1762 input_report_key(input, wacom->tool[0], prox); in wacom_tpc_pen()
1766 return 0; in wacom_tpc_pen()
1775 "%s: received report #%d\n", __func__, data[0]); in wacom_tpc_irq()
1778 data[0] == WACOM_REPORT_PENABLED) in wacom_tpc_irq()
1783 "%s: received report #%d\n", __func__, data[0]); in wacom_tpc_irq()
1793 switch (data[0]) { in wacom_tpc_irq()
1808 return 0; in wacom_tpc_irq()
1828 int subpage = (usage & 0xFF00) << 8; in wacom_equivalent_usage()
1829 int subusage = (usage & 0xFF); in wacom_equivalent_usage()
1856 int subpage = (usage & 0xFF00) << 8; in wacom_equivalent_usage()
1857 int subusage = (usage & 0xFF); in wacom_equivalent_usage()
1903 input_set_abs_params(input, code, fmin, fmax, fuzz, 0); in wacom_map_usage()
1909 "Using default resolution for axis type 0x%x code 0x%x\n", in wacom_map_usage()
1938 if (value == 0) { in wacom_wac_battery_event()
2000 wacom_map_usage(input, usage, field, EV_ABS, ABS_X, 0); in wacom_wac_pad_usage_mapping()
2005 wacom_map_usage(input, usage, field, EV_ABS, ABS_Y, 0); in wacom_wac_pad_usage_mapping()
2010 wacom_map_usage(input, usage, field, EV_ABS, ABS_Z, 0); in wacom_wac_pad_usage_mapping()
2021 0); in wacom_wac_pad_usage_mapping()
2043 wacom_map_usage(input, usage, field, EV_ABS, ABS_RX, 0); in wacom_wac_pad_usage_mapping()
2047 wacom_map_usage(input, usage, field, EV_ABS, ABS_RY, 0); in wacom_wac_pad_usage_mapping()
2054 wacom_map_usage(input, usage, field, EV_REL, REL_WHEEL_HI_RES, 0); in wacom_wac_pad_usage_mapping()
2058 wacom_map_usage(input, usage, field, EV_REL, REL_HWHEEL_HI_RES, 0); in wacom_wac_pad_usage_mapping()
2064 wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0); in wacom_wac_pad_usage_mapping()
2066 wacom_map_usage(input, usage, field, EV_ABS, ABS_THROTTLE, 0); in wacom_wac_pad_usage_mapping()
2081 wacom_map_usage(input, usage, field, EV_KEY, KEY_BUTTONCONFIG, 0); in wacom_wac_pad_usage_mapping()
2085 wacom_map_usage(input, usage, field, EV_KEY, KEY_ONSCREEN_KEYBOARD, 0); in wacom_wac_pad_usage_mapping()
2089 wacom_map_usage(input, usage, field, EV_KEY, KEY_CONTROLPANEL, 0); in wacom_wac_pad_usage_mapping()
2102 switch (equivalent_usage & 0xfffffff0) { in wacom_wac_pad_usage_mapping()
2106 0); in wacom_wac_pad_usage_mapping()
2172 if (hdev->vendor == 0x56a && in wacom_wac_pad_event()
2173 (hdev->product == 0x34d || hdev->product == 0x34e || /* MobileStudio Pro */ in wacom_wac_pad_event()
2174 hdev->product == 0x357 || hdev->product == 0x358 || /* Intuos Pro 2 */ in wacom_wac_pad_event()
2175 hdev->product == 0x392 || /* Intuos Pro 2 */ in wacom_wac_pad_event()
2176 hdev->product == 0x398 || hdev->product == 0x399 || /* MobileStudio Pro */ in wacom_wac_pad_event()
2177 hdev->product == 0x3AA)) { /* MobileStudio Pro */ in wacom_wac_pad_event()
2180 if (hdev->product == 0x357 || hdev->product == 0x358 || in wacom_wac_pad_event()
2181 hdev->product == 0x392) in wacom_wac_pad_event()
2183 else if (hdev->product == 0x34d || hdev->product == 0x34e || in wacom_wac_pad_event()
2184 hdev->product == 0x398 || hdev->product == 0x399 || in wacom_wac_pad_event()
2185 hdev->product == 0x3AA) in wacom_wac_pad_event()
2241 input_event(input, usage->type, usage->code, 0); in wacom_wac_pad_event()
2252 for (i = 0; i < wacom->led.count; i++) in wacom_wac_pad_event()
2274 wacom_wac->hid_data.inrange_state = 0; in wacom_wac_pad_pre_report()
2283 bool active = wacom_wac->hid_data.inrange_state != 0; in wacom_wac_pad_report()
2287 input_event(input, EV_ABS, ABS_MISC, active ? PAD_DEVICE_ID : 0); in wacom_wac_pad_report()
2327 wacom_map_usage(input, usage, field, EV_ABS, ABS_DISTANCE, 0); in wacom_wac_pen_usage_mapping()
2330 wacom_map_usage(input, usage, field, EV_ABS, ABS_PRESSURE, 0); in wacom_wac_pen_usage_mapping()
2333 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOOL_PEN, 0); in wacom_wac_pen_usage_mapping()
2337 BTN_TOOL_RUBBER, 0); in wacom_wac_pen_usage_mapping()
2340 wacom_map_usage(input, usage, field, EV_ABS, ABS_TILT_X, 0); in wacom_wac_pen_usage_mapping()
2343 wacom_map_usage(input, usage, field, EV_ABS, ABS_TILT_Y, 0); in wacom_wac_pen_usage_mapping()
2346 wacom_map_usage(input, usage, field, EV_ABS, ABS_Z, 0); in wacom_wac_pen_usage_mapping()
2350 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOUCH, 0); in wacom_wac_pen_usage_mapping()
2354 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOUCH, 0); in wacom_wac_pen_usage_mapping()
2359 wacom_map_usage(input, usage, field, EV_KEY, BTN_STYLUS, 0); in wacom_wac_pen_usage_mapping()
2364 wacom_map_usage(input, usage, field, EV_KEY, BTN_STYLUS2, 0); in wacom_wac_pen_usage_mapping()
2368 wacom_map_usage(input, usage, field, EV_MSC, MSC_SERIAL, 0); in wacom_wac_pen_usage_mapping()
2371 wacom_map_usage(input, usage, field, EV_MSC, MSC_TIMESTAMP, 0); in wacom_wac_pen_usage_mapping()
2375 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOOL_PEN, 0); in wacom_wac_pen_usage_mapping()
2380 wacom_map_usage(input, usage, field, EV_ABS, ABS_MISC, 0); in wacom_wac_pen_usage_mapping()
2384 wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0); in wacom_wac_pen_usage_mapping()
2388 wacom_map_usage(input, usage, field, EV_KEY, BTN_STYLUS3, 0); in wacom_wac_pen_usage_mapping()
2441 wacom_wac->serial[0] = (wacom_wac->serial[0] & ~0xFFFFFFFFULL); in wacom_wac_pen_event()
2442 wacom_wac->serial[0] |= wacom_s32tou(value, field->report_size); in wacom_wac_pen_event()
2447 if (!wacom_is_art_pen(wacom_wac->id[0])) return; in wacom_wac_pen_event()
2463 wacom_wac->serial[0] = (wacom_wac->serial[0] & 0xFFFFFFFF); in wacom_wac_pen_event()
2464 wacom_wac->serial[0] |= ((__u64)raw_value) << 32; in wacom_wac_pen_event()
2471 wacom_wac->id[0] |= raw_value & 0xFFFFF; in wacom_wac_pen_event()
2483 wacom_wac->id[0] |= wacom_s32tou(value, field->report_size); in wacom_wac_pen_event()
2521 wacom_wac->hid_data.sequence_number >= 0) { in wacom_wac_pen_event()
2542 input_event(input, usage->type, usage->code, 0); in wacom_wac_pen_event()
2563 bool entering_range = !wacom_wac->tool[0] && range; in wacom_wac_pen_report()
2571 wacom_wac->tool[0] = BTN_TOOL_RUBBER; in wacom_wac_pen_report()
2573 wacom_wac->tool[0] = BTN_TOOL_PEN; in wacom_wac_pen_report()
2574 else if (wacom_wac->id[0]) in wacom_wac_pen_report()
2575 wacom_wac->tool[0] = wacom_intuos_get_tool_type(wacom_wac->id[0]); in wacom_wac_pen_report()
2577 wacom_wac->tool[0] = BTN_TOOL_PEN; in wacom_wac_pen_report()
2583 if (!delay_pen_events(wacom_wac) && wacom_wac->tool[0]) { in wacom_wac_pen_report()
2584 int id = wacom_wac->id[0]; in wacom_wac_pen_report()
2600 if (wacom_wac->serial[0] >> 52 == 1) in wacom_wac_pen_report()
2610 input_report_key(input, wacom_wac->tool[0], sense); in wacom_wac_pen_report()
2611 if (wacom_wac->serial[0]) { in wacom_wac_pen_report()
2614 * of '0'. Report the low 32 bits if possible, but in wacom_wac_pen_report()
2617 __u32 serial_lo = wacom_wac->serial[0] & 0xFFFFFFFFu; in wacom_wac_pen_report()
2618 __u32 serial_hi = wacom_wac->serial[0] >> 32; in wacom_wac_pen_report()
2620 input_report_abs(input, ABS_MISC, sense ? id : 0); in wacom_wac_pen_report()
2639 wacom_wac->tool[0] = 0; in wacom_wac_pen_report()
2640 wacom_wac->id[0] = 0; in wacom_wac_pen_report()
2641 wacom_wac->serial[0] = 0; in wacom_wac_pen_report()
2671 wacom_map_usage(input, usage, field, EV_ABS, ABS_MT_TOUCH_MAJOR, 0); in wacom_wac_finger_usage_mapping()
2672 wacom_map_usage(input, usage, field, EV_ABS, ABS_MT_TOUCH_MINOR, 0); in wacom_wac_finger_usage_mapping()
2673 input_set_abs_params(input, ABS_MT_ORIENTATION, 0, 1, 0, 0); in wacom_wac_finger_usage_mapping()
2676 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOUCH, 0); in wacom_wac_finger_usage_mapping()
2694 wacom_map_usage(input, usage, field, EV_MSC, MSC_TIMESTAMP, 0); in wacom_wac_finger_usage_mapping()
2721 if (slot < 0) { in wacom_wac_finger_slot()
2727 if (!prox && mt_id < 0) { in wacom_wac_finger_slot()
2750 input_report_abs(input, ABS_MT_ORIENTATION, hid_data->width <= hid_data->height ? 0 : 1); in wacom_wac_finger_slot()
2825 hid_data->cc_report = 0; in wacom_wac_finger_pre_report()
2829 for (i = 0; i < report->maxfield; i++) { in wacom_wac_finger_pre_report()
2833 for (j = 0; j < field->maxusage; j++) { in wacom_wac_finger_pre_report()
2858 if (hid_data->cc_report != 0 && in wacom_wac_finger_pre_report()
2859 hid_data->cc_index >= 0) { in wacom_wac_finger_pre_report()
2864 hid_data->num_received = 0; in wacom_wac_finger_pre_report()
2869 hid_data->num_received = 0; in wacom_wac_finger_pre_report()
2882 if (wacom_wac->hid_data.num_expected == 0) in wacom_wac_finger_report()
2896 wacom_wac->hid_data.num_received = 0; in wacom_wac_finger_report()
2897 wacom_wac->hid_data.num_expected = 0; in wacom_wac_finger_report()
2962 for (n = 0 ; n < count; n++) { in wacom_report_events()
2991 return 0; in wacom_wac_collection()
2997 return 0; in wacom_wac_collection()
3013 for (r = 0; r < report->maxfield; r++) { in wacom_wac_report()
3035 for (r = 0; r < report->maxfield; r++) { in wacom_wac_report()
3038 if (field->usage[0].collection_index != prev_collection) { in wacom_wac_report()
3040 field->usage[0].collection_index, field, r) < 0) in wacom_wac_report()
3042 prev_collection = field->usage[0].collection_index; in wacom_wac_report()
3060 if (data[0] != 0x02) in wacom_bpt_touch()
3061 return 0; in wacom_bpt_touch()
3063 for (i = 0; i < 2; i++) { in wacom_bpt_touch()
3064 int offset = (data[1] & 0x80) ? (8 * i) : (9 * i); in wacom_bpt_touch()
3066 && (data[offset + 3] & 0x80); in wacom_bpt_touch()
3071 int x = get_unaligned_be16(&data[offset + 3]) & 0x7ff; in wacom_bpt_touch()
3072 int y = get_unaligned_be16(&data[offset + 5]) & 0x7ff; in wacom_bpt_touch()
3084 input_report_key(pad_input, BTN_LEFT, (data[1] & 0x08) != 0); in wacom_bpt_touch()
3085 input_report_key(pad_input, BTN_FORWARD, (data[1] & 0x04) != 0); in wacom_bpt_touch()
3086 input_report_key(pad_input, BTN_BACK, (data[1] & 0x02) != 0); in wacom_bpt_touch()
3087 input_report_key(pad_input, BTN_RIGHT, (data[1] & 0x01) != 0); in wacom_bpt_touch()
3097 bool touch = data[1] & 0x80; in wacom_bpt3_touch_msg()
3098 int slot = input_mt_get_slot_by_key(input, data[0]); in wacom_bpt3_touch_msg()
3100 if (slot < 0) in wacom_bpt3_touch_msg()
3110 int y = (data[3] << 4) | (data[4] & 0x0f); in wacom_bpt3_touch_msg()
3142 input_report_key(input, BTN_LEFT, (data[1] & 0x02) != 0); in wacom_bpt3_button_msg()
3143 input_report_key(input, BTN_BACK, (data[1] & 0x08) != 0); in wacom_bpt3_button_msg()
3145 input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0); in wacom_bpt3_button_msg()
3146 input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0); in wacom_bpt3_button_msg()
3148 input_report_key(input, BTN_FORWARD, (data[1] & 0x04) != 0); in wacom_bpt3_button_msg()
3149 input_report_key(input, BTN_RIGHT, (data[1] & 0x01) != 0); in wacom_bpt3_button_msg()
3155 int count = data[1] & 0x07; in wacom_bpt3_touch()
3156 int touch_changed = 0, i; in wacom_bpt3_touch()
3158 if (data[0] != 0x02) in wacom_bpt3_touch()
3159 return 0; in wacom_bpt3_touch()
3162 for (i = 0; i < count; i++) { in wacom_bpt3_touch()
3188 int x = 0, y = 0, p = 0, d = 0; in wacom_bpt_pen()
3192 if (data[0] != WACOM_REPORT_PENABLED) in wacom_bpt_pen()
3193 return 0; in wacom_bpt_pen()
3195 range = (data[1] & 0x80) == 0x80; in wacom_bpt_pen()
3196 prox = (data[1] & 0x40) == 0x40; in wacom_bpt_pen()
3197 rdy = (data[1] & 0x20) == 0x20; in wacom_bpt_pen()
3201 return 0; in wacom_bpt_pen()
3205 pen = data[1] & 0x01; in wacom_bpt_pen()
3206 btn1 = data[1] & 0x02; in wacom_bpt_pen()
3207 btn2 = data[1] & 0x04; in wacom_bpt_pen()
3213 if (data[1] & 0x08) { in wacom_bpt_pen()
3214 wacom->tool[0] = BTN_TOOL_RUBBER; in wacom_bpt_pen()
3215 wacom->id[0] = ERASER_DEVICE_ID; in wacom_bpt_pen()
3217 wacom->tool[0] = BTN_TOOL_PEN; in wacom_bpt_pen()
3218 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_bpt_pen()
3232 wacom->id[0] = 0; in wacom_bpt_pen()
3247 input_report_key(input, wacom->tool[0], range); /* PEN or RUBBER */ in wacom_bpt_pen()
3248 input_report_abs(input, ABS_MISC, wacom->id[0]); /* TOOL ID */ in wacom_bpt_pen()
3272 return 0; in wacom_bpt_irq()
3287 prefix = data[0]; in wacom_bamboo_pad_pen_event()
3288 data[0] = WACOM_REPORT_BPAD_PEN; in wacom_bamboo_pad_pen_event()
3298 data[0] = prefix; in wacom_bamboo_pad_pen_event()
3310 prefix = data[0]; in wacom_bamboo_pad_touch_event()
3312 for (id = 0; id < wacom->features.touch_max; id++) { in wacom_bamboo_pad_touch_event()
3323 x = finger_data[0] | ((finger_data[1] & 0x0f) << 8); in wacom_bamboo_pad_touch_event()
3332 input_report_key(input, BTN_LEFT, prefix & 0x40); in wacom_bamboo_pad_touch_event()
3333 input_report_key(input, BTN_RIGHT, prefix & 0x80); in wacom_bamboo_pad_touch_event()
3347 (data[0] != WACOM_REPORT_BPAD_TOUCH)) in wacom_bamboo_pad_irq()
3348 return 0; in wacom_bamboo_pad_irq()
3350 if (data[1] & 0x01) in wacom_bamboo_pad_irq()
3353 if (data[1] & 0x02) in wacom_bamboo_pad_irq()
3356 return 0; in wacom_bamboo_pad_irq()
3364 if (len != WACOM_PKGLEN_WIRELESS || data[0] != WACOM_REPORT_WL) in wacom_wireless_irq()
3365 return 0; in wacom_wireless_irq()
3367 connected = data[1] & 0x01; in wacom_wireless_irq()
3376 SW_MUTE_DEVICE, data[5] & 0x40); in wacom_wireless_irq()
3381 battery = (data[5] & 0x3f) * 100 / 31; in wacom_wireless_irq()
3382 charging = !!(data[5] & 0x80); in wacom_wireless_irq()
3389 battery, charging, 1, 0); in wacom_wireless_irq()
3391 } else if (wacom->pid != 0) { in wacom_wireless_irq()
3393 wacom->pid = 0; in wacom_wireless_irq()
3395 wacom_notify_battery(wacom, POWER_SUPPLY_STATUS_UNKNOWN, 0, 0, 0, 0); in wacom_wireless_irq()
3398 return 0; in wacom_wireless_irq()
3407 if (data[0] != WACOM_REPORT_USB) in wacom_status_irq()
3408 return 0; in wacom_status_irq()
3415 SW_MUTE_DEVICE, data[8] & 0x40); in wacom_status_irq()
3419 if (data[9] & 0x02) { /* wireless module is attached */ in wacom_status_irq()
3420 int battery = (data[8] & 0x3f) * 100 / 31; in wacom_status_irq()
3421 bool charging = !!(data[8] & 0x80); in wacom_status_irq()
3430 wacom_notify_battery(wacom_wac, POWER_SUPPLY_STATUS_UNKNOWN, 0, 0, 0, 0); in wacom_status_irq()
3432 return 0; in wacom_status_irq()
3505 else if (wacom_wac->data[0] == WACOM_REPORT_USB) in wacom_wac_irq()
3531 if (wacom_wac->data[0] == WACOM_REPORT_USB) in wacom_wac_irq()
3547 if (wacom_wac->data[0] == WACOM_REPORT_DEVICE_LIST) in wacom_wac_irq()
3579 0, wacom_wac->features.distance_max, wacom_wac->features.distance_fuzz, 0); in wacom_setup_basic_pro_pen()
3594 input_set_abs_params(input_dev, ABS_WHEEL, 0, 1023, 0, 0); in wacom_setup_cintiq()
3595 input_set_abs_params(input_dev, ABS_TILT_X, -64, 63, features->tilt_fuzz, 0); in wacom_setup_cintiq()
3597 input_set_abs_params(input_dev, ABS_TILT_Y, -64, 63, features->tilt_fuzz, 0); in wacom_setup_cintiq()
3617 input_set_abs_params(input_dev, ABS_RZ, -900, 899, 0, 0); in wacom_setup_intuos()
3619 input_set_abs_params(input_dev, ABS_THROTTLE, -1023, 1023, 0, 0); in wacom_setup_intuos()
3682 * 0, whose HID descriptor has an application usage of 0xFF0D in wacom_setup_device_quirks()
3759 if (wacom->hdev->product == 0x382 || wacom->hdev->product == 0x37d) { in wacom_setup_device_quirks()
3790 return 0; in wacom_setup_pen_input_capabilities()
3792 input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in wacom_setup_pen_input_capabilities()
3796 input_set_abs_params(input_dev, ABS_X, 0 + features->offset_left, in wacom_setup_pen_input_capabilities()
3798 features->x_fuzz, 0); in wacom_setup_pen_input_capabilities()
3799 input_set_abs_params(input_dev, ABS_Y, 0 + features->offset_top, in wacom_setup_pen_input_capabilities()
3801 features->y_fuzz, 0); in wacom_setup_pen_input_capabilities()
3802 input_set_abs_params(input_dev, ABS_PRESSURE, 0, in wacom_setup_pen_input_capabilities()
3803 features->pressure_max, features->pressure_fuzz, 0); in wacom_setup_pen_input_capabilities()
3816 input_set_abs_params(input_dev, ABS_DISTANCE, 0, in wacom_setup_pen_input_capabilities()
3818 features->distance_fuzz, 0); in wacom_setup_pen_input_capabilities()
3845 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); in wacom_setup_pen_input_capabilities()
3857 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); in wacom_setup_pen_input_capabilities()
3873 input_set_abs_params(input_dev, ABS_DISTANCE, 0, in wacom_setup_pen_input_capabilities()
3875 features->distance_fuzz, 0); in wacom_setup_pen_input_capabilities()
3877 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); in wacom_setup_pen_input_capabilities()
3928 input_set_abs_params(input_dev, ABS_DISTANCE, 0, in wacom_setup_pen_input_capabilities()
3930 features->distance_fuzz, 0); in wacom_setup_pen_input_capabilities()
3937 return 0; in wacom_setup_pen_input_capabilities()
3955 return 0; in wacom_setup_touch_input_capabilities()
3957 input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in wacom_setup_touch_input_capabilities()
3961 input_set_abs_params(input_dev, ABS_X, 0, in wacom_setup_touch_input_capabilities()
3962 features->x_max, features->x_fuzz, 0); in wacom_setup_touch_input_capabilities()
3963 input_set_abs_params(input_dev, ABS_Y, 0, in wacom_setup_touch_input_capabilities()
3964 features->y_max, features->y_fuzz, 0); in wacom_setup_touch_input_capabilities()
3971 input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, in wacom_setup_touch_input_capabilities()
3972 features->x_max, features->x_fuzz, 0); in wacom_setup_touch_input_capabilities()
3973 input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, in wacom_setup_touch_input_capabilities()
3974 features->y_max, features->y_fuzz, 0); in wacom_setup_touch_input_capabilities()
3984 input_dev->evbit[0] |= BIT_MASK(EV_SW); in wacom_setup_touch_input_capabilities()
3987 if (wacom_wac->shared->touch->product == 0x361) { in wacom_setup_touch_input_capabilities()
3989 0, 12440, 4, 0); in wacom_setup_touch_input_capabilities()
3991 0, 8640, 4, 0); in wacom_setup_touch_input_capabilities()
3993 else if (wacom_wac->shared->touch->product == 0x360) { in wacom_setup_touch_input_capabilities()
3995 0, 8960, 4, 0); in wacom_setup_touch_input_capabilities()
3997 0, 5920, 4, 0); in wacom_setup_touch_input_capabilities()
3999 else if (wacom_wac->shared->touch->product == 0x393) { in wacom_setup_touch_input_capabilities()
4001 0, 6400, 4, 0); in wacom_setup_touch_input_capabilities()
4003 0, 4000, 4, 0); in wacom_setup_touch_input_capabilities()
4016 input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
4017 input_set_abs_params(input_dev, ABS_MT_TOUCH_MINOR, 0, features->y_max, 0, 0); in wacom_setup_touch_input_capabilities()
4022 input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
4023 input_set_abs_params(input_dev, ABS_MT_WIDTH_MAJOR, 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
4024 input_set_abs_params(input_dev, ABS_MT_WIDTH_MINOR, 0, features->y_max, 0, 0); in wacom_setup_touch_input_capabilities()
4025 input_set_abs_params(input_dev, ABS_MT_ORIENTATION, 0, 1, 0, 0); in wacom_setup_touch_input_capabilities()
4029 if (wacom_wac->shared->touch->product == 0x32C || in wacom_setup_touch_input_capabilities()
4030 wacom_wac->shared->touch->product == 0xF6) { in wacom_setup_touch_input_capabilities()
4031 input_dev->evbit[0] |= BIT_MASK(EV_SW); in wacom_setup_touch_input_capabilities()
4051 input_dev->evbit[0] |= BIT_MASK(EV_SW); in wacom_setup_touch_input_capabilities()
4060 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
4063 0, features->y_max, 0, 0); in wacom_setup_touch_input_capabilities()
4075 return 0; in wacom_setup_touch_input_capabilities()
4087 return 0; in wacom_numbered_button_to_key()
4095 for (i = 0; i < button_count; i++) { in wacom_setup_numbered_buttons()
4110 * 24HD has LED group 1 to the left and LED group 0 to the right. in wacom_24hd_update_leds()
4111 * So group 0 matches the second half of the buttons and thus the mask in wacom_24hd_update_leds()
4114 if (group == 0) in wacom_24hd_update_leds()
4117 for (i = 0; i < 3; i++) { in wacom_24hd_update_leds()
4139 * 21UX2 has LED group 1 to the left and LED group 0 in wacom_is_led_toggled()
4202 for (i = 0; i < wacom->led.count; i++) in wacom_report_numbered_buttons()
4205 for (i = 0; i < button_count; i++) { in wacom_report_numbered_buttons()
4218 if ((features->type == HID_GENERIC) && features->numbered_buttons > 0) in wacom_setup_pad_input_capabilities()
4227 input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in wacom_setup_pad_input_capabilities()
4235 input_set_abs_params(input_dev, ABS_X, 0, 1, 0, 0); in wacom_setup_pad_input_capabilities()
4238 input_set_abs_params(input_dev, ABS_Y, 0, 1, 0, 0); in wacom_setup_pad_input_capabilities()
4259 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4279 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4280 input_set_abs_params(input_dev, ABS_THROTTLE, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4293 input_set_abs_params(input_dev, ABS_X, -2048, 2048, 0, 0); in wacom_setup_pad_input_capabilities()
4295 input_set_abs_params(input_dev, ABS_Y, -2048, 2048, 0, 0); in wacom_setup_pad_input_capabilities()
4297 input_set_abs_params(input_dev, ABS_Z, -2048, 2048, 0, 0); in wacom_setup_pad_input_capabilities()
4314 input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4315 input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4319 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4324 input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4328 input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4339 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4354 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4372 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4383 return 0; in wacom_setup_pad_input_capabilities()
4387 { "Wacom Penpartner", 5040, 3780, 255, 0,
4465 { "Wacom PL400", 5408, 4056, 255, 0,
4468 { "Wacom PL500", 6144, 4608, 255, 0,
4471 { "Wacom PL600", 6126, 4604, 255, 0,
4474 { "Wacom PL600SX", 6260, 5016, 255, 0,
4477 { "Wacom PL550", 6144, 4608, 511, 0,
4480 { "Wacom PL800", 7220, 5780, 511, 0,
4483 { "Wacom PL700", 6758, 5406, 511, 0,
4486 { "Wacom PL510", 6282, 4762, 511, 0,
4489 { "Wacom DTU710", 34080, 27660, 511, 0,
4492 { "Wacom DTF521", 6282, 4762, 511, 0,
4495 { "Wacom DTF720", 6858, 5506, 511, 0,
4498 { "Wacom DTF720a", 6858, 5506, 511, 0,
4501 { "Wacom Cintiq Partner", 20480, 15360, 511, 0,
4594 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf6 };
4597 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf8, .touch_max = 10,
4601 WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 0,
4606 WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 0,
4609 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x32C };
4612 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x32B, .touch_max = 10 };
4632 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x335 };
4635 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x333, .touch_max = 10,
4638 { "Wacom DTU1931", 37832, 30305, 511, 0,
4641 { "Wacom DTU2231", 47864, 27011, 511, 0,
4645 { "Wacom DTU1631", 34623, 19553, 511, 0,
4648 { "Wacom DTU1031", 22096, 13960, 511, 0,
4653 { "Wacom DTU1031X", 22672, 12928, 511, 0,
4654 DTUSX, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 0,
4658 { "Wacom DTU1141", 23672, 13403, 1023, 0,
4672 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5D };
4675 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x59, .touch_max = 10,
4692 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5e };
4695 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5b, .touch_max = 10,
4698 { "Wacom ISDv4 90", 26202, 16325, 255, 0,
4701 { "Wacom ISDv4 93", 26202, 16325, 255, 0,
4704 { "Wacom ISDv4 97", 26202, 16325, 511, 0,
4707 { "Wacom ISDv4 9A", 26202, 16325, 255, 0,
4710 { "Wacom ISDv4 9F", 26202, 16325, 255, 0,
4713 { "Wacom ISDv4 E2", 26202, 16325, 255, 0,
4716 { "Wacom ISDv4 E3", 26202, 16325, 255, 0,
4719 { "Wacom ISDv4 E5", 26202, 16325, 255, 0,
4722 { "Wacom ISDv4 E6", 27760, 15694, 255, 0,
4725 { "Wacom ISDv4 EC", 25710, 14500, 255, 0,
4728 { "Wacom ISDv4 ED", 26202, 16325, 255, 0,
4731 { "Wacom ISDv4 EF", 26202, 16325, 255, 0,
4734 { "Wacom ISDv4 100", 26202, 16325, 255, 0,
4737 { "Wacom ISDv4 101", 26202, 16325, 255, 0,
4740 { "Wacom ISDv4 10D", 26202, 16325, 255, 0,
4743 { "Wacom ISDv4 10E", 27760, 15694, 255, 0,
4746 { "Wacom ISDv4 10F", 27760, 15694, 255, 0,
4749 { "Wacom ISDv4 116", 26202, 16325, 255, 0,
4752 { "Wacom ISDv4 12C", 27848, 15752, 2047, 0,
4755 { "Wacom ISDv4 4001", 26202, 16325, 255, 0,
4758 { "Wacom ISDv4 4004", 11060, 6220, 255, 0,
4761 { "Wacom ISDv4 5000", 27848, 15752, 1023, 0,
4764 { "Wacom ISDv4 5002", 29576, 16724, 1023, 0,
4832 { "ISD-V4", 12800, 8000, 255, 0,
4839 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x309 };
4842 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x0307, .touch_max = 10,
4849 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x30C };
4852 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x30A, .touch_max = 10,
4865 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x326 };
4868 .oPid = 0x325 };
4894 { "Wacom DTK1651", 34816, 19759, 1023, 0,
4958 { USB_DEVICE_WACOM(0x00) },
4959 { USB_DEVICE_WACOM(0x03) },
4960 { USB_DEVICE_WACOM(0x10) },
4961 { USB_DEVICE_WACOM(0x11) },
4962 { USB_DEVICE_WACOM(0x12) },
4963 { USB_DEVICE_WACOM(0x13) },
4964 { USB_DEVICE_WACOM(0x14) },
4965 { USB_DEVICE_WACOM(0x15) },
4966 { USB_DEVICE_WACOM(0x16) },
4967 { USB_DEVICE_WACOM(0x17) },
4968 { USB_DEVICE_WACOM(0x18) },
4969 { USB_DEVICE_WACOM(0x19) },
4970 { USB_DEVICE_WACOM(0x20) },
4971 { USB_DEVICE_WACOM(0x21) },
4972 { USB_DEVICE_WACOM(0x22) },
4973 { USB_DEVICE_WACOM(0x23) },
4974 { USB_DEVICE_WACOM(0x24) },
4975 { USB_DEVICE_WACOM(0x26) },
4976 { USB_DEVICE_WACOM(0x27) },
4977 { USB_DEVICE_WACOM(0x28) },
4978 { USB_DEVICE_WACOM(0x29) },
4979 { USB_DEVICE_WACOM(0x2A) },
4980 { USB_DEVICE_WACOM(0x30) },
4981 { USB_DEVICE_WACOM(0x31) },
4982 { USB_DEVICE_WACOM(0x32) },
4983 { USB_DEVICE_WACOM(0x33) },
4984 { USB_DEVICE_WACOM(0x34) },
4985 { USB_DEVICE_WACOM(0x35) },
4986 { USB_DEVICE_WACOM(0x37) },
4987 { USB_DEVICE_WACOM(0x38) },
4988 { USB_DEVICE_WACOM(0x39) },
4989 { USB_DEVICE_WACOM(0x3F) },
4990 { USB_DEVICE_WACOM(0x41) },
4991 { USB_DEVICE_WACOM(0x42) },
4992 { USB_DEVICE_WACOM(0x43) },
4993 { USB_DEVICE_WACOM(0x44) },
4994 { USB_DEVICE_WACOM(0x45) },
4995 { USB_DEVICE_WACOM(0x47) },
4996 { USB_DEVICE_WACOM(0x57) },
4997 { USB_DEVICE_WACOM(0x59) },
4998 { USB_DEVICE_WACOM(0x5B) },
4999 { USB_DEVICE_WACOM(0x5D) },
5000 { USB_DEVICE_WACOM(0x5E) },
5001 { USB_DEVICE_WACOM(0x60) },
5002 { USB_DEVICE_WACOM(0x61) },
5003 { USB_DEVICE_WACOM(0x62) },
5004 { USB_DEVICE_WACOM(0x63) },
5005 { USB_DEVICE_WACOM(0x64) },
5006 { USB_DEVICE_WACOM(0x65) },
5007 { USB_DEVICE_WACOM(0x69) },
5008 { USB_DEVICE_WACOM(0x6A) },
5009 { USB_DEVICE_WACOM(0x6B) },
5010 { BT_DEVICE_WACOM(0x81) },
5011 { USB_DEVICE_WACOM(0x84) },
5012 { USB_DEVICE_WACOM(0x90) },
5013 { USB_DEVICE_WACOM(0x93) },
5014 { USB_DEVICE_WACOM(0x94) },
5015 { USB_DEVICE_WACOM(0x97) },
5016 { USB_DEVICE_WACOM(0x9A) },
5017 { USB_DEVICE_WACOM(0x9F) },
5018 { USB_DEVICE_WACOM(0xB0) },
5019 { USB_DEVICE_WACOM(0xB1) },
5020 { USB_DEVICE_WACOM(0xB2) },
5021 { USB_DEVICE_WACOM(0xB3) },
5022 { USB_DEVICE_WACOM(0xB4) },
5023 { USB_DEVICE_WACOM(0xB5) },
5024 { USB_DEVICE_WACOM(0xB7) },
5025 { USB_DEVICE_WACOM(0xB8) },
5026 { USB_DEVICE_WACOM(0xB9) },
5027 { USB_DEVICE_WACOM(0xBA) },
5028 { USB_DEVICE_WACOM(0xBB) },
5029 { USB_DEVICE_WACOM(0xBC) },
5030 { BT_DEVICE_WACOM(0xBD) },
5031 { USB_DEVICE_WACOM(0xC0) },
5032 { USB_DEVICE_WACOM(0xC2) },
5033 { USB_DEVICE_WACOM(0xC4) },
5034 { USB_DEVICE_WACOM(0xC5) },
5035 { USB_DEVICE_WACOM(0xC6) },
5036 { USB_DEVICE_WACOM(0xC7) },
5037 { USB_DEVICE_WACOM(0xCC) },
5038 { USB_DEVICE_WACOM(0xCE) },
5039 { USB_DEVICE_WACOM(0xD0) },
5040 { USB_DEVICE_WACOM(0xD1) },
5041 { USB_DEVICE_WACOM(0xD2) },
5042 { USB_DEVICE_WACOM(0xD3) },
5043 { USB_DEVICE_WACOM(0xD4) },
5044 { USB_DEVICE_WACOM(0xD5) },
5045 { USB_DEVICE_WACOM(0xD6) },
5046 { USB_DEVICE_WACOM(0xD7) },
5047 { USB_DEVICE_WACOM(0xD8) },
5048 { USB_DEVICE_WACOM(0xDA) },
5049 { USB_DEVICE_WACOM(0xDB) },
5050 { USB_DEVICE_WACOM(0xDD) },
5051 { USB_DEVICE_WACOM(0xDE) },
5052 { USB_DEVICE_WACOM(0xDF) },
5053 { USB_DEVICE_WACOM(0xE2) },
5054 { USB_DEVICE_WACOM(0xE3) },
5055 { USB_DEVICE_WACOM(0xE5) },
5056 { USB_DEVICE_WACOM(0xE6) },
5057 { USB_DEVICE_WACOM(0xEC) },
5058 { USB_DEVICE_WACOM(0xED) },
5059 { USB_DEVICE_WACOM(0xEF) },
5060 { USB_DEVICE_WACOM(0xF0) },
5061 { USB_DEVICE_WACOM(0xF4) },
5062 { USB_DEVICE_WACOM(0xF6) },
5063 { USB_DEVICE_WACOM(0xF8) },
5064 { USB_DEVICE_WACOM(0xFA) },
5065 { USB_DEVICE_WACOM(0xFB) },
5066 { USB_DEVICE_WACOM(0x100) },
5067 { USB_DEVICE_WACOM(0x101) },
5068 { USB_DEVICE_WACOM(0x10D) },
5069 { USB_DEVICE_WACOM(0x10E) },
5070 { USB_DEVICE_WACOM(0x10F) },
5071 { USB_DEVICE_WACOM(0x116) },
5072 { USB_DEVICE_WACOM(0x12C) },
5073 { USB_DEVICE_WACOM(0x300) },
5074 { USB_DEVICE_WACOM(0x301) },
5075 { USB_DEVICE_WACOM(0x302) },
5076 { USB_DEVICE_WACOM(0x303) },
5077 { USB_DEVICE_WACOM(0x304) },
5078 { USB_DEVICE_WACOM(0x307) },
5079 { USB_DEVICE_WACOM(0x309) },
5080 { USB_DEVICE_WACOM(0x30A) },
5081 { USB_DEVICE_WACOM(0x30C) },
5082 { USB_DEVICE_WACOM(0x30E) },
5083 { USB_DEVICE_WACOM(0x314) },
5084 { USB_DEVICE_WACOM(0x315) },
5085 { USB_DEVICE_WACOM(0x317) },
5086 { USB_DEVICE_WACOM(0x318) },
5087 { USB_DEVICE_WACOM(0x319) },
5088 { USB_DEVICE_WACOM(0x323) },
5089 { USB_DEVICE_WACOM(0x325) },
5090 { USB_DEVICE_WACOM(0x326) },
5091 { USB_DEVICE_WACOM(0x32A) },
5092 { USB_DEVICE_WACOM(0x32B) },
5093 { USB_DEVICE_WACOM(0x32C) },
5094 { USB_DEVICE_WACOM(0x32F) },
5095 { USB_DEVICE_WACOM(0x331) },
5096 { USB_DEVICE_WACOM(0x333) },
5097 { USB_DEVICE_WACOM(0x335) },
5098 { USB_DEVICE_WACOM(0x336) },
5099 { USB_DEVICE_WACOM(0x33B) },
5100 { USB_DEVICE_WACOM(0x33C) },
5101 { USB_DEVICE_WACOM(0x33D) },
5102 { USB_DEVICE_WACOM(0x33E) },
5103 { USB_DEVICE_WACOM(0x343) },
5104 { BT_DEVICE_WACOM(0x360) },
5105 { BT_DEVICE_WACOM(0x361) },
5106 { BT_DEVICE_WACOM(0x377) },
5107 { BT_DEVICE_WACOM(0x379) },
5108 { USB_DEVICE_WACOM(0x37A) },
5109 { USB_DEVICE_WACOM(0x37B) },
5110 { BT_DEVICE_WACOM(0x393) },
5111 { BT_DEVICE_WACOM(0x3c6) },
5112 { BT_DEVICE_WACOM(0x3c8) },
5113 { BT_DEVICE_WACOM(0x3dd) },
5114 { USB_DEVICE_WACOM(0x4001) },
5115 { USB_DEVICE_WACOM(0x4004) },
5116 { USB_DEVICE_WACOM(0x5000) },
5117 { USB_DEVICE_WACOM(0x5002) },
5118 { USB_DEVICE_LENOVO(0x6004) },