aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/tablet/wacom.h6
-rw-r--r--drivers/input/tablet/wacom_sys.c6
-rw-r--r--drivers/input/tablet/wacom_wac.c31
-rw-r--r--drivers/input/tablet/wacom_wac.h1
4 files changed, 32 insertions, 12 deletions
diff --git a/drivers/input/tablet/wacom.h b/drivers/input/tablet/wacom.h
index 6542edb6f76e..acf9830698cb 100644
--- a/drivers/input/tablet/wacom.h
+++ b/drivers/input/tablet/wacom.h
@@ -11,7 +11,7 @@
11 * Copyright (c) 2000 Daniel Egger <egger@suse.de> 11 * Copyright (c) 2000 Daniel Egger <egger@suse.de>
12 * Copyright (c) 2001 Frederic Lepied <flepied@mandrakesoft.com> 12 * Copyright (c) 2001 Frederic Lepied <flepied@mandrakesoft.com>
13 * Copyright (c) 2004 Panagiotis Issaris <panagiotis.issaris@mech.kuleuven.ac.be> 13 * Copyright (c) 2004 Panagiotis Issaris <panagiotis.issaris@mech.kuleuven.ac.be>
14 * Copyright (c) 2002-2007 Ping Cheng <pingc@wacom.com> 14 * Copyright (c) 2002-2008 Ping Cheng <pingc@wacom.com>
15 * 15 *
16 * ChangeLog: 16 * ChangeLog:
17 * v0.1 (vp) - Initial release 17 * v0.1 (vp) - Initial release
@@ -65,6 +65,7 @@
65 * - and wacom_wac.c deals with Wacom specific code 65 * - and wacom_wac.c deals with Wacom specific code
66 * - Support Intuos3 4x6 66 * - Support Intuos3 4x6
67 * v1.47 (pc) - Added support for Bamboo 67 * v1.47 (pc) - Added support for Bamboo
68 * v1.48 (pc) - Added support for Bamboo1, BambooFun, and Cintiq 12WX
68 */ 69 */
69 70
70/* 71/*
@@ -85,7 +86,7 @@
85/* 86/*
86 * Version Information 87 * Version Information
87 */ 88 */
88#define DRIVER_VERSION "v1.47" 89#define DRIVER_VERSION "v1.48"
89#define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>" 90#define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>"
90#define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver" 91#define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver"
91#define DRIVER_LICENSE "GPL" 92#define DRIVER_LICENSE "GPL"
@@ -125,6 +126,7 @@ extern void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac
125extern void input_dev_pl(struct input_dev *input_dev, struct wacom_wac *wacom_wac); 126extern void input_dev_pl(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
126extern void input_dev_pt(struct input_dev *input_dev, struct wacom_wac *wacom_wac); 127extern void input_dev_pt(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
127extern void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac); 128extern void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
129extern void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
128extern __u16 wacom_le16_to_cpu(unsigned char *data); 130extern __u16 wacom_le16_to_cpu(unsigned char *data);
129extern __u16 wacom_be16_to_cpu(unsigned char *data); 131extern __u16 wacom_be16_to_cpu(unsigned char *data);
130extern struct wacom_features * get_wacom_feature(const struct usb_device_id *id); 132extern struct wacom_features * get_wacom_feature(const struct usb_device_id *id);
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index d64b1ea136b3..41caaef8e2d7 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -171,6 +171,7 @@ void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
171 input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_0) | 171 input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_0) |
172 BIT_MASK(BTN_1) | BIT_MASK(BTN_2) | BIT_MASK(BTN_3); 172 BIT_MASK(BTN_1) | BIT_MASK(BTN_2) | BIT_MASK(BTN_3);
173 input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); 173 input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
174 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0);
174} 175}
175 176
176void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac) 177void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
@@ -180,6 +181,11 @@ void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
180 input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); 181 input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
181} 182}
182 183
184void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
185{
186 input_dev->keybit[BIT_WORD(BTN_LEFT)] |= BIT_MASK(BTN_8) | BIT_MASK(BTN_9);
187}
188
183void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac) 189void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
184{ 190{
185 input_dev->evbit[0] |= BIT_MASK(EV_MSC) | BIT_MASK(EV_REL); 191 input_dev->evbit[0] |= BIT_MASK(EV_MSC) | BIT_MASK(EV_REL);
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};
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
index a302e229bb8a..3342bc05847d 100644
--- a/drivers/input/tablet/wacom_wac.h
+++ b/drivers/input/tablet/wacom_wac.h
@@ -25,6 +25,7 @@ enum {
25 INTUOS3, 25 INTUOS3,
26 INTUOS3L, 26 INTUOS3L,
27 CINTIQ, 27 CINTIQ,
28 WACOM_BEE,
28 WACOM_MO, 29 WACOM_MO,
29 MAX_TYPE 30 MAX_TYPE
30}; 31};