diff options
author | Ping Cheng <pingc@wacom.com> | 2008-03-13 16:46:46 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-03-14 11:54:38 -0400 |
commit | 0e1763f530af71bd82e58e407991a9ded6aae73e (patch) | |
tree | 2480c4db15a66a6b85063f3e0bce3a7a96f26af5 /drivers/input/tablet/wacom_wac.c | |
parent | 75d08c78931aa3992791cc4a5615ed1dd61eea92 (diff) |
Input: wacom - add support for Bamboo1, BambooFun, and Cintiq 12WX
Add support for new wacom tablets - Bamboo1, BambooFun, and Cintiq 12WX
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/tablet/wacom_wac.c')
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index fc03ba256f4c..ffe33842143f 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -163,7 +163,9 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) | |||
163 | } | 163 | } |
164 | 164 | ||
165 | id = STYLUS_DEVICE_ID; | 165 | id = STYLUS_DEVICE_ID; |
166 | if (data[1] & 0x80) { /* in prox */ | 166 | if ((data[1] & 0x80) && ((data[1] & 0x07) || data[2] || data[3] || data[4] |
167 | || data[5] || data[6] || (data[7] & 0x07))) { | ||
168 | /* in prox and not a pad data */ | ||
167 | 169 | ||
168 | switch ((data[1] >> 5) & 3) { | 170 | switch ((data[1] >> 5) & 3) { |
169 | 171 | ||
@@ -233,7 +235,6 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) | |||
233 | if (data[7] & 0xf8) { | 235 | if (data[7] & 0xf8) { |
234 | wacom_input_sync(wcombo); /* sync last event */ | 236 | wacom_input_sync(wcombo); /* sync last event */ |
235 | wacom->id[1] = 1; | 237 | wacom->id[1] = 1; |
236 | wacom->serial[1] = (data[7] & 0xf8); | ||
237 | wacom_report_key(wcombo, BTN_0, (data[7] & 0x40)); | 238 | wacom_report_key(wcombo, BTN_0, (data[7] & 0x40)); |
238 | wacom_report_key(wcombo, BTN_4, (data[7] & 0x80)); | 239 | wacom_report_key(wcombo, BTN_4, (data[7] & 0x80)); |
239 | rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); | 240 | rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); |
@@ -252,10 +253,9 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) | |||
252 | } | 253 | } |
253 | break; | 254 | break; |
254 | case WACOM_MO: | 255 | case WACOM_MO: |
255 | if ((data[7] & 0xf8) || (data[8] & 0x80)) { | 256 | if ((data[7] & 0xf8) || (data[8] & 0xff)) { |
256 | wacom_input_sync(wcombo); /* sync last event */ | 257 | wacom_input_sync(wcombo); /* sync last event */ |
257 | wacom->id[1] = 1; | 258 | wacom->id[1] = 1; |
258 | wacom->serial[1] = (data[7] & 0xf8); | ||
259 | wacom_report_key(wcombo, BTN_0, (data[7] & 0x08)); | 259 | wacom_report_key(wcombo, BTN_0, (data[7] & 0x08)); |
260 | wacom_report_key(wcombo, BTN_1, (data[7] & 0x20)); | 260 | wacom_report_key(wcombo, BTN_1, (data[7] & 0x20)); |
261 | wacom_report_key(wcombo, BTN_4, (data[7] & 0x10)); | 261 | wacom_report_key(wcombo, BTN_4, (data[7] & 0x10)); |
@@ -434,10 +434,12 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo) | |||
434 | wacom_report_key(wcombo, BTN_5, (data[6] & 0x02)); | 434 | wacom_report_key(wcombo, BTN_5, (data[6] & 0x02)); |
435 | wacom_report_key(wcombo, BTN_6, (data[6] & 0x04)); | 435 | wacom_report_key(wcombo, BTN_6, (data[6] & 0x04)); |
436 | wacom_report_key(wcombo, BTN_7, (data[6] & 0x08)); | 436 | wacom_report_key(wcombo, BTN_7, (data[6] & 0x08)); |
437 | wacom_report_key(wcombo, BTN_8, (data[5] & 0x10)); | ||
438 | wacom_report_key(wcombo, BTN_9, (data[6] & 0x10)); | ||
437 | wacom_report_abs(wcombo, ABS_RX, ((data[1] & 0x1f) << 8) | data[2]); | 439 | wacom_report_abs(wcombo, ABS_RX, ((data[1] & 0x1f) << 8) | data[2]); |
438 | wacom_report_abs(wcombo, ABS_RY, ((data[3] & 0x1f) << 8) | data[4]); | 440 | wacom_report_abs(wcombo, ABS_RY, ((data[3] & 0x1f) << 8) | data[4]); |
439 | 441 | ||
440 | if((data[5] & 0x0f) | (data[6] & 0x0f) | (data[1] & 0x1f) | | 442 | if ((data[5] & 0x1f) | (data[6] & 0x1f) | (data[1] & 0x1f) | |
441 | data[2] | (data[3] & 0x1f) | data[4]) | 443 | data[2] | (data[3] & 0x1f) | data[4]) |
442 | wacom_report_key(wcombo, wacom->tool[1], 1); | 444 | wacom_report_key(wcombo, wacom->tool[1], 1); |
443 | else | 445 | else |
@@ -481,13 +483,11 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo) | |||
481 | if (data[1] & 0x02) { | 483 | if (data[1] & 0x02) { |
482 | /* Rotation packet */ | 484 | /* Rotation packet */ |
483 | if (wacom->features->type >= INTUOS3S) { | 485 | if (wacom->features->type >= INTUOS3S) { |
484 | /* I3 marker pen rotation reported as wheel | 486 | /* I3 marker pen rotation */ |
485 | * due to valuator limitation | ||
486 | */ | ||
487 | t = (data[6] << 3) | ((data[7] >> 5) & 7); | 487 | t = (data[6] << 3) | ((data[7] >> 5) & 7); |
488 | t = (data[7] & 0x20) ? ((t > 900) ? ((t-1) / 2 - 1350) : | 488 | t = (data[7] & 0x20) ? ((t > 900) ? ((t-1) / 2 - 1350) : |
489 | ((t-1) / 2 + 450)) : (450 - t / 2) ; | 489 | ((t-1) / 2 + 450)) : (450 - t / 2) ; |
490 | wacom_report_abs(wcombo, ABS_WHEEL, t); | 490 | wacom_report_abs(wcombo, ABS_Z, t); |
491 | } else { | 491 | } else { |
492 | /* 4D mouse rotation packet */ | 492 | /* 4D mouse rotation packet */ |
493 | t = (data[6] << 3) | ((data[7] >> 5) & 7); | 493 | t = (data[6] << 3) | ((data[7] >> 5) & 7); |
@@ -558,6 +558,7 @@ int wacom_wac_irq(struct wacom_wac *wacom_wac, void *wcombo) | |||
558 | case INTUOS3: | 558 | case INTUOS3: |
559 | case INTUOS3L: | 559 | case INTUOS3L: |
560 | case CINTIQ: | 560 | case CINTIQ: |
561 | case WACOM_BEE: | ||
561 | return (wacom_intuos_irq(wacom_wac, wcombo)); | 562 | return (wacom_intuos_irq(wacom_wac, wcombo)); |
562 | break; | 563 | break; |
563 | default: | 564 | default: |
@@ -577,6 +578,8 @@ void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_w | |||
577 | case GRAPHIRE: | 578 | case GRAPHIRE: |
578 | input_dev_g(input_dev, wacom_wac); | 579 | input_dev_g(input_dev, wacom_wac); |
579 | break; | 580 | break; |
581 | case WACOM_BEE: | ||
582 | input_dev_bee(input_dev, wacom_wac); | ||
580 | case INTUOS3: | 583 | case INTUOS3: |
581 | case INTUOS3L: | 584 | case INTUOS3L: |
582 | case CINTIQ: | 585 | case CINTIQ: |
@@ -607,12 +610,15 @@ static struct wacom_features wacom_features[] = { | |||
607 | { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 63, GRAPHIRE }, | 610 | { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 63, GRAPHIRE }, |
608 | { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 63, WACOM_G4 }, | 611 | { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 63, WACOM_G4 }, |
609 | { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 63, WACOM_G4 }, | 612 | { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 63, WACOM_G4 }, |
613 | { "Wacom BambooFun 4x5", 9, 14760, 9225, 511, 63, WACOM_MO }, | ||
614 | { "Wacom BambooFun 6x8", 9, 21648, 13530, 511, 63, WACOM_MO }, | ||
610 | { "Wacom Volito", 8, 5104, 3712, 511, 63, GRAPHIRE }, | 615 | { "Wacom Volito", 8, 5104, 3712, 511, 63, GRAPHIRE }, |
611 | { "Wacom PenStation2", 8, 3250, 2320, 255, 63, GRAPHIRE }, | 616 | { "Wacom PenStation2", 8, 3250, 2320, 255, 63, GRAPHIRE }, |
612 | { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 63, GRAPHIRE }, | 617 | { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 63, GRAPHIRE }, |
613 | { "Wacom Volito2 2x3", 8, 3248, 2320, 511, 63, GRAPHIRE }, | 618 | { "Wacom Volito2 2x3", 8, 3248, 2320, 511, 63, GRAPHIRE }, |
614 | { "Wacom PenPartner2", 8, 3250, 2320, 255, 63, GRAPHIRE }, | 619 | { "Wacom PenPartner2", 8, 3250, 2320, 511, 63, GRAPHIRE }, |
615 | { "Wacom Bamboo", 9, 14760, 9225, 511, 63, WACOM_MO }, | 620 | { "Wacom Bamboo", 9, 14760, 9225, 511, 63, WACOM_MO }, |
621 | { "Wacom Bamboo1", 8, 5104, 3712, 511, 63, GRAPHIRE }, | ||
616 | { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 31, INTUOS }, | 622 | { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 31, INTUOS }, |
617 | { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, | 623 | { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, |
618 | { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 31, INTUOS }, | 624 | { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 31, INTUOS }, |
@@ -643,6 +649,7 @@ static struct wacom_features wacom_features[] = { | |||
643 | { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 63, INTUOS3 }, | 649 | { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 63, INTUOS3 }, |
644 | { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 63, INTUOS3S }, | 650 | { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 63, INTUOS3S }, |
645 | { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 63, CINTIQ }, | 651 | { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 63, CINTIQ }, |
652 | { "Wacom Cintiq 12WX", 10, 53020, 33440, 1023, 63, WACOM_BEE }, | ||
646 | { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, | 653 | { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, |
647 | { } | 654 | { } |
648 | }; | 655 | }; |
@@ -656,12 +663,15 @@ static struct usb_device_id wacom_ids[] = { | |||
656 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x14) }, | 663 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x14) }, |
657 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x15) }, | 664 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x15) }, |
658 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16) }, | 665 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16) }, |
666 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x17) }, | ||
667 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x18) }, | ||
659 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x60) }, | 668 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x60) }, |
660 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x61) }, | 669 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x61) }, |
661 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62) }, | 670 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62) }, |
662 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x63) }, | 671 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x63) }, |
663 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x64) }, | 672 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x64) }, |
664 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x65) }, | 673 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x65) }, |
674 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x69) }, | ||
665 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20) }, | 675 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20) }, |
666 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21) }, | 676 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21) }, |
667 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22) }, | 677 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22) }, |
@@ -692,6 +702,7 @@ static struct usb_device_id wacom_ids[] = { | |||
692 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB5) }, | 702 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB5) }, |
693 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB7) }, | 703 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB7) }, |
694 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x3F) }, | 704 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x3F) }, |
705 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC6) }, | ||
695 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x47) }, | 706 | { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x47) }, |
696 | { } | 707 | { } |
697 | }; | 708 | }; |