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()
701 case 0x812: /* Inking pen */ in wacom_intuos_get_tool_type()
702 case 0x801: /* Intuos3 Inking pen */ in wacom_intuos_get_tool_type()
703 case 0x12802: /* Intuos4/5 Inking Pen */ in wacom_intuos_get_tool_type()
704 case 0x012: in wacom_intuos_get_tool_type()
708 case 0x822: /* Pen */ in wacom_intuos_get_tool_type()
709 case 0x842: in wacom_intuos_get_tool_type()
710 case 0x852: in wacom_intuos_get_tool_type()
711 case 0x823: /* Intuos3 Grip Pen */ in wacom_intuos_get_tool_type()
712 case 0x813: /* Intuos3 Classic Pen */ in wacom_intuos_get_tool_type()
713 case 0x802: /* Intuos4/5 13HD/24HD General Pen */ in wacom_intuos_get_tool_type()
714 case 0x8e2: /* IntuosHT2 pen */ in wacom_intuos_get_tool_type()
715 case 0x022: in wacom_intuos_get_tool_type()
716 case 0x200: /* Pro Pen 3 */ in wacom_intuos_get_tool_type()
717 case 0x04200: /* Pro Pen 3 */ in wacom_intuos_get_tool_type()
718 case 0x10842: /* MobileStudio Pro Pro Pen slim */ in wacom_intuos_get_tool_type()
719 case 0x14802: /* Intuos4/5 13HD/24HD Classic Pen */ in wacom_intuos_get_tool_type()
720 case 0x16802: /* Cintiq 13HD Pro Pen */ in wacom_intuos_get_tool_type()
721 case 0x18802: /* DTH2242 Pen */ in wacom_intuos_get_tool_type()
722 case 0x10802: /* Intuos4/5 13HD/24HD General Pen */ in wacom_intuos_get_tool_type()
723 case 0x80842: /* Intuos Pro and Cintiq Pro 3D Pen */ in wacom_intuos_get_tool_type()
727 case 0x832: /* Stroke pen */ in wacom_intuos_get_tool_type()
728 case 0x032: in wacom_intuos_get_tool_type()
732 case 0x007: /* Mouse 4D and 2D */ in wacom_intuos_get_tool_type()
733 case 0x09c: in wacom_intuos_get_tool_type()
734 case 0x094: in wacom_intuos_get_tool_type()
735 case 0x017: /* Intuos3 2D Mouse */ in wacom_intuos_get_tool_type()
736 case 0x806: /* Intuos4 Mouse */ in wacom_intuos_get_tool_type()
740 case 0x096: /* Lens cursor */ in wacom_intuos_get_tool_type()
741 case 0x097: /* Intuos3 Lens cursor */ in wacom_intuos_get_tool_type()
742 case 0x006: /* Intuos4 Lens cursor */ in wacom_intuos_get_tool_type()
746 case 0x82a: /* Eraser */ in wacom_intuos_get_tool_type()
747 case 0x84a: in wacom_intuos_get_tool_type()
748 case 0x85a: in wacom_intuos_get_tool_type()
749 case 0x91a: in wacom_intuos_get_tool_type()
750 case 0xd1a: in wacom_intuos_get_tool_type()
751 case 0x0fa: in wacom_intuos_get_tool_type()
752 case 0x82b: /* Intuos3 Grip Pen Eraser */ in wacom_intuos_get_tool_type()
753 case 0x81b: /* Intuos3 Classic Pen Eraser */ in wacom_intuos_get_tool_type()
754 case 0x91b: /* Intuos3 Airbrush Eraser */ in wacom_intuos_get_tool_type()
755 case 0x80c: /* Intuos4/5 13HD/24HD Marker Pen Eraser */ in wacom_intuos_get_tool_type()
756 case 0x80a: /* Intuos4/5 13HD/24HD General Pen Eraser */ in wacom_intuos_get_tool_type()
757 case 0x90a: /* Intuos4/5 13HD/24HD Airbrush Eraser */ in wacom_intuos_get_tool_type()
758 case 0x1480a: /* Intuos4/5 13HD/24HD Classic Pen Eraser */ in wacom_intuos_get_tool_type()
759 case 0x1090a: /* Intuos4/5 13HD/24HD Airbrush Eraser */ in wacom_intuos_get_tool_type()
760 case 0x1080c: /* Intuos4/5 13HD/24HD Art Pen Eraser */ in wacom_intuos_get_tool_type()
761 case 0x1084a: /* MobileStudio Pro Pro Pen slim Eraser */ in wacom_intuos_get_tool_type()
762 case 0x1680a: /* Cintiq 13HD Pro Pen Eraser */ in wacom_intuos_get_tool_type()
763 case 0x1880a: /* DTH2242 Eraser */ in wacom_intuos_get_tool_type()
764 case 0x1080a: /* Intuos4/5 13HD/24HD General Pen Eraser */ in wacom_intuos_get_tool_type()
768 case 0xd12: in wacom_intuos_get_tool_type()
769 case 0x912: in wacom_intuos_get_tool_type()
770 case 0x112: in wacom_intuos_get_tool_type()
771 case 0x913: /* Intuos3 Airbrush */ in wacom_intuos_get_tool_type()
772 case 0x902: /* Intuos4/5 13HD/24HD Airbrush */ in wacom_intuos_get_tool_type()
773 case 0x10902: /* Intuos4/5 13HD/24HD Airbrush */ in wacom_intuos_get_tool_type()
785 int idx = (features->type == INTUOS) ? (data[1] & 0x01) : 0; in wacom_exit_report()
791 input_report_abs(input, ABS_X, 0); in wacom_exit_report()
792 input_report_abs(input, ABS_Y, 0); in wacom_exit_report()
793 input_report_abs(input, ABS_DISTANCE, 0); in wacom_exit_report()
794 input_report_abs(input, ABS_TILT_X, 0); in wacom_exit_report()
795 input_report_abs(input, ABS_TILT_Y, 0); in wacom_exit_report()
797 input_report_key(input, BTN_LEFT, 0); in wacom_exit_report()
798 input_report_key(input, BTN_MIDDLE, 0); in wacom_exit_report()
799 input_report_key(input, BTN_RIGHT, 0); in wacom_exit_report()
800 input_report_key(input, BTN_SIDE, 0); in wacom_exit_report()
801 input_report_key(input, BTN_EXTRA, 0); in wacom_exit_report()
802 input_report_abs(input, ABS_THROTTLE, 0); in wacom_exit_report()
803 input_report_abs(input, ABS_RZ, 0); in wacom_exit_report()
805 input_report_abs(input, ABS_PRESSURE, 0); in wacom_exit_report()
806 input_report_key(input, BTN_STYLUS, 0); in wacom_exit_report()
807 input_report_key(input, BTN_STYLUS2, 0); in wacom_exit_report()
808 input_report_key(input, BTN_TOUCH, 0); in wacom_exit_report()
809 input_report_abs(input, ABS_WHEEL, 0); in wacom_exit_report()
811 input_report_abs(input, ABS_Z, 0); in wacom_exit_report()
813 input_report_key(input, wacom->tool[idx], 0); in wacom_exit_report()
814 input_report_abs(input, ABS_MISC, 0); /* reset tool id */ in wacom_exit_report()
816 wacom->id[idx] = 0; in wacom_exit_report()
824 int idx = (features->type == INTUOS) ? (data[1] & 0x01) : 0; in wacom_intuos_inout()
826 if (!(((data[1] & 0xfc) == 0xc0) || /* in prox */ in wacom_intuos_inout()
827 ((data[1] & 0xfe) == 0x20) || /* in range */ in wacom_intuos_inout()
828 ((data[1] & 0xfe) == 0x80))) /* out prox */ in wacom_intuos_inout()
829 return 0; in wacom_intuos_inout()
832 if ((data[1] & 0xfc) == 0xc0) { in wacom_intuos_inout()
834 wacom->serial[idx] = ((__u64)(data[3] & 0x0f) << 28) + in wacom_intuos_inout()
839 ((data[7] & 0x0f) << 16) | ((data[8] & 0xf0) << 8); in wacom_intuos_inout()
848 if ((data[1] & 0xfe) == 0x20) { in wacom_intuos_inout()
854 input_report_key(input, BTN_TOUCH, 0); in wacom_intuos_inout()
855 input_report_abs(input, ABS_PRESSURE, 0); in wacom_intuos_inout()
863 if ((data[1] & 0xfe) == 0x80) { in wacom_intuos_inout()
875 return 0; in wacom_intuos_inout()
900 int idx = (features->type == INTUOS) ? (data[1] & 0x01) : 0; in wacom_intuos_general()
901 unsigned char type = (data[1] >> 1) & 0x0F; in wacom_intuos_general()
904 if (data[0] != WACOM_REPORT_PENABLED && data[0] != WACOM_REPORT_CINTIQ && in wacom_intuos_general()
905 data[0] != WACOM_REPORT_INTUOS_PEN) in wacom_intuos_general()
906 return 0; in wacom_intuos_general()
922 if ((!((wacom->id[idx] >> 16) & 0x01) && in wacom_intuos_general()
935 (features->type == CINTIQ && !(data[1] & 0x40))) in wacom_intuos_general()
953 case 0x00: in wacom_intuos_general()
954 case 0x01: in wacom_intuos_general()
955 case 0x02: in wacom_intuos_general()
956 case 0x03: in wacom_intuos_general()
958 t = (data[6] << 3) | ((data[7] & 0xC0) >> 5) | (data[1] & 1); in wacom_intuos_general()
964 (((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64); in wacom_intuos_general()
965 input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64); in wacom_intuos_general()
972 case 0x0a: in wacom_intuos_general()
977 (((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64); in wacom_intuos_general()
978 input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64); in wacom_intuos_general()
981 case 0x05: in wacom_intuos_general()
986 t = (data[7] & 0x20) ? ((t > 900) ? ((t-1) / 2 - 1350) : in wacom_intuos_general()
992 input_report_abs(input, ABS_RZ, (data[7] & 0x20) ? in wacom_intuos_general()
997 case 0x04: in wacom_intuos_general()
999 input_report_key(input, BTN_LEFT, data[8] & 0x01); in wacom_intuos_general()
1000 input_report_key(input, BTN_MIDDLE, data[8] & 0x02); in wacom_intuos_general()
1001 input_report_key(input, BTN_RIGHT, data[8] & 0x04); in wacom_intuos_general()
1003 input_report_key(input, BTN_SIDE, data[8] & 0x20); in wacom_intuos_general()
1004 input_report_key(input, BTN_EXTRA, data[8] & 0x10); in wacom_intuos_general()
1006 input_report_abs(input, ABS_THROTTLE, (data[8] & 0x08) ? -t : t); in wacom_intuos_general()
1009 case 0x06: in wacom_intuos_general()
1011 input_report_key(input, BTN_LEFT, data[6] & 0x01); in wacom_intuos_general()
1012 input_report_key(input, BTN_MIDDLE, data[6] & 0x02); in wacom_intuos_general()
1013 input_report_key(input, BTN_RIGHT, data[6] & 0x04); in wacom_intuos_general()
1014 input_report_rel(input, REL_WHEEL, ((data[7] & 0x80) >> 7) in wacom_intuos_general()
1015 - ((data[7] & 0x40) >> 6)); in wacom_intuos_general()
1016 input_report_key(input, BTN_SIDE, data[6] & 0x08); in wacom_intuos_general()
1017 input_report_key(input, BTN_EXTRA, data[6] & 0x10); in wacom_intuos_general()
1020 (((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64); in wacom_intuos_general()
1021 input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64); in wacom_intuos_general()
1024 case 0x08: in wacom_intuos_general()
1027 input_report_key(input, BTN_LEFT, data[8] & 0x04); in wacom_intuos_general()
1028 input_report_key(input, BTN_MIDDLE, data[8] & 0x08); in wacom_intuos_general()
1029 input_report_key(input, BTN_RIGHT, data[8] & 0x10); in wacom_intuos_general()
1030 input_report_rel(input, REL_WHEEL, (data[8] & 0x01) in wacom_intuos_general()
1031 - ((data[8] & 0x02) >> 1)); in wacom_intuos_general()
1035 input_report_key(input, BTN_SIDE, data[8] & 0x40); in wacom_intuos_general()
1036 input_report_key(input, BTN_EXTRA, data[8] & 0x20); in wacom_intuos_general()
1041 input_report_key(input, BTN_LEFT, data[8] & 0x01); in wacom_intuos_general()
1042 input_report_key(input, BTN_MIDDLE, data[8] & 0x02); in wacom_intuos_general()
1043 input_report_key(input, BTN_RIGHT, data[8] & 0x04); in wacom_intuos_general()
1044 input_report_key(input, BTN_SIDE, data[8] & 0x10); in wacom_intuos_general()
1045 input_report_key(input, BTN_EXTRA, data[8] & 0x08); in wacom_intuos_general()
1049 case 0x07: in wacom_intuos_general()
1050 case 0x09: in wacom_intuos_general()
1051 case 0x0b: in wacom_intuos_general()
1052 case 0x0c: in wacom_intuos_general()
1053 case 0x0d: in wacom_intuos_general()
1054 case 0x0e: in wacom_intuos_general()
1055 case 0x0f: in wacom_intuos_general()
1074 if (data[0] != WACOM_REPORT_PENABLED && in wacom_intuos_irq()
1075 data[0] != WACOM_REPORT_INTUOS_ID1 && in wacom_intuos_irq()
1076 data[0] != WACOM_REPORT_INTUOS_ID2 && in wacom_intuos_irq()
1077 data[0] != WACOM_REPORT_INTUOSPAD && in wacom_intuos_irq()
1078 data[0] != WACOM_REPORT_INTUOS_PEN && in wacom_intuos_irq()
1079 data[0] != WACOM_REPORT_CINTIQ && in wacom_intuos_irq()
1080 data[0] != WACOM_REPORT_CINTIQPAD && in wacom_intuos_irq()
1081 data[0] != WACOM_REPORT_INTUOS5PAD) { in wacom_intuos_irq()
1083 "%s: received unknown report #%d\n", __func__, data[0]); in wacom_intuos_irq()
1084 return 0; in wacom_intuos_irq()
1102 return 0; in wacom_intuos_irq()
1116 if (data[0] != WACOM_REPORT_REMOTE) { in wacom_remote_irq()
1118 __func__, data[0]); in wacom_remote_irq()
1119 return 0; in wacom_remote_irq()
1123 wacom_wac->id[0] = PAD_DEVICE_ID; in wacom_remote_irq()
1127 for (i = 0; i < WACOM_MAX_REMOTES; i++) { in wacom_remote_irq()
1134 if (index < 0 || !remote->remotes[index].registered) in wacom_remote_irq()
1140 input_report_key(input, BTN_0, (data[9] & 0x01)); in wacom_remote_irq()
1141 input_report_key(input, BTN_1, (data[9] & 0x02)); in wacom_remote_irq()
1142 input_report_key(input, BTN_2, (data[9] & 0x04)); in wacom_remote_irq()
1143 input_report_key(input, BTN_3, (data[9] & 0x08)); in wacom_remote_irq()
1144 input_report_key(input, BTN_4, (data[9] & 0x10)); in wacom_remote_irq()
1145 input_report_key(input, BTN_5, (data[9] & 0x20)); in wacom_remote_irq()
1146 input_report_key(input, BTN_6, (data[9] & 0x40)); in wacom_remote_irq()
1147 input_report_key(input, BTN_7, (data[9] & 0x80)); in wacom_remote_irq()
1149 input_report_key(input, BTN_8, (data[10] & 0x01)); in wacom_remote_irq()
1150 input_report_key(input, BTN_9, (data[10] & 0x02)); in wacom_remote_irq()
1151 input_report_key(input, BTN_A, (data[10] & 0x04)); in wacom_remote_irq()
1152 input_report_key(input, BTN_B, (data[10] & 0x08)); in wacom_remote_irq()
1153 input_report_key(input, BTN_C, (data[10] & 0x10)); in wacom_remote_irq()
1154 input_report_key(input, BTN_X, (data[10] & 0x20)); in wacom_remote_irq()
1155 input_report_key(input, BTN_Y, (data[10] & 0x40)); in wacom_remote_irq()
1156 input_report_key(input, BTN_Z, (data[10] & 0x80)); in wacom_remote_irq()
1158 input_report_key(input, BTN_BASE, (data[11] & 0x01)); in wacom_remote_irq()
1159 input_report_key(input, BTN_BASE2, (data[11] & 0x02)); in wacom_remote_irq()
1161 if (data[12] & 0x80) in wacom_remote_irq()
1162 input_report_abs(input, ABS_WHEEL, (data[12] & 0x7f) - 1); in wacom_remote_irq()
1164 input_report_abs(input, ABS_WHEEL, 0); in wacom_remote_irq()
1166 bat_percent = data[7] & 0x7f; in wacom_remote_irq()
1167 bat_charging = !!(data[7] & 0x80); in wacom_remote_irq()
1169 if (data[9] | data[10] | (data[11] & 0x03) | data[12]) in wacom_remote_irq()
1172 input_report_abs(input, ABS_MISC, 0); in wacom_remote_irq()
1179 touch_ring_mode = (data[11] & 0xC0) >> 6; in wacom_remote_irq()
1181 for (i = 0; i < WACOM_MAX_REMOTES; i++) { in wacom_remote_irq()
1192 return 0; in wacom_remote_irq()
1204 if (data[0] != WACOM_REPORT_DEVICE_LIST) in wacom_remote_status_irq()
1207 memset(&remote_data, 0, sizeof(struct wacom_remote_work_data)); in wacom_remote_status_irq()
1209 for (i = 0; i < WACOM_MAX_REMOTES; i++) { in wacom_remote_status_irq()
1257 switch (data[0]) { in wacom_intuos_bt_irq()
1258 case 0x04: in wacom_intuos_bt_irq()
1262 case 0x03: in wacom_intuos_bt_irq()
1268 bat_charging = (power_raw & 0x08) ? 1 : 0; in wacom_intuos_bt_irq()
1269 ps_connected = (power_raw & 0x10) ? 1 : 0; in wacom_intuos_bt_irq()
1270 battery_capacity = batcap_i4[power_raw & 0x07]; in wacom_intuos_bt_irq()
1279 data[0], data[1], len); in wacom_intuos_bt_irq()
1280 return 0; in wacom_intuos_bt_irq()
1282 return 0; in wacom_intuos_bt_irq()
1289 int count = 0; in wacom_wac_finger_count_touches()
1293 return 0; in wacom_wac_finger_count_touches()
1299 for (i = 0; i < input->mt->num_slots; i++) { in wacom_wac_finger_count_touches()
1302 if (id >= 0) in wacom_wac_finger_count_touches()
1315 int number_of_valid_frames = 0; in wacom_intuos_pro2_bt_pen()
1322 wacom->serial[0] = get_unaligned_le64(&data[99]); in wacom_intuos_pro2_bt_pen()
1323 wacom->id[0] = get_unaligned_le16(&data[107]); in wacom_intuos_pro2_bt_pen()
1327 wacom->serial[0] = get_unaligned_le64(&data[33]); in wacom_intuos_pro2_bt_pen()
1328 wacom->id[0] = get_unaligned_le16(&data[41]); in wacom_intuos_pro2_bt_pen()
1333 if (wacom->serial[0] >> 52 == 1) { in wacom_intuos_pro2_bt_pen()
1335 wacom->id[0] |= (wacom->serial[0] >> 32) & 0xFFFFF; in wacom_intuos_pro2_bt_pen()
1339 for (i = 0; i < pen_frames; i++) { in wacom_intuos_pro2_bt_pen()
1341 bool valid = frame[0] & 0x80; in wacom_intuos_pro2_bt_pen()
1354 for (i = 0; i < number_of_valid_frames; i++) { in wacom_intuos_pro2_bt_pen()
1356 bool valid = frame[0] & 0x80; in wacom_intuos_pro2_bt_pen()
1357 bool prox = frame[0] & 0x40; in wacom_intuos_pro2_bt_pen()
1358 bool range = frame[0] & 0x20; in wacom_intuos_pro2_bt_pen()
1359 bool invert = frame[0] & 0x10; in wacom_intuos_pro2_bt_pen()
1371 wacom->tool[0] = 0; in wacom_intuos_pro2_bt_pen()
1372 wacom->id[0] = 0; in wacom_intuos_pro2_bt_pen()
1373 wacom->serial[0] = 0; in wacom_intuos_pro2_bt_pen()
1374 wacom->hid_data.time_delayed = 0; in wacom_intuos_pro2_bt_pen()
1379 if (!wacom->tool[0]) { /* first in range */ in wacom_intuos_pro2_bt_pen()
1382 wacom->tool[0] = BTN_TOOL_RUBBER; in wacom_intuos_pro2_bt_pen()
1383 else if (wacom->id[0]) in wacom_intuos_pro2_bt_pen()
1384 wacom->tool[0] = wacom_intuos_get_tool_type(wacom->id[0]); in wacom_intuos_pro2_bt_pen()
1386 wacom->tool[0] = BTN_TOOL_PEN; in wacom_intuos_pro2_bt_pen()
1412 if (wacom->tool[0]) { in wacom_intuos_pro2_bt_pen()
1423 input_report_key(pen_input, BTN_TOUCH, frame[0] & 0x09); in wacom_intuos_pro2_bt_pen()
1424 input_report_key(pen_input, BTN_STYLUS, frame[0] & 0x02); in wacom_intuos_pro2_bt_pen()
1425 input_report_key(pen_input, BTN_STYLUS2, frame[0] & 0x04); in wacom_intuos_pro2_bt_pen()
1427 input_report_key(pen_input, wacom->tool[0], prox); in wacom_intuos_pro2_bt_pen()
1428 input_event(pen_input, EV_MSC, MSC_SERIAL, wacom->serial[0]); in wacom_intuos_pro2_bt_pen()
1430 wacom_intuos_id_mangle(wacom->id[0])); /* report tool id */ in wacom_intuos_pro2_bt_pen()
1453 for (i = 0; i < finger_frames; i++) { in wacom_intuos_pro2_bt_touch()
1455 int current_num_contacts = frame[0] & 0x7F; in wacom_intuos_pro2_bt_touch()
1458 if (!(frame[0] & 0x80)) in wacom_intuos_pro2_bt_touch()
1470 for (j = 0; j < contacts_to_send; j++) { in wacom_intuos_pro2_bt_touch()
1472 int slot = input_mt_get_slot_by_key(touch_input, touch[0]); in wacom_intuos_pro2_bt_touch()
1478 if (slot < 0) in wacom_intuos_pro2_bt_touch()
1482 input_mt_report_slot_state(touch_input, MT_TOOL_FINGER, touch[1] & 0x01); in wacom_intuos_pro2_bt_touch()
1493 if (wacom->num_contacts_left <= 0) { in wacom_intuos_pro2_bt_touch()
1494 wacom->num_contacts_left = 0; in wacom_intuos_pro2_bt_touch()
1500 if (wacom->num_contacts_left == 0) { in wacom_intuos_pro2_bt_touch()
1516 int center = (data[281] & 0x40) >> 6; in wacom_intuos_pro2_bt_pad()
1517 int ring = data[285] & 0x7F; in wacom_intuos_pro2_bt_pad()
1518 bool ringstatus = data[285] & 0x80; in wacom_intuos_pro2_bt_pad()
1521 /* Fix touchring data: userspace expects 0 at left and increasing clockwise */ in wacom_intuos_pro2_bt_pad()
1530 input_report_abs(pad_input, ABS_WHEEL, ringstatus ? ring : 0); in wacom_intuos_pro2_bt_pad()
1532 input_report_key(pad_input, wacom->tool[1], prox ? 1 : 0); in wacom_intuos_pro2_bt_pad()
1533 input_report_abs(pad_input, ABS_MISC, prox ? PAD_DEVICE_ID : 0); in wacom_intuos_pro2_bt_pad()
1534 input_event(pad_input, EV_MSC, MSC_SERIAL, 0xffffffff); in wacom_intuos_pro2_bt_pad()
1543 bool chg = data[284] & 0x80; in wacom_intuos_pro2_bt_battery()
1544 int battery_status = data[284] & 0x7F; in wacom_intuos_pro2_bt_battery()
1559 input_report_key(pad_input, wacom->tool[1], buttons ? 1 : 0); in wacom_intuos_gen3_bt_pad()
1560 input_report_abs(pad_input, ABS_MISC, buttons ? PAD_DEVICE_ID : 0); in wacom_intuos_gen3_bt_pad()
1561 input_event(pad_input, EV_MSC, MSC_SERIAL, 0xffffffff); in wacom_intuos_gen3_bt_pad()
1570 bool chg = data[45] & 0x80; in wacom_intuos_gen3_bt_battery()
1571 int battery_status = data[45] & 0x7F; in wacom_intuos_gen3_bt_battery()
1581 if (data[0] != 0x80 && data[0] != 0x81) { in wacom_intuos_pro2_bt_irq()
1583 "%s: received unknown report #%d\n", __func__, data[0]); in wacom_intuos_pro2_bt_irq()
1584 return 0; in wacom_intuos_pro2_bt_irq()
1597 return 0; in wacom_intuos_pro2_bt_irq()
1606 int contacts_to_send = 0; in wacom_24hdt_irq()
1612 return 0; in wacom_24hdt_irq()
1618 y_offset = 0; in wacom_24hdt_irq()
1630 for (i = 0; i < contacts_to_send; i++) { in wacom_24hdt_irq()
1632 bool touch = (data[offset] & 0x1) && report_touch_events(wacom); in wacom_24hdt_irq()
1635 if (slot < 0) in wacom_24hdt_irq()
1664 if (wacom->num_contacts_left <= 0) { in wacom_24hdt_irq()
1665 wacom->num_contacts_left = 0; in wacom_24hdt_irq()
1677 int contacts_to_send = 0; in wacom_mt_touch()
1678 int x_offset = 0; in wacom_mt_touch()
1694 for (i = 0; i < contacts_to_send; i++) { in wacom_mt_touch()
1696 bool touch = (data[offset] & 0x1) && report_touch_events(wacom); in wacom_mt_touch()
1700 if (slot < 0) in wacom_mt_touch()
1715 if (wacom->num_contacts_left <= 0) { in wacom_mt_touch()
1716 wacom->num_contacts_left = 0; in wacom_mt_touch()
1728 for (i = 0; i < 2; i++) { in wacom_tpc_mt_touch()
1735 int x = le16_to_cpup((__le16 *)&data[i * 2 + 2]) & 0x7fff; in wacom_tpc_mt_touch()
1736 int y = le16_to_cpup((__le16 *)&data[i * 2 + 6]) & 0x7fff; in wacom_tpc_mt_touch()
1755 int x = 0, y = 0; in wacom_tpc_single_touch()
1758 return 0; in wacom_tpc_single_touch()
1761 prox = prox && (data[0] & 0x01); in wacom_tpc_single_touch()
1765 prox = prox && (data[2] & 0x01); in wacom_tpc_single_touch()
1769 prox = prox && (data[1] & 0x01); in wacom_tpc_single_touch()
1790 bool prox = data[1] & 0x20; in wacom_tpc_pen()
1794 wacom->tool[0] = (data[1] & 0x0c) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN; in wacom_tpc_pen()
1803 input_report_key(input, BTN_STYLUS, data[1] & 0x02); in wacom_tpc_pen()
1804 input_report_key(input, BTN_STYLUS2, data[1] & 0x10); in wacom_tpc_pen()
1807 input_report_abs(input, ABS_PRESSURE, ((data[7] & 0x07) << 8) | data[6]); in wacom_tpc_pen()
1808 input_report_key(input, BTN_TOUCH, data[1] & 0x05); in wacom_tpc_pen()
1809 input_report_key(input, wacom->tool[0], prox); in wacom_tpc_pen()
1813 return 0; in wacom_tpc_pen()
1822 "%s: received report #%d\n", __func__, data[0]); in wacom_tpc_irq()
1825 data[0] == WACOM_REPORT_PENABLED) in wacom_tpc_irq()
1830 "%s: received report #%d\n", __func__, data[0]); in wacom_tpc_irq()
1840 switch (data[0]) { in wacom_tpc_irq()
1855 return 0; in wacom_tpc_irq()
1875 int subpage = (usage & 0xFF00) << 8; in wacom_equivalent_usage()
1876 int subusage = (usage & 0xFF); in wacom_equivalent_usage()
1903 int subpage = (usage & 0xFF00) << 8; in wacom_equivalent_usage()
1904 int subusage = (usage & 0xFF); in wacom_equivalent_usage()
1948 input_set_abs_params(input, code, fmin, fmax, fuzz, 0); in wacom_map_usage()
1982 if (value == 0) { in wacom_wac_battery_event()
2044 wacom_map_usage(input, usage, field, EV_ABS, ABS_X, 0); in wacom_wac_pad_usage_mapping()
2049 wacom_map_usage(input, usage, field, EV_ABS, ABS_Y, 0); in wacom_wac_pad_usage_mapping()
2054 wacom_map_usage(input, usage, field, EV_ABS, ABS_Z, 0); in wacom_wac_pad_usage_mapping()
2065 0); in wacom_wac_pad_usage_mapping()
2087 wacom_map_usage(input, usage, field, EV_ABS, ABS_RX, 0); in wacom_wac_pad_usage_mapping()
2091 wacom_map_usage(input, usage, field, EV_ABS, ABS_RY, 0); in wacom_wac_pad_usage_mapping()
2095 wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0); in wacom_wac_pad_usage_mapping()
2109 wacom_map_usage(input, usage, field, EV_KEY, KEY_BUTTONCONFIG, 0); in wacom_wac_pad_usage_mapping()
2113 wacom_map_usage(input, usage, field, EV_KEY, KEY_ONSCREEN_KEYBOARD, 0); in wacom_wac_pad_usage_mapping()
2117 wacom_map_usage(input, usage, field, EV_KEY, KEY_CONTROLPANEL, 0); in wacom_wac_pad_usage_mapping()
2130 switch (equivalent_usage & 0xfffffff0) { in wacom_wac_pad_usage_mapping()
2134 0); in wacom_wac_pad_usage_mapping()
2197 if (hdev->vendor == 0x56a && in wacom_wac_pad_event()
2198 (hdev->product == 0x34d || hdev->product == 0x34e || /* MobileStudio Pro */ in wacom_wac_pad_event()
2199 hdev->product == 0x357 || hdev->product == 0x358 || /* Intuos Pro 2 */ in wacom_wac_pad_event()
2200 hdev->product == 0x392 || /* Intuos Pro 2 */ in wacom_wac_pad_event()
2201 hdev->product == 0x398 || hdev->product == 0x399 || /* MobileStudio Pro */ in wacom_wac_pad_event()
2202 hdev->product == 0x3AA)) { /* MobileStudio Pro */ in wacom_wac_pad_event()
2205 if (hdev->product == 0x357 || hdev->product == 0x358 || in wacom_wac_pad_event()
2206 hdev->product == 0x392) in wacom_wac_pad_event()
2208 else if (hdev->product == 0x34d || hdev->product == 0x34e || in wacom_wac_pad_event()
2209 hdev->product == 0x398 || hdev->product == 0x399 || in wacom_wac_pad_event()
2210 hdev->product == 0x3AA) in wacom_wac_pad_event()
2220 input_event(input, usage->type, usage->code, 0); in wacom_wac_pad_event()
2231 for (i = 0; i < wacom->led.count; i++) in wacom_wac_pad_event()
2253 wacom_wac->hid_data.inrange_state = 0; in wacom_wac_pad_pre_report()
2262 bool active = wacom_wac->hid_data.inrange_state != 0; in wacom_wac_pad_report()
2266 input_event(input, EV_ABS, ABS_MISC, active ? PAD_DEVICE_ID : 0); in wacom_wac_pad_report()
2306 wacom_map_usage(input, usage, field, EV_ABS, ABS_DISTANCE, 0); in wacom_wac_pen_usage_mapping()
2309 wacom_map_usage(input, usage, field, EV_ABS, ABS_PRESSURE, 0); in wacom_wac_pen_usage_mapping()
2312 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOOL_PEN, 0); in wacom_wac_pen_usage_mapping()
2316 BTN_TOOL_RUBBER, 0); in wacom_wac_pen_usage_mapping()
2319 wacom_map_usage(input, usage, field, EV_ABS, ABS_TILT_X, 0); in wacom_wac_pen_usage_mapping()
2322 wacom_map_usage(input, usage, field, EV_ABS, ABS_TILT_Y, 0); in wacom_wac_pen_usage_mapping()
2325 wacom_map_usage(input, usage, field, EV_ABS, ABS_Z, 0); in wacom_wac_pen_usage_mapping()
2329 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOUCH, 0); in wacom_wac_pen_usage_mapping()
2333 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOUCH, 0); in wacom_wac_pen_usage_mapping()
2338 wacom_map_usage(input, usage, field, EV_KEY, BTN_STYLUS, 0); in wacom_wac_pen_usage_mapping()
2343 wacom_map_usage(input, usage, field, EV_KEY, BTN_STYLUS2, 0); in wacom_wac_pen_usage_mapping()
2347 wacom_map_usage(input, usage, field, EV_MSC, MSC_SERIAL, 0); in wacom_wac_pen_usage_mapping()
2350 wacom_map_usage(input, usage, field, EV_MSC, MSC_TIMESTAMP, 0); in wacom_wac_pen_usage_mapping()
2354 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOOL_PEN, 0); in wacom_wac_pen_usage_mapping()
2359 wacom_map_usage(input, usage, field, EV_ABS, ABS_MISC, 0); in wacom_wac_pen_usage_mapping()
2363 wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0); in wacom_wac_pen_usage_mapping()
2367 wacom_map_usage(input, usage, field, EV_KEY, BTN_STYLUS3, 0); in wacom_wac_pen_usage_mapping()
2415 wacom_wac->serial[0] = (wacom_wac->serial[0] & ~0xFFFFFFFFULL); in wacom_wac_pen_event()
2416 wacom_wac->serial[0] |= wacom_s32tou(value, field->report_size); in wacom_wac_pen_event()
2421 if (!wacom_is_art_pen(wacom_wac->id[0])) return; in wacom_wac_pen_event()
2437 wacom_wac->serial[0] = (wacom_wac->serial[0] & 0xFFFFFFFF); in wacom_wac_pen_event()
2438 wacom_wac->serial[0] |= ((__u64)raw_value) << 32; in wacom_wac_pen_event()
2445 wacom_wac->id[0] |= raw_value & 0xFFFFF; in wacom_wac_pen_event()
2457 wacom_wac->id[0] |= wacom_s32tou(value, field->report_size); in wacom_wac_pen_event()
2510 input_event(input, usage->type, usage->code, 0); in wacom_wac_pen_event()
2531 bool entering_range = !wacom_wac->tool[0] && range; in wacom_wac_pen_report()
2539 wacom_wac->tool[0] = BTN_TOOL_RUBBER; in wacom_wac_pen_report()
2540 else if (wacom_wac->id[0]) in wacom_wac_pen_report()
2541 wacom_wac->tool[0] = wacom_intuos_get_tool_type(wacom_wac->id[0]); in wacom_wac_pen_report()
2543 wacom_wac->tool[0] = BTN_TOOL_PEN; in wacom_wac_pen_report()
2549 if (!delay_pen_events(wacom_wac) && wacom_wac->tool[0]) { in wacom_wac_pen_report()
2550 int id = wacom_wac->id[0]; in wacom_wac_pen_report()
2566 if (wacom_wac->serial[0] >> 52 == 1) in wacom_wac_pen_report()
2576 input_report_key(input, wacom_wac->tool[0], sense); in wacom_wac_pen_report()
2577 if (wacom_wac->serial[0]) { in wacom_wac_pen_report()
2580 * of '0'. Report the low 32 bits if possible, but in wacom_wac_pen_report()
2583 __u32 serial_lo = wacom_wac->serial[0] & 0xFFFFFFFFu; in wacom_wac_pen_report()
2584 __u32 serial_hi = wacom_wac->serial[0] >> 32; in wacom_wac_pen_report()
2586 input_report_abs(input, ABS_MISC, sense ? id : 0); in wacom_wac_pen_report()
2604 wacom_wac->tool[0] = 0; in wacom_wac_pen_report()
2605 wacom_wac->id[0] = 0; in wacom_wac_pen_report()
2606 wacom_wac->serial[0] = 0; in wacom_wac_pen_report()
2636 wacom_map_usage(input, usage, field, EV_ABS, ABS_MT_TOUCH_MAJOR, 0); in wacom_wac_finger_usage_mapping()
2637 wacom_map_usage(input, usage, field, EV_ABS, ABS_MT_TOUCH_MINOR, 0); in wacom_wac_finger_usage_mapping()
2638 input_set_abs_params(input, ABS_MT_ORIENTATION, 0, 1, 0, 0); in wacom_wac_finger_usage_mapping()
2641 wacom_map_usage(input, usage, field, EV_KEY, BTN_TOUCH, 0); in wacom_wac_finger_usage_mapping()
2659 wacom_map_usage(input, usage, field, EV_MSC, MSC_TIMESTAMP, 0); in wacom_wac_finger_usage_mapping()
2686 if (slot < 0) { in wacom_wac_finger_slot()
2692 if (!prox && mt_id < 0) { in wacom_wac_finger_slot()
2715 input_report_abs(input, ABS_MT_ORIENTATION, hid_data->width <= hid_data->height ? 0 : 1); in wacom_wac_finger_slot()
2790 hid_data->cc_report = 0; in wacom_wac_finger_pre_report()
2794 for (i = 0; i < report->maxfield; i++) { in wacom_wac_finger_pre_report()
2798 for (j = 0; j < field->maxusage; j++) { in wacom_wac_finger_pre_report()
2823 if (hid_data->cc_report != 0 && in wacom_wac_finger_pre_report()
2824 hid_data->cc_index >= 0) { in wacom_wac_finger_pre_report()
2829 hid_data->num_received = 0; in wacom_wac_finger_pre_report()
2834 hid_data->num_received = 0; in wacom_wac_finger_pre_report()
2847 if (wacom_wac->hid_data.num_expected == 0) in wacom_wac_finger_report()
2861 wacom_wac->hid_data.num_received = 0; in wacom_wac_finger_report()
2862 wacom_wac->hid_data.num_expected = 0; in wacom_wac_finger_report()
2927 for (n = 0 ; n < count; n++) { in wacom_report_events()
2956 return 0; in wacom_wac_collection()
2962 return 0; in wacom_wac_collection()
2978 for (r = 0; r < report->maxfield; r++) { in wacom_wac_report()
3000 for (r = 0; r < report->maxfield; r++) { in wacom_wac_report()
3003 if (field->usage[0].collection_index != prev_collection) { in wacom_wac_report()
3005 field->usage[0].collection_index, field, r) < 0) in wacom_wac_report()
3007 prev_collection = field->usage[0].collection_index; in wacom_wac_report()
3025 if (data[0] != 0x02) in wacom_bpt_touch()
3026 return 0; in wacom_bpt_touch()
3028 for (i = 0; i < 2; i++) { in wacom_bpt_touch()
3029 int offset = (data[1] & 0x80) ? (8 * i) : (9 * i); in wacom_bpt_touch()
3031 && (data[offset + 3] & 0x80); in wacom_bpt_touch()
3036 int x = get_unaligned_be16(&data[offset + 3]) & 0x7ff; in wacom_bpt_touch()
3037 int y = get_unaligned_be16(&data[offset + 5]) & 0x7ff; in wacom_bpt_touch()
3049 input_report_key(pad_input, BTN_LEFT, (data[1] & 0x08) != 0); in wacom_bpt_touch()
3050 input_report_key(pad_input, BTN_FORWARD, (data[1] & 0x04) != 0); in wacom_bpt_touch()
3051 input_report_key(pad_input, BTN_BACK, (data[1] & 0x02) != 0); in wacom_bpt_touch()
3052 input_report_key(pad_input, BTN_RIGHT, (data[1] & 0x01) != 0); in wacom_bpt_touch()
3062 bool touch = data[1] & 0x80; in wacom_bpt3_touch_msg()
3063 int slot = input_mt_get_slot_by_key(input, data[0]); in wacom_bpt3_touch_msg()
3065 if (slot < 0) in wacom_bpt3_touch_msg()
3075 int y = (data[3] << 4) | (data[4] & 0x0f); in wacom_bpt3_touch_msg()
3107 input_report_key(input, BTN_LEFT, (data[1] & 0x02) != 0); in wacom_bpt3_button_msg()
3108 input_report_key(input, BTN_BACK, (data[1] & 0x08) != 0); in wacom_bpt3_button_msg()
3110 input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0); in wacom_bpt3_button_msg()
3111 input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0); in wacom_bpt3_button_msg()
3113 input_report_key(input, BTN_FORWARD, (data[1] & 0x04) != 0); in wacom_bpt3_button_msg()
3114 input_report_key(input, BTN_RIGHT, (data[1] & 0x01) != 0); in wacom_bpt3_button_msg()
3120 int count = data[1] & 0x07; in wacom_bpt3_touch()
3121 int touch_changed = 0, i; in wacom_bpt3_touch()
3123 if (data[0] != 0x02) in wacom_bpt3_touch()
3124 return 0; in wacom_bpt3_touch()
3127 for (i = 0; i < count; i++) { in wacom_bpt3_touch()
3153 int x = 0, y = 0, p = 0, d = 0; in wacom_bpt_pen()
3157 if (data[0] != WACOM_REPORT_PENABLED) in wacom_bpt_pen()
3158 return 0; in wacom_bpt_pen()
3160 range = (data[1] & 0x80) == 0x80; in wacom_bpt_pen()
3161 prox = (data[1] & 0x40) == 0x40; in wacom_bpt_pen()
3162 rdy = (data[1] & 0x20) == 0x20; in wacom_bpt_pen()
3166 return 0; in wacom_bpt_pen()
3170 pen = data[1] & 0x01; in wacom_bpt_pen()
3171 btn1 = data[1] & 0x02; in wacom_bpt_pen()
3172 btn2 = data[1] & 0x04; in wacom_bpt_pen()
3178 if (data[1] & 0x08) { in wacom_bpt_pen()
3179 wacom->tool[0] = BTN_TOOL_RUBBER; in wacom_bpt_pen()
3180 wacom->id[0] = ERASER_DEVICE_ID; in wacom_bpt_pen()
3182 wacom->tool[0] = BTN_TOOL_PEN; in wacom_bpt_pen()
3183 wacom->id[0] = STYLUS_DEVICE_ID; in wacom_bpt_pen()
3197 wacom->id[0] = 0; in wacom_bpt_pen()
3212 input_report_key(input, wacom->tool[0], range); /* PEN or RUBBER */ in wacom_bpt_pen()
3213 input_report_abs(input, ABS_MISC, wacom->id[0]); /* TOOL ID */ in wacom_bpt_pen()
3237 return 0; in wacom_bpt_irq()
3252 prefix = data[0]; in wacom_bamboo_pad_pen_event()
3253 data[0] = WACOM_REPORT_BPAD_PEN; in wacom_bamboo_pad_pen_event()
3263 data[0] = prefix; in wacom_bamboo_pad_pen_event()
3275 prefix = data[0]; in wacom_bamboo_pad_touch_event()
3277 for (id = 0; id < wacom->features.touch_max; id++) { in wacom_bamboo_pad_touch_event()
3288 x = finger_data[0] | ((finger_data[1] & 0x0f) << 8); in wacom_bamboo_pad_touch_event()
3297 input_report_key(input, BTN_LEFT, prefix & 0x40); in wacom_bamboo_pad_touch_event()
3298 input_report_key(input, BTN_RIGHT, prefix & 0x80); in wacom_bamboo_pad_touch_event()
3312 (data[0] != WACOM_REPORT_BPAD_TOUCH)) in wacom_bamboo_pad_irq()
3313 return 0; in wacom_bamboo_pad_irq()
3315 if (data[1] & 0x01) in wacom_bamboo_pad_irq()
3318 if (data[1] & 0x02) in wacom_bamboo_pad_irq()
3321 return 0; in wacom_bamboo_pad_irq()
3329 if (len != WACOM_PKGLEN_WIRELESS || data[0] != WACOM_REPORT_WL) in wacom_wireless_irq()
3330 return 0; in wacom_wireless_irq()
3332 connected = data[1] & 0x01; in wacom_wireless_irq()
3341 SW_MUTE_DEVICE, data[5] & 0x40); in wacom_wireless_irq()
3346 battery = (data[5] & 0x3f) * 100 / 31; in wacom_wireless_irq()
3347 charging = !!(data[5] & 0x80); in wacom_wireless_irq()
3354 battery, charging, 1, 0); in wacom_wireless_irq()
3356 } else if (wacom->pid != 0) { in wacom_wireless_irq()
3358 wacom->pid = 0; in wacom_wireless_irq()
3360 wacom_notify_battery(wacom, POWER_SUPPLY_STATUS_UNKNOWN, 0, 0, 0, 0); in wacom_wireless_irq()
3363 return 0; in wacom_wireless_irq()
3372 if (data[0] != WACOM_REPORT_USB) in wacom_status_irq()
3373 return 0; in wacom_status_irq()
3380 SW_MUTE_DEVICE, data[8] & 0x40); in wacom_status_irq()
3384 if (data[9] & 0x02) { /* wireless module is attached */ in wacom_status_irq()
3385 int battery = (data[8] & 0x3f) * 100 / 31; in wacom_status_irq()
3386 bool charging = !!(data[8] & 0x80); in wacom_status_irq()
3395 wacom_notify_battery(wacom_wac, POWER_SUPPLY_STATUS_UNKNOWN, 0, 0, 0, 0); in wacom_status_irq()
3397 return 0; in wacom_status_irq()
3470 else if (wacom_wac->data[0] == WACOM_REPORT_USB) in wacom_wac_irq()
3496 if (wacom_wac->data[0] == WACOM_REPORT_USB) in wacom_wac_irq()
3512 if (wacom_wac->data[0] == WACOM_REPORT_DEVICE_LIST) in wacom_wac_irq()
3544 0, wacom_wac->features.distance_max, wacom_wac->features.distance_fuzz, 0); in wacom_setup_basic_pro_pen()
3559 input_set_abs_params(input_dev, ABS_WHEEL, 0, 1023, 0, 0); in wacom_setup_cintiq()
3560 input_set_abs_params(input_dev, ABS_TILT_X, -64, 63, features->tilt_fuzz, 0); in wacom_setup_cintiq()
3562 input_set_abs_params(input_dev, ABS_TILT_Y, -64, 63, features->tilt_fuzz, 0); in wacom_setup_cintiq()
3582 input_set_abs_params(input_dev, ABS_RZ, -900, 899, 0, 0); in wacom_setup_intuos()
3584 input_set_abs_params(input_dev, ABS_THROTTLE, -1023, 1023, 0, 0); in wacom_setup_intuos()
3647 * 0, whose HID descriptor has an application usage of 0xFF0D in wacom_setup_device_quirks()
3724 if (wacom->hdev->product == 0x382 || wacom->hdev->product == 0x37d) { in wacom_setup_device_quirks()
3755 return 0; in wacom_setup_pen_input_capabilities()
3757 input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in wacom_setup_pen_input_capabilities()
3761 input_set_abs_params(input_dev, ABS_X, 0 + features->offset_left, in wacom_setup_pen_input_capabilities()
3763 features->x_fuzz, 0); in wacom_setup_pen_input_capabilities()
3764 input_set_abs_params(input_dev, ABS_Y, 0 + features->offset_top, in wacom_setup_pen_input_capabilities()
3766 features->y_fuzz, 0); in wacom_setup_pen_input_capabilities()
3767 input_set_abs_params(input_dev, ABS_PRESSURE, 0, in wacom_setup_pen_input_capabilities()
3768 features->pressure_max, features->pressure_fuzz, 0); in wacom_setup_pen_input_capabilities()
3781 input_set_abs_params(input_dev, ABS_DISTANCE, 0, in wacom_setup_pen_input_capabilities()
3783 features->distance_fuzz, 0); in wacom_setup_pen_input_capabilities()
3810 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); in wacom_setup_pen_input_capabilities()
3822 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); in wacom_setup_pen_input_capabilities()
3838 input_set_abs_params(input_dev, ABS_DISTANCE, 0, in wacom_setup_pen_input_capabilities()
3840 features->distance_fuzz, 0); in wacom_setup_pen_input_capabilities()
3842 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); in wacom_setup_pen_input_capabilities()
3893 input_set_abs_params(input_dev, ABS_DISTANCE, 0, in wacom_setup_pen_input_capabilities()
3895 features->distance_fuzz, 0); in wacom_setup_pen_input_capabilities()
3902 return 0; in wacom_setup_pen_input_capabilities()
3920 return 0; in wacom_setup_touch_input_capabilities()
3922 input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in wacom_setup_touch_input_capabilities()
3926 input_set_abs_params(input_dev, ABS_X, 0, in wacom_setup_touch_input_capabilities()
3927 features->x_max, features->x_fuzz, 0); in wacom_setup_touch_input_capabilities()
3928 input_set_abs_params(input_dev, ABS_Y, 0, in wacom_setup_touch_input_capabilities()
3929 features->y_max, features->y_fuzz, 0); in wacom_setup_touch_input_capabilities()
3936 input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, in wacom_setup_touch_input_capabilities()
3937 features->x_max, features->x_fuzz, 0); in wacom_setup_touch_input_capabilities()
3938 input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, in wacom_setup_touch_input_capabilities()
3939 features->y_max, features->y_fuzz, 0); in wacom_setup_touch_input_capabilities()
3949 input_dev->evbit[0] |= BIT_MASK(EV_SW); in wacom_setup_touch_input_capabilities()
3952 if (wacom_wac->shared->touch->product == 0x361) { in wacom_setup_touch_input_capabilities()
3954 0, 12440, 4, 0); in wacom_setup_touch_input_capabilities()
3956 0, 8640, 4, 0); in wacom_setup_touch_input_capabilities()
3958 else if (wacom_wac->shared->touch->product == 0x360) { in wacom_setup_touch_input_capabilities()
3960 0, 8960, 4, 0); in wacom_setup_touch_input_capabilities()
3962 0, 5920, 4, 0); in wacom_setup_touch_input_capabilities()
3964 else if (wacom_wac->shared->touch->product == 0x393) { in wacom_setup_touch_input_capabilities()
3966 0, 6400, 4, 0); in wacom_setup_touch_input_capabilities()
3968 0, 4000, 4, 0); in wacom_setup_touch_input_capabilities()
3981 input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
3982 input_set_abs_params(input_dev, ABS_MT_TOUCH_MINOR, 0, features->y_max, 0, 0); in wacom_setup_touch_input_capabilities()
3987 input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
3988 input_set_abs_params(input_dev, ABS_MT_WIDTH_MAJOR, 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
3989 input_set_abs_params(input_dev, ABS_MT_WIDTH_MINOR, 0, features->y_max, 0, 0); in wacom_setup_touch_input_capabilities()
3990 input_set_abs_params(input_dev, ABS_MT_ORIENTATION, 0, 1, 0, 0); in wacom_setup_touch_input_capabilities()
3994 if (wacom_wac->shared->touch->product == 0x32C || in wacom_setup_touch_input_capabilities()
3995 wacom_wac->shared->touch->product == 0xF6) { in wacom_setup_touch_input_capabilities()
3996 input_dev->evbit[0] |= BIT_MASK(EV_SW); in wacom_setup_touch_input_capabilities()
4016 input_dev->evbit[0] |= BIT_MASK(EV_SW); in wacom_setup_touch_input_capabilities()
4025 0, features->x_max, 0, 0); in wacom_setup_touch_input_capabilities()
4028 0, features->y_max, 0, 0); in wacom_setup_touch_input_capabilities()
4040 return 0; in wacom_setup_touch_input_capabilities()
4052 return 0; in wacom_numbered_button_to_key()
4060 for (i = 0; i < button_count; i++) { in wacom_setup_numbered_buttons()
4075 * 24HD has LED group 1 to the left and LED group 0 to the right. in wacom_24hd_update_leds()
4076 * So group 0 matches the second half of the buttons and thus the mask in wacom_24hd_update_leds()
4079 if (group == 0) in wacom_24hd_update_leds()
4082 for (i = 0; i < 3; i++) { in wacom_24hd_update_leds()
4104 * 21UX2 has LED group 1 to the left and LED group 0 in wacom_is_led_toggled()
4167 for (i = 0; i < wacom->led.count; i++) in wacom_report_numbered_buttons()
4170 for (i = 0; i < button_count; i++) { in wacom_report_numbered_buttons()
4183 if ((features->type == HID_GENERIC) && features->numbered_buttons > 0) in wacom_setup_pad_input_capabilities()
4192 input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in wacom_setup_pad_input_capabilities()
4200 input_set_abs_params(input_dev, ABS_X, 0, 1, 0, 0); in wacom_setup_pad_input_capabilities()
4203 input_set_abs_params(input_dev, ABS_Y, 0, 1, 0, 0); in wacom_setup_pad_input_capabilities()
4224 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4244 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4245 input_set_abs_params(input_dev, ABS_THROTTLE, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4258 input_set_abs_params(input_dev, ABS_X, -2048, 2048, 0, 0); in wacom_setup_pad_input_capabilities()
4260 input_set_abs_params(input_dev, ABS_Y, -2048, 2048, 0, 0); in wacom_setup_pad_input_capabilities()
4262 input_set_abs_params(input_dev, ABS_Z, -2048, 2048, 0, 0); in wacom_setup_pad_input_capabilities()
4279 input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4280 input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4284 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4289 input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4293 input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); in wacom_setup_pad_input_capabilities()
4304 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_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4337 input_set_abs_params(input_dev, ABS_WHEEL, 0, 71, 0, 0); in wacom_setup_pad_input_capabilities()
4348 return 0; in wacom_setup_pad_input_capabilities()
4352 { "Wacom Penpartner", 5040, 3780, 255, 0,
4430 { "Wacom PL400", 5408, 4056, 255, 0,
4433 { "Wacom PL500", 6144, 4608, 255, 0,
4436 { "Wacom PL600", 6126, 4604, 255, 0,
4439 { "Wacom PL600SX", 6260, 5016, 255, 0,
4442 { "Wacom PL550", 6144, 4608, 511, 0,
4445 { "Wacom PL800", 7220, 5780, 511, 0,
4448 { "Wacom PL700", 6758, 5406, 511, 0,
4451 { "Wacom PL510", 6282, 4762, 511, 0,
4454 { "Wacom DTU710", 34080, 27660, 511, 0,
4457 { "Wacom DTF521", 6282, 4762, 511, 0,
4460 { "Wacom DTF720", 6858, 5506, 511, 0,
4463 { "Wacom DTF720a", 6858, 5506, 511, 0,
4466 { "Wacom Cintiq Partner", 20480, 15360, 511, 0,
4559 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf6 };
4562 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0xf8, .touch_max = 10,
4566 WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 0,
4571 WACOM_27QHD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 0,
4574 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x32C };
4577 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x32B, .touch_max = 10 };
4597 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x335 };
4600 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x333, .touch_max = 10,
4603 { "Wacom DTU1931", 37832, 30305, 511, 0,
4606 { "Wacom DTU2231", 47864, 27011, 511, 0,
4610 { "Wacom DTU1631", 34623, 19553, 511, 0,
4613 { "Wacom DTU1031", 22096, 13960, 511, 0,
4618 { "Wacom DTU1031X", 22672, 12928, 511, 0,
4619 DTUSX, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 0,
4623 { "Wacom DTU1141", 23672, 13403, 1023, 0,
4637 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5D };
4640 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x59, .touch_max = 10,
4657 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5e };
4660 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5b, .touch_max = 10,
4663 { "Wacom ISDv4 90", 26202, 16325, 255, 0,
4666 { "Wacom ISDv4 93", 26202, 16325, 255, 0,
4669 { "Wacom ISDv4 97", 26202, 16325, 511, 0,
4672 { "Wacom ISDv4 9A", 26202, 16325, 255, 0,
4675 { "Wacom ISDv4 9F", 26202, 16325, 255, 0,
4678 { "Wacom ISDv4 E2", 26202, 16325, 255, 0,
4681 { "Wacom ISDv4 E3", 26202, 16325, 255, 0,
4684 { "Wacom ISDv4 E5", 26202, 16325, 255, 0,
4687 { "Wacom ISDv4 E6", 27760, 15694, 255, 0,
4690 { "Wacom ISDv4 EC", 25710, 14500, 255, 0,
4693 { "Wacom ISDv4 ED", 26202, 16325, 255, 0,
4696 { "Wacom ISDv4 EF", 26202, 16325, 255, 0,
4699 { "Wacom ISDv4 100", 26202, 16325, 255, 0,
4702 { "Wacom ISDv4 101", 26202, 16325, 255, 0,
4705 { "Wacom ISDv4 10D", 26202, 16325, 255, 0,
4708 { "Wacom ISDv4 10E", 27760, 15694, 255, 0,
4711 { "Wacom ISDv4 10F", 27760, 15694, 255, 0,
4714 { "Wacom ISDv4 116", 26202, 16325, 255, 0,
4717 { "Wacom ISDv4 12C", 27848, 15752, 2047, 0,
4720 { "Wacom ISDv4 4001", 26202, 16325, 255, 0,
4723 { "Wacom ISDv4 4004", 11060, 6220, 255, 0,
4726 { "Wacom ISDv4 5000", 27848, 15752, 1023, 0,
4729 { "Wacom ISDv4 5002", 29576, 16724, 1023, 0,
4797 { "ISD-V4", 12800, 8000, 255, 0,
4804 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x309 };
4807 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x0307, .touch_max = 10,
4814 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x30C };
4817 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x30A, .touch_max = 10,
4830 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x326 };
4833 .oPid = 0x325 };
4859 { "Wacom DTK1651", 34816, 19759, 1023, 0,
4919 { USB_DEVICE_WACOM(0x00) },
4920 { USB_DEVICE_WACOM(0x03) },
4921 { USB_DEVICE_WACOM(0x10) },
4922 { USB_DEVICE_WACOM(0x11) },
4923 { USB_DEVICE_WACOM(0x12) },
4924 { USB_DEVICE_WACOM(0x13) },
4925 { USB_DEVICE_WACOM(0x14) },
4926 { USB_DEVICE_WACOM(0x15) },
4927 { USB_DEVICE_WACOM(0x16) },
4928 { USB_DEVICE_WACOM(0x17) },
4929 { USB_DEVICE_WACOM(0x18) },
4930 { USB_DEVICE_WACOM(0x19) },
4931 { USB_DEVICE_WACOM(0x20) },
4932 { USB_DEVICE_WACOM(0x21) },
4933 { USB_DEVICE_WACOM(0x22) },
4934 { USB_DEVICE_WACOM(0x23) },
4935 { USB_DEVICE_WACOM(0x24) },
4936 { USB_DEVICE_WACOM(0x26) },
4937 { USB_DEVICE_WACOM(0x27) },
4938 { USB_DEVICE_WACOM(0x28) },
4939 { USB_DEVICE_WACOM(0x29) },
4940 { USB_DEVICE_WACOM(0x2A) },
4941 { USB_DEVICE_WACOM(0x30) },
4942 { USB_DEVICE_WACOM(0x31) },
4943 { USB_DEVICE_WACOM(0x32) },
4944 { USB_DEVICE_WACOM(0x33) },
4945 { USB_DEVICE_WACOM(0x34) },
4946 { USB_DEVICE_WACOM(0x35) },
4947 { USB_DEVICE_WACOM(0x37) },
4948 { USB_DEVICE_WACOM(0x38) },
4949 { USB_DEVICE_WACOM(0x39) },
4950 { USB_DEVICE_WACOM(0x3F) },
4951 { USB_DEVICE_WACOM(0x41) },
4952 { USB_DEVICE_WACOM(0x42) },
4953 { USB_DEVICE_WACOM(0x43) },
4954 { USB_DEVICE_WACOM(0x44) },
4955 { USB_DEVICE_WACOM(0x45) },
4956 { USB_DEVICE_WACOM(0x47) },
4957 { USB_DEVICE_WACOM(0x57) },
4958 { USB_DEVICE_WACOM(0x59) },
4959 { USB_DEVICE_WACOM(0x5B) },
4960 { USB_DEVICE_WACOM(0x5D) },
4961 { USB_DEVICE_WACOM(0x5E) },
4962 { USB_DEVICE_WACOM(0x60) },
4963 { USB_DEVICE_WACOM(0x61) },
4964 { USB_DEVICE_WACOM(0x62) },
4965 { USB_DEVICE_WACOM(0x63) },
4966 { USB_DEVICE_WACOM(0x64) },
4967 { USB_DEVICE_WACOM(0x65) },
4968 { USB_DEVICE_WACOM(0x69) },
4969 { USB_DEVICE_WACOM(0x6A) },
4970 { USB_DEVICE_WACOM(0x6B) },
4971 { BT_DEVICE_WACOM(0x81) },
4972 { USB_DEVICE_WACOM(0x84) },
4973 { USB_DEVICE_WACOM(0x90) },
4974 { USB_DEVICE_WACOM(0x93) },
4975 { USB_DEVICE_WACOM(0x94) },
4976 { USB_DEVICE_WACOM(0x97) },
4977 { USB_DEVICE_WACOM(0x9A) },
4978 { USB_DEVICE_WACOM(0x9F) },
4979 { USB_DEVICE_WACOM(0xB0) },
4980 { USB_DEVICE_WACOM(0xB1) },
4981 { USB_DEVICE_WACOM(0xB2) },
4982 { USB_DEVICE_WACOM(0xB3) },
4983 { USB_DEVICE_WACOM(0xB4) },
4984 { USB_DEVICE_WACOM(0xB5) },
4985 { USB_DEVICE_WACOM(0xB7) },
4986 { USB_DEVICE_WACOM(0xB8) },
4987 { USB_DEVICE_WACOM(0xB9) },
4988 { USB_DEVICE_WACOM(0xBA) },
4989 { USB_DEVICE_WACOM(0xBB) },
4990 { USB_DEVICE_WACOM(0xBC) },
4991 { BT_DEVICE_WACOM(0xBD) },
4992 { USB_DEVICE_WACOM(0xC0) },
4993 { USB_DEVICE_WACOM(0xC2) },
4994 { USB_DEVICE_WACOM(0xC4) },
4995 { USB_DEVICE_WACOM(0xC5) },
4996 { USB_DEVICE_WACOM(0xC6) },
4997 { USB_DEVICE_WACOM(0xC7) },
4998 { USB_DEVICE_WACOM(0xCC) },
4999 { USB_DEVICE_WACOM(0xCE) },
5000 { USB_DEVICE_WACOM(0xD0) },
5001 { USB_DEVICE_WACOM(0xD1) },
5002 { USB_DEVICE_WACOM(0xD2) },
5003 { USB_DEVICE_WACOM(0xD3) },
5004 { USB_DEVICE_WACOM(0xD4) },
5005 { USB_DEVICE_WACOM(0xD5) },
5006 { USB_DEVICE_WACOM(0xD6) },
5007 { USB_DEVICE_WACOM(0xD7) },
5008 { USB_DEVICE_WACOM(0xD8) },
5009 { USB_DEVICE_WACOM(0xDA) },
5010 { USB_DEVICE_WACOM(0xDB) },
5011 { USB_DEVICE_WACOM(0xDD) },
5012 { USB_DEVICE_WACOM(0xDE) },
5013 { USB_DEVICE_WACOM(0xDF) },
5014 { USB_DEVICE_WACOM(0xE2) },
5015 { USB_DEVICE_WACOM(0xE3) },
5016 { USB_DEVICE_WACOM(0xE5) },
5017 { USB_DEVICE_WACOM(0xE6) },
5018 { USB_DEVICE_WACOM(0xEC) },
5019 { USB_DEVICE_WACOM(0xED) },
5020 { USB_DEVICE_WACOM(0xEF) },
5021 { USB_DEVICE_WACOM(0xF0) },
5022 { USB_DEVICE_WACOM(0xF4) },
5023 { USB_DEVICE_WACOM(0xF6) },
5024 { USB_DEVICE_WACOM(0xF8) },
5025 { USB_DEVICE_WACOM(0xFA) },
5026 { USB_DEVICE_WACOM(0xFB) },
5027 { USB_DEVICE_WACOM(0x100) },
5028 { USB_DEVICE_WACOM(0x101) },
5029 { USB_DEVICE_WACOM(0x10D) },
5030 { USB_DEVICE_WACOM(0x10E) },
5031 { USB_DEVICE_WACOM(0x10F) },
5032 { USB_DEVICE_WACOM(0x116) },
5033 { USB_DEVICE_WACOM(0x12C) },
5034 { USB_DEVICE_WACOM(0x300) },
5035 { USB_DEVICE_WACOM(0x301) },
5036 { USB_DEVICE_WACOM(0x302) },
5037 { USB_DEVICE_WACOM(0x303) },
5038 { USB_DEVICE_WACOM(0x304) },
5039 { USB_DEVICE_WACOM(0x307) },
5040 { USB_DEVICE_WACOM(0x309) },
5041 { USB_DEVICE_WACOM(0x30A) },
5042 { USB_DEVICE_WACOM(0x30C) },
5043 { USB_DEVICE_WACOM(0x30E) },
5044 { USB_DEVICE_WACOM(0x314) },
5045 { USB_DEVICE_WACOM(0x315) },
5046 { USB_DEVICE_WACOM(0x317) },
5047 { USB_DEVICE_WACOM(0x318) },
5048 { USB_DEVICE_WACOM(0x319) },
5049 { USB_DEVICE_WACOM(0x323) },
5050 { USB_DEVICE_WACOM(0x325) },
5051 { USB_DEVICE_WACOM(0x326) },
5052 { USB_DEVICE_WACOM(0x32A) },
5053 { USB_DEVICE_WACOM(0x32B) },
5054 { USB_DEVICE_WACOM(0x32C) },
5055 { USB_DEVICE_WACOM(0x32F) },
5056 { USB_DEVICE_WACOM(0x331) },
5057 { USB_DEVICE_WACOM(0x333) },
5058 { USB_DEVICE_WACOM(0x335) },
5059 { USB_DEVICE_WACOM(0x336) },
5060 { USB_DEVICE_WACOM(0x33B) },
5061 { USB_DEVICE_WACOM(0x33C) },
5062 { USB_DEVICE_WACOM(0x33D) },
5063 { USB_DEVICE_WACOM(0x33E) },
5064 { USB_DEVICE_WACOM(0x343) },
5065 { BT_DEVICE_WACOM(0x360) },
5066 { BT_DEVICE_WACOM(0x361) },
5067 { BT_DEVICE_WACOM(0x377) },
5068 { BT_DEVICE_WACOM(0x379) },
5069 { USB_DEVICE_WACOM(0x37A) },
5070 { USB_DEVICE_WACOM(0x37B) },
5071 { BT_DEVICE_WACOM(0x393) },
5072 { BT_DEVICE_WACOM(0x3c6) },
5073 { BT_DEVICE_WACOM(0x3c8) },
5074 { BT_DEVICE_WACOM(0x3dd) },
5075 { USB_DEVICE_WACOM(0x4001) },
5076 { USB_DEVICE_WACOM(0x4004) },
5077 { USB_DEVICE_WACOM(0x5000) },
5078 { USB_DEVICE_WACOM(0x5002) },
5079 { USB_DEVICE_LENOVO(0x6004) },