diff options
author | Ping Cheng <pingc@wacom.com> | 2005-11-17 12:46:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-17 14:29:53 -0500 |
commit | ebb6f371ac5ce623051c4431c5d0f093462f679b (patch) | |
tree | d805f477f728f142c702bf4309c6d00f76c2f588 /drivers/usb/input | |
parent | 116d75bd4d539309e0e1391e509f852a9cce82a6 (diff) |
[PATCH] USB: wacom tablet driver update
This patch adds support for Graphire4, Cintiq 710, Intuos3 6x11, etc. and
report Device IDs.
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/usb/input')
-rw-r--r-- | drivers/usb/input/wacom.c | 133 |
1 files changed, 110 insertions, 23 deletions
diff --git a/drivers/usb/input/wacom.c b/drivers/usb/input/wacom.c index ea0f75773ae1..aea1cfae34cc 100644 --- a/drivers/usb/input/wacom.c +++ b/drivers/usb/input/wacom.c | |||
@@ -52,8 +52,10 @@ | |||
52 | * v1.30.1 (pi) - Added Graphire3 support | 52 | * v1.30.1 (pi) - Added Graphire3 support |
53 | * v1.40 (pc) - Add support for several new devices, fix eraser reporting, ... | 53 | * v1.40 (pc) - Add support for several new devices, fix eraser reporting, ... |
54 | * v1.43 (pc) - Added support for Cintiq 21UX | 54 | * v1.43 (pc) - Added support for Cintiq 21UX |
55 | - Fixed a Graphire bug | 55 | * - Fixed a Graphire bug |
56 | - Merged wacom_intuos3_irq into wacom_intuos_irq | 56 | * - Merged wacom_intuos3_irq into wacom_intuos_irq |
57 | * v1.44 (pc) - Added support for Graphire4, Cintiq 710, Intuos3 6x11, etc. | ||
58 | * - Report Device IDs | ||
57 | */ | 59 | */ |
58 | 60 | ||
59 | /* | 61 | /* |
@@ -76,7 +78,7 @@ | |||
76 | /* | 78 | /* |
77 | * Version Information | 79 | * Version Information |
78 | */ | 80 | */ |
79 | #define DRIVER_VERSION "v1.43" | 81 | #define DRIVER_VERSION "v1.44" |
80 | #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>" | 82 | #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>" |
81 | #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver" | 83 | #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver" |
82 | #define DRIVER_LICENSE "GPL" | 84 | #define DRIVER_LICENSE "GPL" |
@@ -86,10 +88,14 @@ MODULE_DESCRIPTION(DRIVER_DESC); | |||
86 | MODULE_LICENSE(DRIVER_LICENSE); | 88 | MODULE_LICENSE(DRIVER_LICENSE); |
87 | 89 | ||
88 | #define USB_VENDOR_ID_WACOM 0x056a | 90 | #define USB_VENDOR_ID_WACOM 0x056a |
91 | #define STYLUS_DEVICE_ID 0x02 | ||
92 | #define CURSOR_DEVICE_ID 0x06 | ||
93 | #define ERASER_DEVICE_ID 0x0A | ||
89 | 94 | ||
90 | enum { | 95 | enum { |
91 | PENPARTNER = 0, | 96 | PENPARTNER = 0, |
92 | GRAPHIRE, | 97 | GRAPHIRE, |
98 | G4, | ||
93 | PL, | 99 | PL, |
94 | INTUOS, | 100 | INTUOS, |
95 | INTUOS3, | 101 | INTUOS3, |
@@ -116,6 +122,7 @@ struct wacom { | |||
116 | struct urb *irq; | 122 | struct urb *irq; |
117 | struct wacom_features *features; | 123 | struct wacom_features *features; |
118 | int tool[2]; | 124 | int tool[2]; |
125 | int id[2]; | ||
119 | __u32 serial[2]; | 126 | __u32 serial[2]; |
120 | char phys[32]; | 127 | char phys[32]; |
121 | }; | 128 | }; |
@@ -136,7 +143,7 @@ static void wacom_pl_irq(struct urb *urb, struct pt_regs *regs) | |||
136 | struct wacom *wacom = urb->context; | 143 | struct wacom *wacom = urb->context; |
137 | unsigned char *data = wacom->data; | 144 | unsigned char *data = wacom->data; |
138 | struct input_dev *dev = wacom->dev; | 145 | struct input_dev *dev = wacom->dev; |
139 | int prox, pressure; | 146 | int prox, pressure, id; |
140 | int retval; | 147 | int retval; |
141 | 148 | ||
142 | switch (urb->status) { | 149 | switch (urb->status) { |
@@ -163,6 +170,7 @@ static void wacom_pl_irq(struct urb *urb, struct pt_regs *regs) | |||
163 | 170 | ||
164 | input_regs(dev, regs); | 171 | input_regs(dev, regs); |
165 | 172 | ||
173 | id = ERASER_DEVICE_ID; | ||
166 | if (prox) { | 174 | if (prox) { |
167 | 175 | ||
168 | pressure = (signed char)((data[7] << 1) | ((data[4] >> 2) & 1)); | 176 | pressure = (signed char)((data[7] << 1) | ((data[4] >> 2) & 1)); |
@@ -177,11 +185,15 @@ static void wacom_pl_irq(struct urb *urb, struct pt_regs *regs) | |||
177 | * an out of proximity for previous tool then a in for new tool. | 185 | * an out of proximity for previous tool then a in for new tool. |
178 | */ | 186 | */ |
179 | if (!wacom->tool[0]) { | 187 | if (!wacom->tool[0]) { |
180 | /* Going into proximity select tool */ | 188 | /* Eraser bit set for DTF */ |
181 | wacom->tool[1] = (data[4] & 0x20)? BTN_TOOL_RUBBER : BTN_TOOL_PEN; | 189 | if (data[1] & 0x10) |
190 | wacom->tool[1] = BTN_TOOL_RUBBER; | ||
191 | else | ||
192 | /* Going into proximity select tool */ | ||
193 | wacom->tool[1] = (data[4] & 0x20) ? BTN_TOOL_RUBBER : BTN_TOOL_PEN; | ||
182 | } else { | 194 | } else { |
183 | /* was entered with stylus2 pressed */ | 195 | /* was entered with stylus2 pressed */ |
184 | if (wacom->tool[1] == BTN_TOOL_RUBBER && !(data[4] & 0x20) ) { | 196 | if (wacom->tool[1] == BTN_TOOL_RUBBER && !(data[4] & 0x20)) { |
185 | /* report out proximity for previous tool */ | 197 | /* report out proximity for previous tool */ |
186 | input_report_key(dev, wacom->tool[1], 0); | 198 | input_report_key(dev, wacom->tool[1], 0); |
187 | input_sync(dev); | 199 | input_sync(dev); |
@@ -192,8 +204,9 @@ static void wacom_pl_irq(struct urb *urb, struct pt_regs *regs) | |||
192 | if (wacom->tool[1] != BTN_TOOL_RUBBER) { | 204 | if (wacom->tool[1] != BTN_TOOL_RUBBER) { |
193 | /* Unknown tool selected default to pen tool */ | 205 | /* Unknown tool selected default to pen tool */ |
194 | wacom->tool[1] = BTN_TOOL_PEN; | 206 | wacom->tool[1] = BTN_TOOL_PEN; |
207 | id = STYLUS_DEVICE_ID; | ||
195 | } | 208 | } |
196 | input_report_key(dev, wacom->tool[1], prox); /* report in proximity for tool */ | 209 | input_report_key(dev, wacom->tool[1], id); /* report in proximity for tool */ |
197 | input_report_abs(dev, ABS_X, data[3] | (data[2] << 7) | ((data[1] & 0x03) << 14)); | 210 | input_report_abs(dev, ABS_X, data[3] | (data[2] << 7) | ((data[1] & 0x03) << 14)); |
198 | input_report_abs(dev, ABS_Y, data[6] | (data[5] << 7) | ((data[4] & 0x03) << 14)); | 211 | input_report_abs(dev, ABS_Y, data[6] | (data[5] << 7) | ((data[4] & 0x03) << 14)); |
199 | input_report_abs(dev, ABS_PRESSURE, pressure); | 212 | input_report_abs(dev, ABS_PRESSURE, pressure); |
@@ -250,10 +263,10 @@ static void wacom_ptu_irq(struct urb *urb, struct pt_regs *regs) | |||
250 | 263 | ||
251 | input_regs(dev, regs); | 264 | input_regs(dev, regs); |
252 | if (data[1] & 0x04) { | 265 | if (data[1] & 0x04) { |
253 | input_report_key(dev, BTN_TOOL_RUBBER, data[1] & 0x20); | 266 | input_report_key(dev, BTN_TOOL_RUBBER, (data[1] & 0x20) ? ERASER_DEVICE_ID : 0); |
254 | input_report_key(dev, BTN_TOUCH, data[1] & 0x08); | 267 | input_report_key(dev, BTN_TOUCH, data[1] & 0x08); |
255 | } else { | 268 | } else { |
256 | input_report_key(dev, BTN_TOOL_PEN, data[1] & 0x20); | 269 | input_report_key(dev, BTN_TOOL_PEN, (data[1] & 0x20) ? STYLUS_DEVICE_ID : 0); |
257 | input_report_key(dev, BTN_TOUCH, data[1] & 0x01); | 270 | input_report_key(dev, BTN_TOUCH, data[1] & 0x01); |
258 | } | 271 | } |
259 | input_report_abs(dev, ABS_X, le16_to_cpu(*(__le16 *) &data[2])); | 272 | input_report_abs(dev, ABS_X, le16_to_cpu(*(__le16 *) &data[2])); |
@@ -299,7 +312,7 @@ static void wacom_penpartner_irq(struct urb *urb, struct pt_regs *regs) | |||
299 | } | 312 | } |
300 | 313 | ||
301 | input_regs(dev, regs); | 314 | input_regs(dev, regs); |
302 | input_report_key(dev, BTN_TOOL_PEN, 1); | 315 | input_report_key(dev, BTN_TOOL_PEN, STYLUS_DEVICE_ID); |
303 | input_report_abs(dev, ABS_X, le16_to_cpu(*(__le16 *) &data[1])); | 316 | input_report_abs(dev, ABS_X, le16_to_cpu(*(__le16 *) &data[1])); |
304 | input_report_abs(dev, ABS_Y, le16_to_cpu(*(__le16 *) &data[3])); | 317 | input_report_abs(dev, ABS_Y, le16_to_cpu(*(__le16 *) &data[3])); |
305 | input_report_abs(dev, ABS_PRESSURE, (signed char)data[6] + 127); | 318 | input_report_abs(dev, ABS_PRESSURE, (signed char)data[6] + 127); |
@@ -319,7 +332,7 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) | |||
319 | struct wacom *wacom = urb->context; | 332 | struct wacom *wacom = urb->context; |
320 | unsigned char *data = wacom->data; | 333 | unsigned char *data = wacom->data; |
321 | struct input_dev *dev = wacom->dev; | 334 | struct input_dev *dev = wacom->dev; |
322 | int x, y; | 335 | int x, y, id, rw; |
323 | int retval; | 336 | int retval; |
324 | 337 | ||
325 | switch (urb->status) { | 338 | switch (urb->status) { |
@@ -344,6 +357,7 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) | |||
344 | 357 | ||
345 | input_regs(dev, regs); | 358 | input_regs(dev, regs); |
346 | 359 | ||
360 | id = STYLUS_DEVICE_ID; | ||
347 | if (data[1] & 0x10) { /* in prox */ | 361 | if (data[1] & 0x10) { /* in prox */ |
348 | 362 | ||
349 | switch ((data[1] >> 5) & 3) { | 363 | switch ((data[1] >> 5) & 3) { |
@@ -354,18 +368,27 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) | |||
354 | 368 | ||
355 | case 1: /* Rubber */ | 369 | case 1: /* Rubber */ |
356 | wacom->tool[0] = BTN_TOOL_RUBBER; | 370 | wacom->tool[0] = BTN_TOOL_RUBBER; |
371 | id = ERASER_DEVICE_ID; | ||
357 | break; | 372 | break; |
358 | 373 | ||
359 | case 2: /* Mouse with wheel */ | 374 | case 2: /* Mouse with wheel */ |
360 | input_report_key(dev, BTN_MIDDLE, data[1] & 0x04); | 375 | input_report_key(dev, BTN_MIDDLE, data[1] & 0x04); |
361 | input_report_rel(dev, REL_WHEEL, (signed char) data[6]); | 376 | if (wacom->features->type == G4) { |
377 | rw = data[7] & 0x04 ? -(data[7] & 0x03) : (data[7] & 0x03); | ||
378 | input_report_rel(dev, REL_WHEEL, rw); | ||
379 | } else | ||
380 | input_report_rel(dev, REL_WHEEL, (signed char) data[6]); | ||
362 | /* fall through */ | 381 | /* fall through */ |
363 | 382 | ||
364 | case 3: /* Mouse without wheel */ | 383 | case 3: /* Mouse without wheel */ |
365 | wacom->tool[0] = BTN_TOOL_MOUSE; | 384 | wacom->tool[0] = BTN_TOOL_MOUSE; |
385 | id = CURSOR_DEVICE_ID; | ||
366 | input_report_key(dev, BTN_LEFT, data[1] & 0x01); | 386 | input_report_key(dev, BTN_LEFT, data[1] & 0x01); |
367 | input_report_key(dev, BTN_RIGHT, data[1] & 0x02); | 387 | input_report_key(dev, BTN_RIGHT, data[1] & 0x02); |
368 | input_report_abs(dev, ABS_DISTANCE, data[7]); | 388 | if (wacom->features->type == G4) |
389 | input_report_abs(dev, ABS_DISTANCE, data[6]); | ||
390 | else | ||
391 | input_report_abs(dev, ABS_DISTANCE, data[7]); | ||
369 | break; | 392 | break; |
370 | } | 393 | } |
371 | } | 394 | } |
@@ -376,16 +399,50 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) | |||
376 | input_report_abs(dev, ABS_X, x); | 399 | input_report_abs(dev, ABS_X, x); |
377 | input_report_abs(dev, ABS_Y, y); | 400 | input_report_abs(dev, ABS_Y, y); |
378 | if (wacom->tool[0] != BTN_TOOL_MOUSE) { | 401 | if (wacom->tool[0] != BTN_TOOL_MOUSE) { |
379 | input_report_abs(dev, ABS_PRESSURE, le16_to_cpu(*(__le16 *) &data[6])); | 402 | input_report_abs(dev, ABS_PRESSURE, data[6] | ((data[7] & 0x01) << 8)); |
380 | input_report_key(dev, BTN_TOUCH, data[1] & 0x01); | 403 | input_report_key(dev, BTN_TOUCH, data[1] & 0x01); |
381 | input_report_key(dev, BTN_STYLUS, data[1] & 0x02); | 404 | input_report_key(dev, BTN_STYLUS, data[1] & 0x02); |
382 | input_report_key(dev, BTN_STYLUS2, data[1] & 0x04); | 405 | input_report_key(dev, BTN_STYLUS2, data[1] & 0x04); |
383 | } | 406 | } |
384 | } | 407 | } |
385 | 408 | ||
386 | input_report_key(dev, wacom->tool[0], data[1] & 0x10); | 409 | input_report_key(dev, wacom->tool[0], (data[1] & 0x10) ? id : 0); |
387 | input_sync(dev); | 410 | input_sync(dev); |
388 | 411 | ||
412 | /* send pad data */ | ||
413 | if (wacom->features->type == G4) { | ||
414 | /* fist time sending pad data */ | ||
415 | if (wacom->tool[1] != BTN_TOOL_FINGER) { | ||
416 | wacom->id[1] = 0; | ||
417 | wacom->serial[1] = (data[7] & 0x38) >> 2; | ||
418 | } | ||
419 | if (data[7] & 0xf8) { | ||
420 | input_report_key(dev, BTN_0, (data[7] & 0x40)); | ||
421 | input_report_key(dev, BTN_4, (data[7] & 0x80)); | ||
422 | if (((data[7] & 0x38) >> 2) == (wacom->serial[1] & 0x0e)) | ||
423 | /* alter REL_WHEEL value so X apps can get it */ | ||
424 | wacom->serial[1] += (wacom->serial[1] & 0x01) ? -1 : 1; | ||
425 | else | ||
426 | wacom->serial[1] = (data[7] & 0x38 ) >> 2; | ||
427 | |||
428 | /* don't alter the value when there is no wheel event */ | ||
429 | if (wacom->serial[1] == 1) | ||
430 | wacom->serial[1] = 0; | ||
431 | rw = wacom->serial[1]; | ||
432 | rw = (rw & 0x08) ? -(rw & 0x07) : (rw & 0x07); | ||
433 | input_report_rel(dev, REL_WHEEL, rw); | ||
434 | wacom->tool[1] = BTN_TOOL_FINGER; | ||
435 | wacom->id[1] = data[7] & 0xf8; | ||
436 | input_report_key(dev, wacom->tool[1], 0xf0); | ||
437 | input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); | ||
438 | } else if (wacom->id[1]) { | ||
439 | wacom->id[1] = 0; | ||
440 | wacom->serial[1] = 0; | ||
441 | input_report_key(dev, wacom->tool[1], 0); | ||
442 | input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); | ||
443 | } | ||
444 | input_sync(dev); | ||
445 | } | ||
389 | exit: | 446 | exit: |
390 | retval = usb_submit_urb (urb, GFP_ATOMIC); | 447 | retval = usb_submit_urb (urb, GFP_ATOMIC); |
391 | if (retval) | 448 | if (retval) |
@@ -410,7 +467,8 @@ static int wacom_intuos_inout(struct urb *urb) | |||
410 | (data[4] << 20) + (data[5] << 12) + | 467 | (data[4] << 20) + (data[5] << 12) + |
411 | (data[6] << 4) + (data[7] >> 4); | 468 | (data[6] << 4) + (data[7] >> 4); |
412 | 469 | ||
413 | switch ((data[2] << 4) | (data[3] >> 4)) { | 470 | wacom->id[idx] = (data[2] << 4) | (data[3] >> 4); |
471 | switch (wacom->id[idx]) { | ||
414 | case 0x812: /* Inking pen */ | 472 | case 0x812: /* Inking pen */ |
415 | case 0x801: /* Intuos3 Inking pen */ | 473 | case 0x801: /* Intuos3 Inking pen */ |
416 | case 0x012: | 474 | case 0x012: |
@@ -458,7 +516,7 @@ static int wacom_intuos_inout(struct urb *urb) | |||
458 | default: /* Unknown tool */ | 516 | default: /* Unknown tool */ |
459 | wacom->tool[idx] = BTN_TOOL_PEN; | 517 | wacom->tool[idx] = BTN_TOOL_PEN; |
460 | } | 518 | } |
461 | input_report_key(dev, wacom->tool[idx], 1); | 519 | input_report_key(dev, wacom->tool[idx], wacom->id[idx]); |
462 | input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); | 520 | input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); |
463 | input_sync(dev); | 521 | input_sync(dev); |
464 | return 1; | 522 | return 1; |
@@ -637,7 +695,7 @@ static void wacom_intuos_irq(struct urb *urb, struct pt_regs *regs) | |||
637 | } | 695 | } |
638 | } | 696 | } |
639 | 697 | ||
640 | input_report_key(dev, wacom->tool[idx], 1); | 698 | input_report_key(dev, wacom->tool[idx], wacom->id[idx]); |
641 | input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); | 699 | input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); |
642 | input_sync(dev); | 700 | input_sync(dev); |
643 | 701 | ||
@@ -655,6 +713,13 @@ static struct wacom_features wacom_features[] = { | |||
655 | { "Wacom Graphire2 5x7", 8, 13918, 10206, 511, 32, GRAPHIRE, wacom_graphire_irq }, | 713 | { "Wacom Graphire2 5x7", 8, 13918, 10206, 511, 32, GRAPHIRE, wacom_graphire_irq }, |
656 | { "Wacom Graphire3", 8, 10208, 7424, 511, 32, GRAPHIRE, wacom_graphire_irq }, | 714 | { "Wacom Graphire3", 8, 10208, 7424, 511, 32, GRAPHIRE, wacom_graphire_irq }, |
657 | { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 32, GRAPHIRE, wacom_graphire_irq }, | 715 | { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 32, GRAPHIRE, wacom_graphire_irq }, |
716 | { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 32, G4, wacom_graphire_irq }, | ||
717 | { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 32, G4, wacom_graphire_irq }, | ||
718 | { "Wacom Volito", 8, 5104, 3712, 511, 32, GRAPHIRE, wacom_graphire_irq }, | ||
719 | { "Wacom PenStation2", 8, 3250, 2320, 255, 32, GRAPHIRE, wacom_graphire_irq }, | ||
720 | { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 32, GRAPHIRE, wacom_graphire_irq }, | ||
721 | { "Wacom Volito2 2x3", 8, 3248, 2320, 511, 32, GRAPHIRE, wacom_graphire_irq }, | ||
722 | { "Wacom PenPartner2", 8, 3250, 2320, 255, 32, GRAPHIRE, wacom_graphire_irq }, | ||
658 | { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 15, INTUOS, wacom_intuos_irq }, | 723 | { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 15, INTUOS, wacom_intuos_irq }, |
659 | { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 15, INTUOS, wacom_intuos_irq }, | 724 | { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 15, INTUOS, wacom_intuos_irq }, |
660 | { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 15, INTUOS, wacom_intuos_irq }, | 725 | { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 15, INTUOS, wacom_intuos_irq }, |
@@ -666,16 +731,20 @@ static struct wacom_features wacom_features[] = { | |||
666 | { "Wacom PL600SX", 8, 6260, 5016, 255, 32, PL, wacom_pl_irq }, | 731 | { "Wacom PL600SX", 8, 6260, 5016, 255, 32, PL, wacom_pl_irq }, |
667 | { "Wacom PL550", 8, 6144, 4608, 511, 32, PL, wacom_pl_irq }, | 732 | { "Wacom PL550", 8, 6144, 4608, 511, 32, PL, wacom_pl_irq }, |
668 | { "Wacom PL800", 8, 7220, 5780, 511, 32, PL, wacom_pl_irq }, | 733 | { "Wacom PL800", 8, 7220, 5780, 511, 32, PL, wacom_pl_irq }, |
734 | { "Wacom PL700", 8, 6758, 5406, 511, 32, PL, wacom_pl_irq }, | ||
735 | { "Wacom PL510", 8, 6282, 4762, 511, 32, PL, wacom_pl_irq }, | ||
736 | { "Wacom PL710", 8, 34080, 27660, 511, 32, PL, wacom_pl_irq }, | ||
737 | { "Wacom DTF720", 8, 6858, 5506, 511, 32, PL, wacom_pl_irq }, | ||
738 | { "Wacom Cintiq Partner",8, 20480, 15360, 511, 32, PL, wacom_ptu_irq }, | ||
669 | { "Wacom Intuos2 4x5", 10, 12700, 10600, 1023, 15, INTUOS, wacom_intuos_irq }, | 739 | { "Wacom Intuos2 4x5", 10, 12700, 10600, 1023, 15, INTUOS, wacom_intuos_irq }, |
670 | { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 15, INTUOS, wacom_intuos_irq }, | 740 | { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 15, INTUOS, wacom_intuos_irq }, |
671 | { "Wacom Intuos2 9x12", 10, 30480, 24060, 1023, 15, INTUOS, wacom_intuos_irq }, | 741 | { "Wacom Intuos2 9x12", 10, 30480, 24060, 1023, 15, INTUOS, wacom_intuos_irq }, |
672 | { "Wacom Intuos2 12x12", 10, 30480, 31680, 1023, 15, INTUOS, wacom_intuos_irq }, | 742 | { "Wacom Intuos2 12x12", 10, 30480, 31680, 1023, 15, INTUOS, wacom_intuos_irq }, |
673 | { "Wacom Intuos2 12x18", 10, 45720, 31680, 1023, 15, INTUOS, wacom_intuos_irq }, | 743 | { "Wacom Intuos2 12x18", 10, 45720, 31680, 1023, 15, INTUOS, wacom_intuos_irq }, |
674 | { "Wacom Volito", 8, 5104, 3712, 511, 32, GRAPHIRE, wacom_graphire_irq }, | ||
675 | { "Wacom Cintiq Partner",8, 20480, 15360, 511, 32, PL, wacom_ptu_irq }, | ||
676 | { "Wacom Intuos3 4x5", 10, 25400, 20320, 1023, 15, INTUOS3, wacom_intuos_irq }, | 744 | { "Wacom Intuos3 4x5", 10, 25400, 20320, 1023, 15, INTUOS3, wacom_intuos_irq }, |
677 | { "Wacom Intuos3 6x8", 10, 40640, 30480, 1023, 15, INTUOS3, wacom_intuos_irq }, | 745 | { "Wacom Intuos3 6x8", 10, 40640, 30480, 1023, 15, INTUOS3, wacom_intuos_irq }, |
678 | { "Wacom Intuos3 9x12", 10, 60960, 45720, 1023, 15, INTUOS3, wacom_intuos_irq }, | 746 | { "Wacom Intuos3 9x12", 10, 60960, 45720, 1023, 15, INTUOS3, wacom_intuos_irq }, |
747 | { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 15, INTUOS3, wacom_intuos_irq }, | ||
679 | { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 15, CINTIQ, wacom_intuos_irq }, | 748 | { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 15, CINTIQ, wacom_intuos_irq }, |
680 | { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 15, INTUOS, wacom_intuos_irq }, | 749 | { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 15, INTUOS, wacom_intuos_irq }, |
681 | { } | 750 | { } |
@@ -688,6 +757,13 @@ static struct usb_device_id wacom_ids[] = { | |||
688 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x12) }, | 757 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x12) }, |
689 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x13) }, | 758 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x13) }, |
690 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x14) }, | 759 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x14) }, |
760 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x15) }, | ||
761 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16) }, | ||
762 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x60) }, | ||
763 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x61) }, | ||
764 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62) }, | ||
765 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x63) }, | ||
766 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x64) }, | ||
691 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20) }, | 767 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20) }, |
692 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21) }, | 768 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21) }, |
693 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22) }, | 769 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22) }, |
@@ -699,16 +775,20 @@ static struct usb_device_id wacom_ids[] = { | |||
699 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x33) }, | 775 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x33) }, |
700 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x34) }, | 776 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x34) }, |
701 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x35) }, | 777 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x35) }, |
778 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x37) }, | ||
779 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x38) }, | ||
780 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x39) }, | ||
781 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC0) }, | ||
782 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03) }, | ||
702 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x41) }, | 783 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x41) }, |
703 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x42) }, | 784 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x42) }, |
704 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x43) }, | 785 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x43) }, |
705 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x44) }, | 786 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x44) }, |
706 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x45) }, | 787 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x45) }, |
707 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x60) }, | ||
708 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03) }, | ||
709 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB0) }, | 788 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB0) }, |
710 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB1) }, | 789 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB1) }, |
711 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB2) }, | 790 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB2) }, |
791 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB5) }, | ||
712 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x3F) }, | 792 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x3F) }, |
713 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x47) }, | 793 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x47) }, |
714 | { } | 794 | { } |
@@ -779,6 +859,13 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i | |||
779 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom->features->pressure_max, 0, 0); | 859 | input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom->features->pressure_max, 0, 0); |
780 | 860 | ||
781 | switch (wacom->features->type) { | 861 | switch (wacom->features->type) { |
862 | case G4: | ||
863 | input_dev->evbit[0] |= BIT(EV_MSC); | ||
864 | input_dev->mscbit[0] |= BIT(MSC_SERIAL); | ||
865 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER); | ||
866 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3) | BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7); | ||
867 | /* fall through */ | ||
868 | |||
782 | case GRAPHIRE: | 869 | case GRAPHIRE: |
783 | input_dev->evbit[0] |= BIT(EV_REL); | 870 | input_dev->evbit[0] |= BIT(EV_REL); |
784 | input_dev->relbit[0] |= BIT(REL_WHEEL); | 871 | input_dev->relbit[0] |= BIT(REL_WHEEL); |