2 * drivers/usb/input/wacom_wac.c
4 * USB Wacom Graphire and Wacom Intuos tablet support - Wacom specific code
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
15 #include "wacom_wac.h"
17 static int wacom_penpartner_irq(struct wacom_wac *wacom, void *wcombo)
19 unsigned char *data = wacom->data;
24 wacom->tool[0] = (data[5] & 0x20) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN;
25 wacom->id[0] = (data[5] & 0x20) ? ERASER_DEVICE_ID : STYLUS_DEVICE_ID;
26 wacom_report_key(wcombo, wacom->tool[0], 1);
27 wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]); /* report tool id */
28 wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1]));
29 wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[3]));
30 wacom_report_abs(wcombo, ABS_PRESSURE, (signed char)data[6] + 127);
31 wacom_report_key(wcombo, BTN_TOUCH, ((signed char)data[6] > -127));
32 wacom_report_key(wcombo, BTN_STYLUS, (data[5] & 0x40));
34 wacom_report_key(wcombo, wacom->tool[0], 0);
35 wacom_report_abs(wcombo, ABS_MISC, 0); /* report tool id */
36 wacom_report_abs(wcombo, ABS_PRESSURE, -1);
37 wacom_report_key(wcombo, BTN_TOUCH, 0);
41 wacom_report_key(wcombo, BTN_TOOL_PEN, 1);
42 wacom_report_abs(wcombo, ABS_MISC, STYLUS_DEVICE_ID); /* report tool id */
43 wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1]));
44 wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[3]));
45 wacom_report_abs(wcombo, ABS_PRESSURE, (signed char)data[6] + 127);
46 wacom_report_key(wcombo, BTN_TOUCH, ((signed char)data[6] > -80) && !(data[5] & 0x20));
47 wacom_report_key(wcombo, BTN_STYLUS, (data[5] & 0x40));
50 printk(KERN_INFO "wacom_penpartner_irq: received unknown report #%d\n", data[0]);
56 static int wacom_pl_irq(struct wacom_wac *wacom, void *wcombo)
58 unsigned char *data = wacom->data;
59 int prox, id, pressure;
62 dbg("wacom_pl_irq: received unknown report #%d", data[0]);
66 prox = data[1] & 0x40;
68 id = ERASER_DEVICE_ID;
71 pressure = (signed char)((data[7] << 1) | ((data[4] >> 2) & 1));
72 if (wacom->features->pressure_max > 255)
73 pressure = (pressure << 1) | ((data[4] >> 6) & 1);
74 pressure += (wacom->features->pressure_max + 1) / 2;
77 * if going from out of proximity into proximity select between the eraser
78 * and the pen based on the state of the stylus2 button, choose eraser if
79 * pressed else choose pen. if not a proximity change from out to in, send
80 * an out of proximity for previous tool then a in for new tool.
82 if (!wacom->tool[0]) {
83 /* Eraser bit set for DTF */
85 wacom->tool[1] = BTN_TOOL_RUBBER;
87 /* Going into proximity select tool */
88 wacom->tool[1] = (data[4] & 0x20) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN;
90 /* was entered with stylus2 pressed */
91 if (wacom->tool[1] == BTN_TOOL_RUBBER && !(data[4] & 0x20)) {
92 /* report out proximity for previous tool */
93 wacom_report_key(wcombo, wacom->tool[1], 0);
94 wacom_input_sync(wcombo);
95 wacom->tool[1] = BTN_TOOL_PEN;
99 if (wacom->tool[1] != BTN_TOOL_RUBBER) {
100 /* Unknown tool selected default to pen tool */
101 wacom->tool[1] = BTN_TOOL_PEN;
102 id = STYLUS_DEVICE_ID;
104 wacom_report_key(wcombo, wacom->tool[1], prox); /* report in proximity for tool */
105 wacom_report_abs(wcombo, ABS_MISC, id); /* report tool id */
106 wacom_report_abs(wcombo, ABS_X, data[3] | (data[2] << 7) | ((data[1] & 0x03) << 14));
107 wacom_report_abs(wcombo, ABS_Y, data[6] | (data[5] << 7) | ((data[4] & 0x03) << 14));
108 wacom_report_abs(wcombo, ABS_PRESSURE, pressure);
110 wacom_report_key(wcombo, BTN_TOUCH, data[4] & 0x08);
111 wacom_report_key(wcombo, BTN_STYLUS, data[4] & 0x10);
112 /* Only allow the stylus2 button to be reported for the pen tool. */
113 wacom_report_key(wcombo, BTN_STYLUS2, (wacom->tool[1] == BTN_TOOL_PEN) && (data[4] & 0x20));
115 /* report proximity-out of a (valid) tool */
116 if (wacom->tool[1] != BTN_TOOL_RUBBER) {
117 /* Unknown tool selected default to pen tool */
118 wacom->tool[1] = BTN_TOOL_PEN;
120 wacom_report_key(wcombo, wacom->tool[1], prox);
123 wacom->tool[0] = prox; /* Save proximity state */
127 static int wacom_ptu_irq(struct wacom_wac *wacom, void *wcombo)
129 unsigned char *data = wacom->data;
133 printk(KERN_INFO "wacom_ptu_irq: received unknown report #%d\n", data[0]);
137 if (data[1] & 0x04) {
138 wacom_report_key(wcombo, BTN_TOOL_RUBBER, data[1] & 0x20);
139 wacom_report_key(wcombo, BTN_TOUCH, data[1] & 0x08);
140 id = ERASER_DEVICE_ID;
142 wacom_report_key(wcombo, BTN_TOOL_PEN, data[1] & 0x20);
143 wacom_report_key(wcombo, BTN_TOUCH, data[1] & 0x01);
144 id = STYLUS_DEVICE_ID;
146 wacom_report_abs(wcombo, ABS_MISC, id); /* report tool id */
147 wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[2]));
148 wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[4]));
149 wacom_report_abs(wcombo, ABS_PRESSURE, wacom_le16_to_cpu(&data[6]));
150 wacom_report_key(wcombo, BTN_STYLUS, data[1] & 0x02);
151 wacom_report_key(wcombo, BTN_STYLUS2, data[1] & 0x10);
155 static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo)
157 unsigned char *data = wacom->data;
161 dbg("wacom_graphire_irq: received unknown report #%d", data[0]);
165 id = STYLUS_DEVICE_ID;
166 if (data[1] & 0x10) { /* in prox */
168 switch ((data[1] >> 5) & 3) {
171 wacom->tool[0] = BTN_TOOL_PEN;
175 wacom->tool[0] = BTN_TOOL_RUBBER;
176 id = ERASER_DEVICE_ID;
179 case 2: /* Mouse with wheel */
180 wacom_report_key(wcombo, BTN_MIDDLE, data[1] & 0x04);
181 if (wacom->features->type == WACOM_G4) {
182 rw = data[7] & 0x04 ? (data[7] & 0x03)-4 : (data[7] & 0x03);
183 wacom_report_rel(wcombo, REL_WHEEL, -rw);
185 wacom_report_rel(wcombo, REL_WHEEL, -(signed char) data[6]);
188 case 3: /* Mouse without wheel */
189 wacom->tool[0] = BTN_TOOL_MOUSE;
190 id = CURSOR_DEVICE_ID;
191 wacom_report_key(wcombo, BTN_LEFT, data[1] & 0x01);
192 wacom_report_key(wcombo, BTN_RIGHT, data[1] & 0x02);
193 if (wacom->features->type == WACOM_G4)
194 wacom_report_abs(wcombo, ABS_DISTANCE, data[6] & 0x3f);
196 wacom_report_abs(wcombo, ABS_DISTANCE, data[7] & 0x3f);
201 if (data[1] & 0x90) {
202 x = wacom_le16_to_cpu(&data[2]);
203 y = wacom_le16_to_cpu(&data[4]);
204 wacom_report_abs(wcombo, ABS_X, x);
205 wacom_report_abs(wcombo, ABS_Y, y);
206 if (wacom->tool[0] != BTN_TOOL_MOUSE) {
207 wacom_report_abs(wcombo, ABS_PRESSURE, data[6] | ((data[7] & 0x01) << 8));
208 wacom_report_key(wcombo, BTN_TOUCH, data[1] & 0x01);
209 wacom_report_key(wcombo, BTN_STYLUS, data[1] & 0x02);
210 wacom_report_key(wcombo, BTN_STYLUS2, data[1] & 0x04);
215 wacom_report_abs(wcombo, ABS_MISC, id); /* report tool id */
217 wacom_report_abs(wcombo, ABS_MISC, 0); /* reset tool id */
218 wacom_report_key(wcombo, wacom->tool[0], data[1] & 0x10);
219 wacom_input_sync(wcombo);
222 if (wacom->features->type == WACOM_G4) {
223 if ( (wacom->serial[1] & 0xc0) != (data[7] & 0xf8) ) {
225 wacom->serial[1] = (data[7] & 0xf8);
226 wacom_report_key(wcombo, BTN_0, (data[7] & 0x40));
227 wacom_report_key(wcombo, BTN_4, (data[7] & 0x80));
228 rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3);
229 wacom_report_rel(wcombo, REL_WHEEL, rw);
230 wacom_report_key(wcombo, BTN_TOOL_FINGER, 0xf0);
231 wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, 0xf0);
232 } else if (wacom->id[1]) {
234 wacom_report_key(wcombo, BTN_TOOL_FINGER, 0);
235 wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, 0xf0);
241 static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo)
243 unsigned char *data = wacom->data;
247 idx = data[1] & 0x01;
250 if ((data[1] & 0xfc) == 0xc0) {
251 /* serial number of the tool */
252 wacom->serial[idx] = ((data[3] & 0x0f) << 28) +
253 (data[4] << 20) + (data[5] << 12) +
254 (data[6] << 4) + (data[7] >> 4);
256 wacom->id[idx] = (data[2] << 4) | (data[3] >> 4);
257 switch (wacom->id[idx]) {
258 case 0x812: /* Inking pen */
259 case 0x801: /* Intuos3 Inking pen */
261 wacom->tool[idx] = BTN_TOOL_PENCIL;
263 case 0x822: /* Pen */
266 case 0x823: /* Intuos3 Grip Pen */
267 case 0x813: /* Intuos3 Classic Pen */
268 case 0x885: /* Intuos3 Marker Pen */
270 wacom->tool[idx] = BTN_TOOL_PEN;
272 case 0x832: /* Stroke pen */
274 wacom->tool[idx] = BTN_TOOL_BRUSH;
276 case 0x007: /* Mouse 4D and 2D */
279 case 0x017: /* Intuos3 2D Mouse */
280 wacom->tool[idx] = BTN_TOOL_MOUSE;
282 case 0x096: /* Lens cursor */
283 case 0x097: /* Intuos3 Lens cursor */
284 wacom->tool[idx] = BTN_TOOL_LENS;
286 case 0x82a: /* Eraser */
291 case 0x82b: /* Intuos3 Grip Pen Eraser */
292 case 0x81b: /* Intuos3 Classic Pen Eraser */
293 case 0x91b: /* Intuos3 Airbrush Eraser */
294 wacom->tool[idx] = BTN_TOOL_RUBBER;
299 case 0x913: /* Intuos3 Airbrush */
300 wacom->tool[idx] = BTN_TOOL_AIRBRUSH;
302 default: /* Unknown tool */
303 wacom->tool[idx] = BTN_TOOL_PEN;
305 /* only large I3 support Lens Cursor */
306 if(!((wacom->tool[idx] == BTN_TOOL_LENS)
307 && ((wacom->features->type == INTUOS3)
308 || (wacom->features->type == INTUOS3S)))) {
309 wacom_report_abs(wcombo, ABS_MISC, wacom->id[idx]); /* report tool id */
310 wacom_report_key(wcombo, wacom->tool[idx], 1);
311 wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
318 if ((data[1] & 0xfe) == 0x80) {
319 if(!((wacom->tool[idx] == BTN_TOOL_LENS)
320 && ((wacom->features->type == INTUOS3)
321 || (wacom->features->type == INTUOS3S)))) {
322 wacom_report_key(wcombo, wacom->tool[idx], 0);
323 wacom_report_abs(wcombo, ABS_MISC, 0); /* reset tool id */
324 wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
331 static void wacom_intuos_general(struct wacom_wac *wacom, void *wcombo)
333 unsigned char *data = wacom->data;
336 /* general pen packet */
337 if ((data[1] & 0xb8) == 0xa0) {
338 t = (data[6] << 2) | ((data[7] >> 6) & 3);
339 wacom_report_abs(wcombo, ABS_PRESSURE, t);
340 wacom_report_abs(wcombo, ABS_TILT_X,
341 ((data[7] << 1) & 0x7e) | (data[8] >> 7));
342 wacom_report_abs(wcombo, ABS_TILT_Y, data[8] & 0x7f);
343 wacom_report_key(wcombo, BTN_STYLUS, data[1] & 2);
344 wacom_report_key(wcombo, BTN_STYLUS2, data[1] & 4);
345 wacom_report_key(wcombo, BTN_TOUCH, t > 10);
348 /* airbrush second packet */
349 if ((data[1] & 0xbc) == 0xb4) {
350 wacom_report_abs(wcombo, ABS_WHEEL,
351 (data[6] << 2) | ((data[7] >> 6) & 3));
352 wacom_report_abs(wcombo, ABS_TILT_X,
353 ((data[7] << 1) & 0x7e) | (data[8] >> 7));
354 wacom_report_abs(wcombo, ABS_TILT_Y, data[8] & 0x7f);
359 static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo)
361 unsigned char *data = wacom->data;
365 if (data[0] != 2 && data[0] != 5 && data[0] != 6 && data[0] != 12) {
366 dbg("wacom_intuos_irq: received unknown report #%d", data[0]);
371 idx = data[1] & 0x01;
373 /* pad packets. Works as a second tool and is always in prox */
375 /* initiate the pad as a device */
376 if (wacom->tool[1] != BTN_TOOL_FINGER)
377 wacom->tool[1] = BTN_TOOL_FINGER;
379 wacom_report_key(wcombo, BTN_0, (data[5] & 0x01));
380 wacom_report_key(wcombo, BTN_1, (data[5] & 0x02));
381 wacom_report_key(wcombo, BTN_2, (data[5] & 0x04));
382 wacom_report_key(wcombo, BTN_3, (data[5] & 0x08));
383 wacom_report_key(wcombo, BTN_4, (data[6] & 0x01));
384 wacom_report_key(wcombo, BTN_5, (data[6] & 0x02));
385 wacom_report_key(wcombo, BTN_6, (data[6] & 0x04));
386 wacom_report_key(wcombo, BTN_7, (data[6] & 0x08));
387 wacom_report_abs(wcombo, ABS_RX, ((data[1] & 0x1f) << 8) | data[2]);
388 wacom_report_abs(wcombo, ABS_RY, ((data[3] & 0x1f) << 8) | data[4]);
390 if((data[5] & 0x0f) | (data[6] & 0x0f) | (data[1] & 0x1f) |
391 data[2] | (data[3] & 0x1f) | data[4])
392 wacom_report_key(wcombo, wacom->tool[1], 1);
394 wacom_report_key(wcombo, wacom->tool[1], 0);
395 wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, 0xffffffff);
399 /* process in/out prox events */
400 result = wacom_intuos_inout(wacom, wcombo);
404 /* Cintiq doesn't send data when RDY bit isn't set */
405 if ((wacom->features->type == CINTIQ) && !(data[1] & 0x40))
408 if (wacom->features->type >= INTUOS3) {
409 wacom_report_abs(wcombo, ABS_X, (data[2] << 9) | (data[3] << 1) | ((data[9] >> 1) & 1));
410 wacom_report_abs(wcombo, ABS_Y, (data[4] << 9) | (data[5] << 1) | (data[9] & 1));
411 wacom_report_abs(wcombo, ABS_DISTANCE, ((data[9] >> 2) & 0x3f));
413 wacom_report_abs(wcombo, ABS_X, wacom_be16_to_cpu(&data[2]));
414 wacom_report_abs(wcombo, ABS_Y, wacom_be16_to_cpu(&data[4]));
415 wacom_report_abs(wcombo, ABS_DISTANCE, ((data[9] >> 3) & 0x1f));
418 /* process general packets */
419 wacom_intuos_general(wacom, wcombo);
421 /* 4D mouse, 2D mouse, marker pen rotation, or Lens cursor packets */
422 if ((data[1] & 0xbc) == 0xa8 || (data[1] & 0xbe) == 0xb0) {
424 if (data[1] & 0x02) {
425 /* Rotation packet */
426 if (wacom->features->type >= INTUOS3) {
427 /* I3 marker pen rotation reported as wheel
428 * due to valuator limitation
430 t = (data[6] << 3) | ((data[7] >> 5) & 7);
431 t = (data[7] & 0x20) ? ((t > 900) ? ((t-1) / 2 - 1350) :
432 ((t-1) / 2 + 450)) : (450 - t / 2) ;
433 wacom_report_abs(wcombo, ABS_WHEEL, t);
435 /* 4D mouse rotation packet */
436 t = (data[6] << 3) | ((data[7] >> 5) & 7);
437 wacom_report_abs(wcombo, ABS_RZ, (data[7] & 0x20) ?
438 ((t - 1) / 2) : -t / 2);
441 } else if (!(data[1] & 0x10) && wacom->features->type < INTUOS3S) {
442 /* 4D mouse packet */
443 wacom_report_key(wcombo, BTN_LEFT, data[8] & 0x01);
444 wacom_report_key(wcombo, BTN_MIDDLE, data[8] & 0x02);
445 wacom_report_key(wcombo, BTN_RIGHT, data[8] & 0x04);
447 wacom_report_key(wcombo, BTN_SIDE, data[8] & 0x20);
448 wacom_report_key(wcombo, BTN_EXTRA, data[8] & 0x10);
449 t = (data[6] << 2) | ((data[7] >> 6) & 3);
450 wacom_report_abs(wcombo, ABS_THROTTLE, (data[8] & 0x08) ? -t : t);
452 } else if (wacom->tool[idx] == BTN_TOOL_MOUSE) {
453 /* 2D mouse packet */
454 wacom_report_key(wcombo, BTN_LEFT, data[8] & 0x04);
455 wacom_report_key(wcombo, BTN_MIDDLE, data[8] & 0x08);
456 wacom_report_key(wcombo, BTN_RIGHT, data[8] & 0x10);
457 wacom_report_rel(wcombo, REL_WHEEL, (data[8] & 0x01)
458 - ((data[8] & 0x02) >> 1));
460 /* I3 2D mouse side buttons */
461 if (wacom->features->type >= INTUOS3S && wacom->features->type <= INTUOS3L) {
462 wacom_report_key(wcombo, BTN_SIDE, data[8] & 0x40);
463 wacom_report_key(wcombo, BTN_EXTRA, data[8] & 0x20);
466 } else if (wacom->features->type < INTUOS3S || wacom->features->type == INTUOS3L) {
467 /* Lens cursor packets */
468 wacom_report_key(wcombo, BTN_LEFT, data[8] & 0x01);
469 wacom_report_key(wcombo, BTN_MIDDLE, data[8] & 0x02);
470 wacom_report_key(wcombo, BTN_RIGHT, data[8] & 0x04);
471 wacom_report_key(wcombo, BTN_SIDE, data[8] & 0x10);
472 wacom_report_key(wcombo, BTN_EXTRA, data[8] & 0x08);
476 wacom_report_abs(wcombo, ABS_MISC, wacom->id[idx]); /* report tool id */
477 wacom_report_key(wcombo, wacom->tool[idx], 1);
478 wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
482 int wacom_wac_irq(struct wacom_wac *wacom_wac, void *wcombo)
484 switch (wacom_wac->features->type) {
486 return (wacom_penpartner_irq(wacom_wac, wcombo));
489 return (wacom_pl_irq(wacom_wac, wcombo));
493 return (wacom_graphire_irq(wacom_wac, wcombo));
496 return (wacom_ptu_irq(wacom_wac, wcombo));
503 return (wacom_intuos_irq(wacom_wac, wcombo));
511 void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
513 switch (wacom_wac->features->type) {
515 input_dev_g4(input_dev, wacom_wac);
518 input_dev_g(input_dev, wacom_wac);
523 input_dev_i3(input_dev, wacom_wac);
526 input_dev_i3s(input_dev, wacom_wac);
528 input_dev_i(input_dev, wacom_wac);
532 input_dev_pl(input_dev, wacom_wac);
535 input_dev_pt(input_dev, wacom_wac);
541 static struct wacom_features wacom_features[] = {
542 { "Wacom Penpartner", 7, 5040, 3780, 255, 0, PENPARTNER },
543 { "Wacom Graphire", 8, 10206, 7422, 511, 63, GRAPHIRE },
544 { "Wacom Graphire2 4x5", 8, 10206, 7422, 511, 63, GRAPHIRE },
545 { "Wacom Graphire2 5x7", 8, 13918, 10206, 511, 63, GRAPHIRE },
546 { "Wacom Graphire3", 8, 10208, 7424, 511, 63, GRAPHIRE },
547 { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 63, GRAPHIRE },
548 { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 63, WACOM_G4 },
549 { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 63, WACOM_G4 },
550 { "Wacom Volito", 8, 5104, 3712, 511, 0, GRAPHIRE },
551 { "Wacom PenStation2", 8, 3250, 2320, 255, 0, GRAPHIRE },
552 { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 0, GRAPHIRE },
553 { "Wacom Volito2 2x3", 8, 3248, 2320, 511, 0, GRAPHIRE },
554 { "Wacom PenPartner2", 8, 3250, 2320, 255, 0, GRAPHIRE },
555 { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 63, INTUOS },
556 { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 63, INTUOS },
557 { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 63, INTUOS },
558 { "Wacom Intuos 12x12", 10, 30480, 31680, 1023, 63, INTUOS },
559 { "Wacom Intuos 12x18", 10, 45720, 31680, 1023, 63, INTUOS },
560 { "Wacom PL400", 8, 5408, 4056, 255, 0, PL },
561 { "Wacom PL500", 8, 6144, 4608, 255, 0, PL },
562 { "Wacom PL600", 8, 6126, 4604, 255, 0, PL },
563 { "Wacom PL600SX", 8, 6260, 5016, 255, 0, PL },
564 { "Wacom PL550", 8, 6144, 4608, 511, 0, PL },
565 { "Wacom PL800", 8, 7220, 5780, 511, 0, PL },
566 { "Wacom PL700", 8, 6758, 5406, 511, 0, PL },
567 { "Wacom PL510", 8, 6282, 4762, 511, 0, PL },
568 { "Wacom DTU710", 8, 34080, 27660, 511, 0, PL },
569 { "Wacom DTF521", 8, 6282, 4762, 511, 0, PL },
570 { "Wacom DTF720", 8, 6858, 5506, 511, 0, PL },
571 { "Wacom Cintiq Partner",8, 20480, 15360, 511, 0, PTU },
572 { "Wacom Intuos2 4x5", 10, 12700, 10600, 1023, 63, INTUOS },
573 { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 63, INTUOS },
574 { "Wacom Intuos2 9x12", 10, 30480, 24060, 1023, 63, INTUOS },
575 { "Wacom Intuos2 12x12", 10, 30480, 31680, 1023, 63, INTUOS },
576 { "Wacom Intuos2 12x18", 10, 45720, 31680, 1023, 63, INTUOS },
577 { "Wacom Intuos3 4x5", 10, 25400, 20320, 1023, 63, INTUOS3S },
578 { "Wacom Intuos3 6x8", 10, 40640, 30480, 1023, 63, INTUOS3 },
579 { "Wacom Intuos3 9x12", 10, 60960, 45720, 1023, 63, INTUOS3 },
580 { "Wacom Intuos3 12x12", 10, 60960, 60960, 1023, 63, INTUOS3L },
581 { "Wacom Intuos3 12x19", 10, 97536, 60960, 1023, 63, INTUOS3L },
582 { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 63, INTUOS3 },
583 { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 15, INTUOS3S },
584 { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 63, CINTIQ },
585 { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 63, INTUOS },
589 static struct usb_device_id wacom_ids[] = {
590 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x00) },
591 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x10) },
592 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x11) },
593 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x12) },
594 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x13) },
595 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x14) },
596 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x15) },
597 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16) },
598 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x60) },
599 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x61) },
600 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62) },
601 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x63) },
602 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x64) },
603 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20) },
604 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21) },
605 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22) },
606 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x23) },
607 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x24) },
608 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x30) },
609 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x31) },
610 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x32) },
611 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x33) },
612 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x34) },
613 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x35) },
614 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x37) },
615 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x38) },
616 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x39) },
617 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC0) },
618 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC4) },
619 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03) },
620 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x41) },
621 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x42) },
622 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x43) },
623 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x44) },
624 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x45) },
625 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB0) },
626 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB1) },
627 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB2) },
628 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB3) },
629 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB4) },
630 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB5) },
631 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB7) },
632 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x3F) },
633 { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x47) },
637 const struct usb_device_id * get_device_table(void) {
638 const struct usb_device_id * id_table = wacom_ids;
642 struct wacom_features * get_wacom_feature(const struct usb_device_id * id) {
643 int index = id - wacom_ids;
644 struct wacom_features *wf = &wacom_features[index];
648 MODULE_DEVICE_TABLE(usb, wacom_ids);