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()
2439 wacom_wac->serial[0] = (wacom_wac->serial[0] & ~0xFFFFFFFFULL); in wacom_wac_pen_event()
2440 wacom_wac->serial[0] |= wacom_s32tou(value, field->report_size); in wacom_wac_pen_event()
2445 if (!wacom_is_art_pen(wacom_wac->id[0])) return; in wacom_wac_pen_event()
2461 wacom_wac->serial[0] = (wacom_wac->serial[0] & 0xFFFFFFFF); in wacom_wac_pen_event()
2462 wacom_wac->serial[0] |= ((__u64)raw_value) << 32; in wacom_wac_pen_event()
2469 wacom_wac->id[0] |= raw_value & 0xFFFFF; in wacom_wac_pen_event()
2481 wacom_wac->id[0] |= wacom_s32tou(value, field->report_size); in wacom_wac_pen_event()
2519 wacom_wac->hid_data.sequence_number >= 0) { in wacom_wac_pen_event()
2540 input_event(input, usage->type, usage->code, 0); in wacom_wac_pen_event()
2561 bool entering_range = !wacom_wac->tool[0] && range; in wacom_wac_pen_report()
2569 wacom_wac->tool[0] = BTN_TOOL_RUBBER; in wacom_wac_pen_report()
2570 else if (wacom_wac->id[0]) in wacom_wac_pen_report()
2571 wacom_wac->tool[0] = wacom_intuos_get_tool_type(wacom_wac->id[0]); in wacom_wac_pen_report()
2573 wacom_wac->tool[0] = BTN_TOOL_PEN; in wacom_wac_pen_report()
2579 if (!delay_pen_events(wacom_wac) && wacom_wac->tool[0]) { in wacom_wac_pen_report()
2580 int id = wacom_wac->id[0]; in wacom_wac_pen_report()
2596 if (wacom_wac->serial[0] >> 52 == 1) in wacom_wac_pen_report()
2606 input_report_key(input, wacom_wac->tool[0], sense); in wacom_wac_pen_report()
2607 if (wacom_wac->serial[0]) { in wacom_wac_pen_report()
2610 * of '0'. Report the low 32 bits if possible, but in wacom_wac_pen_report()
2613 __u32 serial_lo = wacom_wac->serial[0] & 0xFFFFFFFFu; in wacom_wac_pen_report()
2614 __u32 serial_hi = wacom_wac->serial[0] >> 32; in wacom_wac_pen_report()
2616 input_report_abs(input, ABS_MISC, sense ? id : 0); in wacom_wac_pen_report()
2634 wacom_wac->tool[0] = 0; in wacom_wac_pen_report()
2635 wacom_wac->id[0] = 0; in wacom_wac_pen_report()
2636 wacom_wac->serial[0] = 0; in wacom_wac_pen_report()
2666 wacom_map_usage(input, usage, field, EV_ABS, ABS_MT_TOUCH_MAJOR, 0); in wacom_wac_finger_usage_mapping()
2667 wacom_map_usage(input, usage, field, EV_ABS, ABS_MT_TOUCH_MINOR, 0); in wacom_wac_finger_usage_mapping()
2668 input_set_abs_params(input, ABS_MT_ORIENTATION, 0, 1, 0, 0); in wacom_wac_finger_usage_mapping()
2671 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOUCH, 0); in wacom_wac_finger_usage_mapping()
2689 wacom_map_usage(input, usage, field, EV_MSC, MSC_TIMESTAMP, 0); in wacom_wac_finger_usage_mapping()
2716 if (slot < 0) { in wacom_wac_finger_slot()
2722 if (!prox && mt_id < 0) { in wacom_wac_finger_slot()
2745 input_report_abs(input, ABS_MT_ORIENTATION, hid_data->width <= hid_data->height ? 0 : 1); in wacom_wac_finger_slot()
2820 hid_data->cc_report = 0; in wacom_wac_finger_pre_report()
2824 for (i = 0; i < report->maxfield; i++) { in wacom_wac_finger_pre_report()
2828 for (j = 0; j < field->maxusage; j++) { in wacom_wac_finger_pre_report()
2853 if (hid_data->cc_report != 0 && in wacom_wac_finger_pre_report()
2854 hid_data->cc_index >= 0) { in wacom_wac_finger_pre_report()
2859 hid_data->num_received = 0; in wacom_wac_finger_pre_report()
2864 hid_data->num_received = 0; in wacom_wac_finger_pre_report()
2877 if (wacom_wac->hid_data.num_expected == 0) in wacom_wac_finger_report()
2891 wacom_wac->hid_data.num_received = 0; in wacom_wac_finger_report()
2892 wacom_wac->hid_data.num_expected = 0; in wacom_wac_finger_report()
2957 for (n = 0 ; n < count; n++) { in wacom_report_events()
2986 return 0; in wacom_wac_collection()
2992 return 0; in wacom_wac_collection()
3008 for (r = 0; r < report->maxfield; r++) { in wacom_wac_report()
3030 for (r = 0; r < report->maxfield; r++) { in wacom_wac_report()
3033 if (field->usage[0].collection_index != prev_collection) { in wacom_wac_report()
3035 field->usage[0].collection_index, field, r) < 0) in wacom_wac_report()
3037 prev_collection = field->usage[0].collection_index; in wacom_wac_report()
3055 if (data[0] != 0x02) in wacom_bpt_touch()
3056 return 0; in wacom_bpt_touch()
3058 for (i = 0; i < 2; i++) { in wacom_bpt_touch()
3059 int offset = (data[1] & 0x80) ? (8 * i) : (9 * i); in wacom_bpt_touch()
3061 && (data[offset + 3] & 0x80); in wacom_bpt_touch()
3066 int x = get_unaligned_be16(&data[offset + 3]) & 0x7ff; in wacom_bpt_touch()
3067 int y = get_unaligned_be16(&data[offset + 5]) & 0x7ff; in wacom_bpt_touch()
3079 input_report_key(pad_input, BTN_LEFT, (data[1] & 0x08) != 0); in wacom_bpt_touch()
3080 input_report_key(pad_input, BTN_FORWARD, (data[1] & 0x04) != 0); in wacom_bpt_touch()
3081 input_report_key(pad_input, BTN_BACK, (data[1] & 0x02) != 0); in wacom_bpt_touch()
3082 input_report_key(pad_input, BTN_RIGHT, (data[1] & 0x01) != 0); in wacom_bpt_touch()
3092 bool touch = data[1] & 0x80; in wacom_bpt3_touch_msg()
3093 int slot = input_mt_get_slot_by_key(input, data[0]); in wacom_bpt3_touch_msg()
3095 if (slot < 0) in wacom_bpt3_touch_msg()
3105 int y = (data[3] << 4) | (data[4] & 0x0f); in wacom_bpt3_touch_msg()
3137 input_report_key(input, BTN_LEFT, (data[1] & 0x02) != 0); in wacom_bpt3_button_msg()
3138 input_report_key(input, BTN_BACK, (data[1] & 0x08) != 0); in wacom_bpt3_button_msg()
3140 input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0); in wacom_bpt3_button_msg()
3141 input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0); in wacom_bpt3_button_msg()
3143 input_report_key(input, BTN_FORWARD, (data[1] & 0x04) != 0); in wacom_bpt3_button_msg()
3144 input_report_key(input, BTN_RIGHT, (data[1] & 0x01) != 0); in wacom_bpt3_button_msg()
3150 int count = data[1] & 0x07; in wacom_bpt3_touch()
3151 int touch_changed = 0, i; in wacom_bpt3_touch()
3153 if (data[0] != 0x02) in wacom_bpt3_touch()
3154 return 0; in wacom_bpt3_touch()
3157 for (i = 0; i < count; i++) { in wacom_bpt3_touch()
3183 int x = 0, y = 0, p = 0, d = 0; in wacom_bpt_pen()
3187 if (data[0] != WACOM_REPORT_PENABLED) in wacom_bpt_pen()
3188 return 0; in wacom_bpt_pen()
3190 range = (data[1] & 0x80) == 0x80; in wacom_bpt_pen()
3191 prox = (data[1] & 0x40) == 0x40; in wacom_bpt_pen()
3192 rdy = (data[1] & 0x20) == 0x20; in wacom_bpt_pen()
3196 return 0; in wacom_bpt_pen()
3200 pen = data[1] & 0x01; in wacom_bpt_pen()
3201 btn1 = data[1] & 0x02; in wacom_bpt_pen()
3202 btn2 = data[1] & 0x04; in wacom_bpt_pen()
3208 if (data[1] & 0x08) { in wacom_bpt_pen()
3209 wacom->tool[0] = BTN_TOOL_RUBBER; in wacom_bpt_pen()
3210 wacom->id[0] = ERASER_DEVICE_ID; in wacom_bpt_pen()
3212 wacom->tool[0] = BTN_TOOL_PEN; in wacom_bpt_pen()
3213 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_bpt_pen()
3227 wacom->id[0] = 0; in wacom_bpt_pen()
3242 input_report_key(input, wacom->tool[0], range); /* PEN or RUBBER */ in wacom_bpt_pen()
3243 input_report_abs(input, ABS_MISC, wacom->id[0]); /* TOOL ID */ in wacom_bpt_pen()
3267 return 0; in wacom_bpt_irq()
3282 prefix = data[0]; in wacom_bamboo_pad_pen_event()
3283 data[0] = WACOM_REPORT_BPAD_PEN; in wacom_bamboo_pad_pen_event()
3293 data[0] = prefix; in wacom_bamboo_pad_pen_event()
3305 prefix = data[0]; in wacom_bamboo_pad_touch_event()
3307 for (id = 0; id < wacom->features.touch_max; id++) { in wacom_bamboo_pad_touch_event()
3318 x = finger_data[0] | ((finger_data[1] & 0x0f) << 8); in wacom_bamboo_pad_touch_event()
3327 input_report_key(input, BTN_LEFT, prefix & 0x40); in wacom_bamboo_pad_touch_event()
3328 input_report_key(input, BTN_RIGHT, prefix & 0x80); in wacom_bamboo_pad_touch_event()
3342 (data[0] != WACOM_REPORT_BPAD_TOUCH)) in wacom_bamboo_pad_irq()
3343 return 0; in wacom_bamboo_pad_irq()
3345 if (data[1] & 0x01) in wacom_bamboo_pad_irq()
3348 if (data[1] & 0x02) in wacom_bamboo_pad_irq()
3351 return 0; in wacom_bamboo_pad_irq()
3359 if (len != WACOM_PKGLEN_WIRELESS || data[0] != WACOM_REPORT_WL) in wacom_wireless_irq()
3360 return 0; in wacom_wireless_irq()
3362 connected = data[1] & 0x01; in wacom_wireless_irq()
3371 SW_MUTE_DEVICE, data[5] & 0x40); in wacom_wireless_irq()
3376 battery = (data[5] & 0x3f) * 100 / 31; in wacom_wireless_irq()
3377 charging = !!(data[5] & 0x80); in wacom_wireless_irq()
3384 battery, charging, 1, 0); in wacom_wireless_irq()
3386 } else if (wacom->pid != 0) { in wacom_wireless_irq()
3388 wacom->pid = 0; in wacom_wireless_irq()
3390 wacom_notify_battery(wacom, POWER_SUPPLY_STATUS_UNKNOWN, 0, 0, 0, 0); in wacom_wireless_irq()
3393 return 0; in wacom_wireless_irq()
3402 if (data[0] != WACOM_REPORT_USB) in wacom_status_irq()
3403 return 0; in wacom_status_irq()
3410 SW_MUTE_DEVICE, data[8] & 0x40); in wacom_status_irq()
3414 if (data[9] & 0x02) { /* wireless module is attached */ in wacom_status_irq()
3415 int battery = (data[8] & 0x3f) * 100 / 31; in wacom_status_irq()
3416 bool charging = !!(data[8] & 0x80); in wacom_status_irq()
3425 wacom_notify_battery(wacom_wac, POWER_SUPPLY_STATUS_UNKNOWN, 0, 0, 0, 0); in wacom_status_irq()
3427 return 0; in wacom_status_irq()
3500 else if (wacom_wac->data[0] == WACOM_REPORT_USB) in wacom_wac_irq()
3526 if (wacom_wac->data[0] == WACOM_REPORT_USB) in wacom_wac_irq()
3542 if (wacom_wac->data[0] == WACOM_REPORT_DEVICE_LIST) in wacom_wac_irq()
3574 0, wacom_wac->features.distance_max, wacom_wac->features.distance_fuzz, 0); in wacom_setup_basic_pro_pen()
3589 input_set_abs_params(input_dev, ABS_WHEEL, 0, 1023, 0, 0); in wacom_setup_cintiq()
3590 input_set_abs_params(input_dev, ABS_TILT_X, -64, 63, features->tilt_fuzz, 0); in wacom_setup_cintiq()
3592 input_set_abs_params(input_dev, ABS_TILT_Y, -64, 63, features->tilt_fuzz, 0); in wacom_setup_cintiq()
3612 input_set_abs_params(input_dev, ABS_RZ, -900, 899, 0, 0); in wacom_setup_intuos()
3614 input_set_abs_params(input_dev, ABS_THROTTLE, -1023, 1023, 0, 0); in wacom_setup_intuos()
3677 * 0, whose HID descriptor has an application usage of 0xFF0D in wacom_setup_device_quirks()
3754 if (wacom->hdev->product == 0x382 || wacom->hdev->product == 0x37d) { in wacom_setup_device_quirks()
3785 return 0; in wacom_setup_pen_input_capabilities()
3787 input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in wacom_setup_pen_input_capabilities()
3791 input_set_abs_params(input_dev, ABS_X, 0 + features->offset_left, in wacom_setup_pen_input_capabilities()
3793 features->x_fuzz, 0); in wacom_setup_pen_input_capabilities()
3794 input_set_abs_params(input_dev, ABS_Y, 0 + features->offset_top, in wacom_setup_pen_input_capabilities()
3796 features->y_fuzz, 0); in wacom_setup_pen_input_capabilities()
3797 input_set_abs_params(input_dev, ABS_PRESSURE, 0, in wacom_setup_pen_input_capabilities()
3798 features->pressure_max, features->pressure_fuzz, 0); in wacom_setup_pen_input_capabilities()
3811 input_set_abs_params(input_dev, ABS_DISTANCE, 0, in wacom_setup_pen_input_capabilities()
3813 features->distance_fuzz, 0); in wacom_setup_pen_input_capabilities()
3840 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); in wacom_setup_pen_input_capabilities()
3852 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); in wacom_setup_pen_input_capabilities()
3868 input_set_abs_params(input_dev, ABS_DISTANCE, 0, in wacom_setup_pen_input_capabilities()
3870 features->distance_fuzz, 0); in wacom_setup_pen_input_capabilities()
3872 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); in wacom_setup_pen_input_capabilities()
3923 input_set_abs_params(input_dev, ABS_DISTANCE, 0, in wacom_setup_pen_input_capabilities()
3925 features->distance_fuzz, 0); in wacom_setup_pen_input_capabilities()
3932 return 0; in wacom_setup_pen_input_capabilities()
3950 return 0; in wacom_setup_touch_input_capabilities()
3952 input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in wacom_setup_touch_input_capabilities()
3956 input_set_abs_params(input_dev, ABS_X, 0, in wacom_setup_touch_input_capabilities()
3957 features->x_max, features->x_fuzz, 0); in wacom_setup_touch_input_capabilities()
3958 input_set_abs_params(input_dev, ABS_Y, 0, in wacom_setup_touch_input_capabilities()
3959 features->y_max, features->y_fuzz, 0); in wacom_setup_touch_input_capabilities()
3966 input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, in wacom_setup_touch_input_capabilities()
3967 features->x_max, features->x_fuzz, 0); in wacom_setup_touch_input_capabilities()
3968 input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, in wacom_setup_touch_input_capabilities()
3969 features->y_max, features->y_fuzz, 0); in wacom_setup_touch_input_capabilities()
3979 input_dev->evbit[0] |= BIT_MASK(EV_SW); in wacom_setup_touch_input_capabilities()
3982 if (wacom_wac->shared->touch->product == 0x361) { in wacom_setup_touch_input_capabilities()
3984 0, 12440, 4, 0); in wacom_setup_touch_input_capabilities()
3986 0, 8640, 4, 0); in wacom_setup_touch_input_capabilities()
3988 else if (wacom_wac->shared->touch->product == 0x360) { in wacom_setup_touch_input_capabilities()
3990 0, 8960, 4, 0); in wacom_setup_touch_input_capabilities()
3992 0, 5920, 4, 0); in wacom_setup_touch_input_capabilities()
3994 else if (wacom_wac->shared->touch->product == 0x393) { in wacom_setup_touch_input_capabilities()
3996 0, 6400, 4, 0); in wacom_setup_touch_input_capabilities()
3998 0, 4000, 4, 0); in wacom_setup_touch_input_capabilities()
4011 input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
4012 input_set_abs_params(input_dev, ABS_MT_TOUCH_MINOR, 0, features->y_max, 0, 0); in wacom_setup_touch_input_capabilities()
4017 input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
4018 input_set_abs_params(input_dev, ABS_MT_WIDTH_MAJOR, 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
4019 input_set_abs_params(input_dev, ABS_MT_WIDTH_MINOR, 0, features->y_max, 0, 0); in wacom_setup_touch_input_capabilities()
4020 input_set_abs_params(input_dev, ABS_MT_ORIENTATION, 0, 1, 0, 0); in wacom_setup_touch_input_capabilities()
4024 if (wacom_wac->shared->touch->product == 0x32C || in wacom_setup_touch_input_capabilities()
4025 wacom_wac->shared->touch->product == 0xF6) { in wacom_setup_touch_input_capabilities()
4026 input_dev->evbit[0] |= BIT_MASK(EV_SW); in wacom_setup_touch_input_capabilities()
4046 input_dev->evbit[0] |= BIT_MASK(EV_SW); in wacom_setup_touch_input_capabilities()
4055 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
4058 0, features->y_max, 0, 0); in wacom_setup_touch_input_capabilities()
4070 return 0; in wacom_setup_touch_input_capabilities()
4082 return 0; in wacom_numbered_button_to_key()
4090 for (i = 0; i < button_count; i++) { in wacom_setup_numbered_buttons()
4105 * 24HD has LED group 1 to the left and LED group 0 to the right. in wacom_24hd_update_leds()
4106 * So group 0 matches the second half of the buttons and thus the mask in wacom_24hd_update_leds()
4109 if (group == 0) in wacom_24hd_update_leds()
4112 for (i = 0; i < 3; i++) { in wacom_24hd_update_leds()
4134 * 21UX2 has LED group 1 to the left and LED group 0 in wacom_is_led_toggled()
4197 for (i = 0; i < wacom->led.count; i++) in wacom_report_numbered_buttons()
4200 for (i = 0; i < button_count; i++) { in wacom_report_numbered_buttons()
4213 if ((features->type == HID_GENERIC) && features->numbered_buttons > 0) in wacom_setup_pad_input_capabilities()
4222 input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in wacom_setup_pad_input_capabilities()
4230 input_set_abs_params(input_dev, ABS_X, 0, 1, 0, 0); in wacom_setup_pad_input_capabilities()
4233 input_set_abs_params(input_dev, ABS_Y, 0, 1, 0, 0); in wacom_setup_pad_input_capabilities()
4254 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4274 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4275 input_set_abs_params(input_dev, ABS_THROTTLE, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4288 input_set_abs_params(input_dev, ABS_X, -2048, 2048, 0, 0); in wacom_setup_pad_input_capabilities()
4290 input_set_abs_params(input_dev, ABS_Y, -2048, 2048, 0, 0); in wacom_setup_pad_input_capabilities()
4292 input_set_abs_params(input_dev, ABS_Z, -2048, 2048, 0, 0); in wacom_setup_pad_input_capabilities()
4309 input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4310 input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4314 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4319 input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4323 input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4334 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4349 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4367 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4378 return 0; in wacom_setup_pad_input_capabilities()
4382 { "Wacom Penpartner", 5040, 3780, 255, 0,
4460 { "Wacom PL400", 5408, 4056, 255, 0,
4463 { "Wacom PL500", 6144, 4608, 255, 0,
4466 { "Wacom PL600", 6126, 4604, 255, 0,
4469 { "Wacom PL600SX", 6260, 5016, 255, 0,
4472 { "Wacom PL550", 6144, 4608, 511, 0,
4475 { "Wacom PL800", 7220, 5780, 511, 0,
4478 { "Wacom PL700", 6758, 5406, 511, 0,
4481 { "Wacom PL510", 6282, 4762, 511, 0,
4484 { "Wacom DTU710", 34080, 27660, 511, 0,
4487 { "Wacom DTF521", 6282, 4762, 511, 0,
4490 { "Wacom DTF720", 6858, 5506, 511, 0,
4493 { "Wacom DTF720a", 6858, 5506, 511, 0,
4496 { "Wacom Cintiq Partner", 20480, 15360, 511, 0,
4589 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf6 };
4592 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf8, .touch_max = 10,
4596 WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 0,
4601 WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 0,
4604 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x32C };
4607 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x32B, .touch_max = 10 };
4627 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x335 };
4630 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x333, .touch_max = 10,
4633 { "Wacom DTU1931", 37832, 30305, 511, 0,
4636 { "Wacom DTU2231", 47864, 27011, 511, 0,
4640 { "Wacom DTU1631", 34623, 19553, 511, 0,
4643 { "Wacom DTU1031", 22096, 13960, 511, 0,
4648 { "Wacom DTU1031X", 22672, 12928, 511, 0,
4649 DTUSX, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 0,
4653 { "Wacom DTU1141", 23672, 13403, 1023, 0,
4667 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5D };
4670 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x59, .touch_max = 10,
4687 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5e };
4690 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5b, .touch_max = 10,
4693 { "Wacom ISDv4 90", 26202, 16325, 255, 0,
4696 { "Wacom ISDv4 93", 26202, 16325, 255, 0,
4699 { "Wacom ISDv4 97", 26202, 16325, 511, 0,
4702 { "Wacom ISDv4 9A", 26202, 16325, 255, 0,
4705 { "Wacom ISDv4 9F", 26202, 16325, 255, 0,
4708 { "Wacom ISDv4 E2", 26202, 16325, 255, 0,
4711 { "Wacom ISDv4 E3", 26202, 16325, 255, 0,
4714 { "Wacom ISDv4 E5", 26202, 16325, 255, 0,
4717 { "Wacom ISDv4 E6", 27760, 15694, 255, 0,
4720 { "Wacom ISDv4 EC", 25710, 14500, 255, 0,
4723 { "Wacom ISDv4 ED", 26202, 16325, 255, 0,
4726 { "Wacom ISDv4 EF", 26202, 16325, 255, 0,
4729 { "Wacom ISDv4 100", 26202, 16325, 255, 0,
4732 { "Wacom ISDv4 101", 26202, 16325, 255, 0,
4735 { "Wacom ISDv4 10D", 26202, 16325, 255, 0,
4738 { "Wacom ISDv4 10E", 27760, 15694, 255, 0,
4741 { "Wacom ISDv4 10F", 27760, 15694, 255, 0,
4744 { "Wacom ISDv4 116", 26202, 16325, 255, 0,
4747 { "Wacom ISDv4 12C", 27848, 15752, 2047, 0,
4750 { "Wacom ISDv4 4001", 26202, 16325, 255, 0,
4753 { "Wacom ISDv4 4004", 11060, 6220, 255, 0,
4756 { "Wacom ISDv4 5000", 27848, 15752, 1023, 0,
4759 { "Wacom ISDv4 5002", 29576, 16724, 1023, 0,
4827 { "ISD-V4", 12800, 8000, 255, 0,
4834 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x309 };
4837 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x0307, .touch_max = 10,
4844 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x30C };
4847 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x30A, .touch_max = 10,
4860 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x326 };
4863 .oPid = 0x325 };
4889 { "Wacom DTK1651", 34816, 19759, 1023, 0,
4949 { USB_DEVICE_WACOM(0x00) },
4950 { USB_DEVICE_WACOM(0x03) },
4951 { USB_DEVICE_WACOM(0x10) },
4952 { USB_DEVICE_WACOM(0x11) },
4953 { USB_DEVICE_WACOM(0x12) },
4954 { USB_DEVICE_WACOM(0x13) },
4955 { USB_DEVICE_WACOM(0x14) },
4956 { USB_DEVICE_WACOM(0x15) },
4957 { USB_DEVICE_WACOM(0x16) },
4958 { USB_DEVICE_WACOM(0x17) },
4959 { USB_DEVICE_WACOM(0x18) },
4960 { USB_DEVICE_WACOM(0x19) },
4961 { USB_DEVICE_WACOM(0x20) },
4962 { USB_DEVICE_WACOM(0x21) },
4963 { USB_DEVICE_WACOM(0x22) },
4964 { USB_DEVICE_WACOM(0x23) },
4965 { USB_DEVICE_WACOM(0x24) },
4966 { USB_DEVICE_WACOM(0x26) },
4967 { USB_DEVICE_WACOM(0x27) },
4968 { USB_DEVICE_WACOM(0x28) },
4969 { USB_DEVICE_WACOM(0x29) },
4970 { USB_DEVICE_WACOM(0x2A) },
4971 { USB_DEVICE_WACOM(0x30) },
4972 { USB_DEVICE_WACOM(0x31) },
4973 { USB_DEVICE_WACOM(0x32) },
4974 { USB_DEVICE_WACOM(0x33) },
4975 { USB_DEVICE_WACOM(0x34) },
4976 { USB_DEVICE_WACOM(0x35) },
4977 { USB_DEVICE_WACOM(0x37) },
4978 { USB_DEVICE_WACOM(0x38) },
4979 { USB_DEVICE_WACOM(0x39) },
4980 { USB_DEVICE_WACOM(0x3F) },
4981 { USB_DEVICE_WACOM(0x41) },
4982 { USB_DEVICE_WACOM(0x42) },
4983 { USB_DEVICE_WACOM(0x43) },
4984 { USB_DEVICE_WACOM(0x44) },
4985 { USB_DEVICE_WACOM(0x45) },
4986 { USB_DEVICE_WACOM(0x47) },
4987 { USB_DEVICE_WACOM(0x57) },
4988 { USB_DEVICE_WACOM(0x59) },
4989 { USB_DEVICE_WACOM(0x5B) },
4990 { USB_DEVICE_WACOM(0x5D) },
4991 { USB_DEVICE_WACOM(0x5E) },
4992 { USB_DEVICE_WACOM(0x60) },
4993 { USB_DEVICE_WACOM(0x61) },
4994 { USB_DEVICE_WACOM(0x62) },
4995 { USB_DEVICE_WACOM(0x63) },
4996 { USB_DEVICE_WACOM(0x64) },
4997 { USB_DEVICE_WACOM(0x65) },
4998 { USB_DEVICE_WACOM(0x69) },
4999 { USB_DEVICE_WACOM(0x6A) },
5000 { USB_DEVICE_WACOM(0x6B) },
5001 { BT_DEVICE_WACOM(0x81) },
5002 { USB_DEVICE_WACOM(0x84) },
5003 { USB_DEVICE_WACOM(0x90) },
5004 { USB_DEVICE_WACOM(0x93) },
5005 { USB_DEVICE_WACOM(0x94) },
5006 { USB_DEVICE_WACOM(0x97) },
5007 { USB_DEVICE_WACOM(0x9A) },
5008 { USB_DEVICE_WACOM(0x9F) },
5009 { USB_DEVICE_WACOM(0xB0) },
5010 { USB_DEVICE_WACOM(0xB1) },
5011 { USB_DEVICE_WACOM(0xB2) },
5012 { USB_DEVICE_WACOM(0xB3) },
5013 { USB_DEVICE_WACOM(0xB4) },
5014 { USB_DEVICE_WACOM(0xB5) },
5015 { USB_DEVICE_WACOM(0xB7) },
5016 { USB_DEVICE_WACOM(0xB8) },
5017 { USB_DEVICE_WACOM(0xB9) },
5018 { USB_DEVICE_WACOM(0xBA) },
5019 { USB_DEVICE_WACOM(0xBB) },
5020 { USB_DEVICE_WACOM(0xBC) },
5021 { BT_DEVICE_WACOM(0xBD) },
5022 { USB_DEVICE_WACOM(0xC0) },
5023 { USB_DEVICE_WACOM(0xC2) },
5024 { USB_DEVICE_WACOM(0xC4) },
5025 { USB_DEVICE_WACOM(0xC5) },
5026 { USB_DEVICE_WACOM(0xC6) },
5027 { USB_DEVICE_WACOM(0xC7) },
5028 { USB_DEVICE_WACOM(0xCC) },
5029 { USB_DEVICE_WACOM(0xCE) },
5030 { USB_DEVICE_WACOM(0xD0) },
5031 { USB_DEVICE_WACOM(0xD1) },
5032 { USB_DEVICE_WACOM(0xD2) },
5033 { USB_DEVICE_WACOM(0xD3) },
5034 { USB_DEVICE_WACOM(0xD4) },
5035 { USB_DEVICE_WACOM(0xD5) },
5036 { USB_DEVICE_WACOM(0xD6) },
5037 { USB_DEVICE_WACOM(0xD7) },
5038 { USB_DEVICE_WACOM(0xD8) },
5039 { USB_DEVICE_WACOM(0xDA) },
5040 { USB_DEVICE_WACOM(0xDB) },
5041 { USB_DEVICE_WACOM(0xDD) },
5042 { USB_DEVICE_WACOM(0xDE) },
5043 { USB_DEVICE_WACOM(0xDF) },
5044 { USB_DEVICE_WACOM(0xE2) },
5045 { USB_DEVICE_WACOM(0xE3) },
5046 { USB_DEVICE_WACOM(0xE5) },
5047 { USB_DEVICE_WACOM(0xE6) },
5048 { USB_DEVICE_WACOM(0xEC) },
5049 { USB_DEVICE_WACOM(0xED) },
5050 { USB_DEVICE_WACOM(0xEF) },
5051 { USB_DEVICE_WACOM(0xF0) },
5052 { USB_DEVICE_WACOM(0xF4) },
5053 { USB_DEVICE_WACOM(0xF6) },
5054 { USB_DEVICE_WACOM(0xF8) },
5055 { USB_DEVICE_WACOM(0xFA) },
5056 { USB_DEVICE_WACOM(0xFB) },
5057 { USB_DEVICE_WACOM(0x100) },
5058 { USB_DEVICE_WACOM(0x101) },
5059 { USB_DEVICE_WACOM(0x10D) },
5060 { USB_DEVICE_WACOM(0x10E) },
5061 { USB_DEVICE_WACOM(0x10F) },
5062 { USB_DEVICE_WACOM(0x116) },
5063 { USB_DEVICE_WACOM(0x12C) },
5064 { USB_DEVICE_WACOM(0x300) },
5065 { USB_DEVICE_WACOM(0x301) },
5066 { USB_DEVICE_WACOM(0x302) },
5067 { USB_DEVICE_WACOM(0x303) },
5068 { USB_DEVICE_WACOM(0x304) },
5069 { USB_DEVICE_WACOM(0x307) },
5070 { USB_DEVICE_WACOM(0x309) },
5071 { USB_DEVICE_WACOM(0x30A) },
5072 { USB_DEVICE_WACOM(0x30C) },
5073 { USB_DEVICE_WACOM(0x30E) },
5074 { USB_DEVICE_WACOM(0x314) },
5075 { USB_DEVICE_WACOM(0x315) },
5076 { USB_DEVICE_WACOM(0x317) },
5077 { USB_DEVICE_WACOM(0x318) },
5078 { USB_DEVICE_WACOM(0x319) },
5079 { USB_DEVICE_WACOM(0x323) },
5080 { USB_DEVICE_WACOM(0x325) },
5081 { USB_DEVICE_WACOM(0x326) },
5082 { USB_DEVICE_WACOM(0x32A) },
5083 { USB_DEVICE_WACOM(0x32B) },
5084 { USB_DEVICE_WACOM(0x32C) },
5085 { USB_DEVICE_WACOM(0x32F) },
5086 { USB_DEVICE_WACOM(0x331) },
5087 { USB_DEVICE_WACOM(0x333) },
5088 { USB_DEVICE_WACOM(0x335) },
5089 { USB_DEVICE_WACOM(0x336) },
5090 { USB_DEVICE_WACOM(0x33B) },
5091 { USB_DEVICE_WACOM(0x33C) },
5092 { USB_DEVICE_WACOM(0x33D) },
5093 { USB_DEVICE_WACOM(0x33E) },
5094 { USB_DEVICE_WACOM(0x343) },
5095 { BT_DEVICE_WACOM(0x360) },
5096 { BT_DEVICE_WACOM(0x361) },
5097 { BT_DEVICE_WACOM(0x377) },
5098 { BT_DEVICE_WACOM(0x379) },
5099 { USB_DEVICE_WACOM(0x37A) },
5100 { USB_DEVICE_WACOM(0x37B) },
5101 { BT_DEVICE_WACOM(0x393) },
5102 { BT_DEVICE_WACOM(0x3c6) },
5103 { BT_DEVICE_WACOM(0x3c8) },
5104 { BT_DEVICE_WACOM(0x3dd) },
5105 { USB_DEVICE_WACOM(0x4001) },
5106 { USB_DEVICE_WACOM(0x4004) },
5107 { USB_DEVICE_WACOM(0x5000) },
5108 { USB_DEVICE_WACOM(0x5002) },
5109 { USB_DEVICE_LENOVO(0x6004) },