diff options
author | Ping Cheng <pingc@wacom.com> | 2006-12-05 20:09:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-20 13:14:26 -0500 |
commit | 071e0a2aee9c289f50b9329d0c26474ca94f7c7a (patch) | |
tree | 73fae1129a3fa4c2f99dcf46b481ef02adbb569d /drivers/usb/input | |
parent | ab1958905514da3b6c06d61523ebed142a16cc72 (diff) |
USB: fix Wacom Intuos3 4x6 bugs
Fixes Intuos3 4x6 bugs
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/input')
-rw-r--r-- | drivers/usb/input/wacom_sys.c | 4 | ||||
-rw-r--r-- | drivers/usb/input/wacom_wac.c | 26 |
2 files changed, 16 insertions, 14 deletions
diff --git a/drivers/usb/input/wacom_sys.c b/drivers/usb/input/wacom_sys.c index e7cc20ab8155..12b42746ded8 100644 --- a/drivers/usb/input/wacom_sys.c +++ b/drivers/usb/input/wacom_sys.c | |||
@@ -159,13 +159,13 @@ void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | |||
159 | { | 159 | { |
160 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER); | 160 | input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER); |
161 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3); | 161 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3); |
162 | input_set_abs_params(input_dev, ABS_RX, 0, 4097, 0, 0); | 162 | input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0); |
163 | } | 163 | } |
164 | 164 | ||
165 | void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 165 | void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
166 | { | 166 | { |
167 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7); | 167 | input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7); |
168 | input_set_abs_params(input_dev, ABS_RY, 0, 4097, 0, 0); | 168 | input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0); |
169 | } | 169 | } |
170 | 170 | ||
171 | void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac) | 171 | void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac) |
diff --git a/drivers/usb/input/wacom_wac.c b/drivers/usb/input/wacom_wac.c index 92726fe89379..4142e36730fc 100644 --- a/drivers/usb/input/wacom_wac.c +++ b/drivers/usb/input/wacom_wac.c | |||
@@ -209,13 +209,15 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) | |||
209 | wacom_report_key(wcombo, BTN_STYLUS, data[1] & 0x02); | 209 | wacom_report_key(wcombo, BTN_STYLUS, data[1] & 0x02); |
210 | wacom_report_key(wcombo, BTN_STYLUS2, data[1] & 0x04); | 210 | wacom_report_key(wcombo, BTN_STYLUS2, data[1] & 0x04); |
211 | } | 211 | } |
212 | } | ||
213 | |||
214 | if (data[1] & 0x10) | ||
215 | wacom_report_abs(wcombo, ABS_MISC, id); /* report tool id */ | 212 | wacom_report_abs(wcombo, ABS_MISC, id); /* report tool id */ |
213 | } | ||
216 | else | 214 | else |
217 | wacom_report_abs(wcombo, ABS_MISC, 0); /* reset tool id */ | 215 | wacom_report_abs(wcombo, ABS_MISC, 0); /* reset tool id */ |
218 | wacom_report_key(wcombo, wacom->tool[0], data[1] & 0x10); | 216 | |
217 | if (data[1] & 0x10) /* only report prox-in when in area */ | ||
218 | wacom_report_key(wcombo, wacom->tool[0], 1); | ||
219 | if (!(data[1] & 0x90)) /* report prox-out when physically out */ | ||
220 | wacom_report_key(wcombo, wacom->tool[0], 0); | ||
219 | wacom_input_sync(wcombo); | 221 | wacom_input_sync(wcombo); |
220 | 222 | ||
221 | /* send pad data */ | 223 | /* send pad data */ |
@@ -405,7 +407,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo) | |||
405 | if ((wacom->features->type == CINTIQ) && !(data[1] & 0x40)) | 407 | if ((wacom->features->type == CINTIQ) && !(data[1] & 0x40)) |
406 | return 0; | 408 | return 0; |
407 | 409 | ||
408 | if (wacom->features->type >= INTUOS3) { | 410 | if (wacom->features->type >= INTUOS3S) { |
409 | wacom_report_abs(wcombo, ABS_X, (data[2] << 9) | (data[3] << 1) | ((data[9] >> 1) & 1)); | 411 | 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)); | 412 | 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_DISTANCE, ((data[9] >> 2) & 0x3f)); |
@@ -423,7 +425,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo) | |||
423 | 425 | ||
424 | if (data[1] & 0x02) { | 426 | if (data[1] & 0x02) { |
425 | /* Rotation packet */ | 427 | /* Rotation packet */ |
426 | if (wacom->features->type >= INTUOS3) { | 428 | if (wacom->features->type >= INTUOS3S) { |
427 | /* I3 marker pen rotation reported as wheel | 429 | /* I3 marker pen rotation reported as wheel |
428 | * due to valuator limitation | 430 | * due to valuator limitation |
429 | */ | 431 | */ |
@@ -547,11 +549,11 @@ static struct wacom_features wacom_features[] = { | |||
547 | { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 63, GRAPHIRE }, | 549 | { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 63, GRAPHIRE }, |
548 | { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 63, WACOM_G4 }, | 550 | { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 63, WACOM_G4 }, |
549 | { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 63, WACOM_G4 }, | 551 | { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 63, WACOM_G4 }, |
550 | { "Wacom Volito", 8, 5104, 3712, 511, 0, GRAPHIRE }, | 552 | { "Wacom Volito", 8, 5104, 3712, 511, 63, GRAPHIRE }, |
551 | { "Wacom PenStation2", 8, 3250, 2320, 255, 0, GRAPHIRE }, | 553 | { "Wacom PenStation2", 8, 3250, 2320, 255, 63, GRAPHIRE }, |
552 | { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 0, GRAPHIRE }, | 554 | { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 63, GRAPHIRE }, |
553 | { "Wacom Volito2 2x3", 8, 3248, 2320, 511, 0, GRAPHIRE }, | 555 | { "Wacom Volito2 2x3", 8, 3248, 2320, 511, 63, GRAPHIRE }, |
554 | { "Wacom PenPartner2", 8, 3250, 2320, 255, 0, GRAPHIRE }, | 556 | { "Wacom PenPartner2", 8, 3250, 2320, 255, 63, GRAPHIRE }, |
555 | { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 63, INTUOS }, | 557 | { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 63, INTUOS }, |
556 | { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 63, INTUOS }, | 558 | { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 63, INTUOS }, |
557 | { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 63, INTUOS }, | 559 | { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 63, INTUOS }, |
@@ -580,7 +582,7 @@ static struct wacom_features wacom_features[] = { | |||
580 | { "Wacom Intuos3 12x12", 10, 60960, 60960, 1023, 63, INTUOS3L }, | 582 | { "Wacom Intuos3 12x12", 10, 60960, 60960, 1023, 63, INTUOS3L }, |
581 | { "Wacom Intuos3 12x19", 10, 97536, 60960, 1023, 63, INTUOS3L }, | 583 | { "Wacom Intuos3 12x19", 10, 97536, 60960, 1023, 63, INTUOS3L }, |
582 | { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 63, INTUOS3 }, | 584 | { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 63, INTUOS3 }, |
583 | { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 15, INTUOS3S }, | 585 | { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 63, INTUOS3S }, |
584 | { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 63, CINTIQ }, | 586 | { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 63, CINTIQ }, |
585 | { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 63, INTUOS }, | 587 | { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 63, INTUOS }, |
586 | { } | 588 | { } |