aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/tablet/wacom_wac.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index afe4fe0a9060..3b6998a27a3f 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -342,10 +342,10 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
342 wacom->id[idx] = (data[2] << 4) | (data[3] >> 4) | 342 wacom->id[idx] = (data[2] << 4) | (data[3] >> 4) |
343 ((data[7] & 0x0f) << 20) | ((data[8] & 0xf0) << 12); 343 ((data[7] & 0x0f) << 20) | ((data[8] & 0xf0) << 12);
344 344
345 switch (wacom->id[idx] & 0xfffff) { 345 switch (wacom->id[idx]) {
346 case 0x812: /* Inking pen */ 346 case 0x812: /* Inking pen */
347 case 0x801: /* Intuos3 Inking pen */ 347 case 0x801: /* Intuos3 Inking pen */
348 case 0x20802: /* Intuos4 Inking Pen */ 348 case 0x120802: /* Intuos4/5 Inking Pen */
349 case 0x012: 349 case 0x012:
350 wacom->tool[idx] = BTN_TOOL_PENCIL; 350 wacom->tool[idx] = BTN_TOOL_PENCIL;
351 break; 351 break;
@@ -356,11 +356,13 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
356 case 0x823: /* Intuos3 Grip Pen */ 356 case 0x823: /* Intuos3 Grip Pen */
357 case 0x813: /* Intuos3 Classic Pen */ 357 case 0x813: /* Intuos3 Classic Pen */
358 case 0x885: /* Intuos3 Marker Pen */ 358 case 0x885: /* Intuos3 Marker Pen */
359 case 0x802: /* Intuos4 General Pen */ 359 case 0x802: /* Intuos4/5 13HD/24HD General Pen */
360 case 0x804: /* Intuos4 Marker Pen */ 360 case 0x804: /* Intuos4/5 13HD/24HD Marker Pen */
361 case 0x40802: /* Intuos4 Classic Pen */
362 case 0x18802: /* DTH2242 Grip Pen */
363 case 0x022: 361 case 0x022:
362 case 0x100804: /* Intuos4/5 13HD/24HD Art Pen */
363 case 0x140802: /* Intuos4/5 13HD/24HD Classic Pen */
364 case 0x160802: /* Cintiq 13HD Pro Pen */
365 case 0x180802: /* DTH2242 Grip Pen */
364 wacom->tool[idx] = BTN_TOOL_PEN; 366 wacom->tool[idx] = BTN_TOOL_PEN;
365 break; 367 break;
366 368
@@ -391,10 +393,13 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
391 case 0x82b: /* Intuos3 Grip Pen Eraser */ 393 case 0x82b: /* Intuos3 Grip Pen Eraser */
392 case 0x81b: /* Intuos3 Classic Pen Eraser */ 394 case 0x81b: /* Intuos3 Classic Pen Eraser */
393 case 0x91b: /* Intuos3 Airbrush Eraser */ 395 case 0x91b: /* Intuos3 Airbrush Eraser */
394 case 0x80c: /* Intuos4 Marker Pen Eraser */ 396 case 0x80c: /* Intuos4/5 13HD/24HD Marker Pen Eraser */
395 case 0x80a: /* Intuos4 General Pen Eraser */ 397 case 0x80a: /* Intuos4/5 13HD/24HD General Pen Eraser */
396 case 0x4080a: /* Intuos4 Classic Pen Eraser */ 398 case 0x90a: /* Intuos4/5 13HD/24HD Airbrush Eraser */
397 case 0x90a: /* Intuos4 Airbrush Eraser */ 399 case 0x14080a: /* Intuos4/5 13HD/24HD Classic Pen Eraser */
400 case 0x10090a: /* Intuos4/5 13HD/24HD Airbrush Eraser */
401 case 0x10080c: /* Intuos4/5 13HD/24HD Art Pen Eraser */
402 case 0x16080a: /* Cintiq 13HD Pro Pen Eraser */
398 wacom->tool[idx] = BTN_TOOL_RUBBER; 403 wacom->tool[idx] = BTN_TOOL_RUBBER;
399 break; 404 break;
400 405
@@ -402,7 +407,8 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
402 case 0x912: 407 case 0x912:
403 case 0x112: 408 case 0x112:
404 case 0x913: /* Intuos3 Airbrush */ 409 case 0x913: /* Intuos3 Airbrush */
405 case 0x902: /* Intuos4 Airbrush */ 410 case 0x902: /* Intuos4/5 13HD/24HD Airbrush */
411 case 0x100902: /* Intuos4/5 13HD/24HD Airbrush */
406 wacom->tool[idx] = BTN_TOOL_AIRBRUSH; 412 wacom->tool[idx] = BTN_TOOL_AIRBRUSH;
407 break; 413 break;
408 414
@@ -533,10 +539,8 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
533 input_report_key(input, BTN_8, (data[3] & 0x80)); 539 input_report_key(input, BTN_8, (data[3] & 0x80));
534 } 540 }
535 if (data[1] | (data[2] & 0x01) | data[3]) { 541 if (data[1] | (data[2] & 0x01) | data[3]) {
536 input_report_key(input, wacom->tool[1], 1);
537 input_report_abs(input, ABS_MISC, PAD_DEVICE_ID); 542 input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
538 } else { 543 } else {
539 input_report_key(input, wacom->tool[1], 0);
540 input_report_abs(input, ABS_MISC, 0); 544 input_report_abs(input, ABS_MISC, 0);
541 } 545 }
542 } else if (features->type == DTK) { 546 } else if (features->type == DTK) {
@@ -600,10 +604,8 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
600 } 604 }
601 605
602 if (data[1] | data[2] | (data[3] & 0x1f) | data[4] | data[6] | data[8]) { 606 if (data[1] | data[2] | (data[3] & 0x1f) | data[4] | data[6] | data[8]) {
603 input_report_key(input, wacom->tool[1], 1);
604 input_report_abs(input, ABS_MISC, PAD_DEVICE_ID); 607 input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
605 } else { 608 } else {
606 input_report_key(input, wacom->tool[1], 0);
607 input_report_abs(input, ABS_MISC, 0); 609 input_report_abs(input, ABS_MISC, 0);
608 } 610 }
609 } else if (features->type >= INTUOS5S && features->type <= INTUOS5L) { 611 } else if (features->type >= INTUOS5S && features->type <= INTUOS5L) {
@@ -628,10 +630,8 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
628 } 630 }
629 631
630 if (data[2] | (data[3] & 0x01) | data[4] | data[5]) { 632 if (data[2] | (data[3] & 0x01) | data[4] | data[5]) {
631 input_report_key(input, wacom->tool[1], 1);
632 input_report_abs(input, ABS_MISC, PAD_DEVICE_ID); 633 input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
633 } else { 634 } else {
634 input_report_key(input, wacom->tool[1], 0);
635 input_report_abs(input, ABS_MISC, 0); 635 input_report_abs(input, ABS_MISC, 0);
636 } 636 }
637 } else { 637 } else {
@@ -678,10 +678,8 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
678 if ((data[5] & 0x1f) | data[6] | (data[1] & 0x1f) | 678 if ((data[5] & 0x1f) | data[6] | (data[1] & 0x1f) |
679 data[2] | (data[3] & 0x1f) | data[4] | data[8] | 679 data[2] | (data[3] & 0x1f) | data[4] | data[8] |
680 (data[7] & 0x01)) { 680 (data[7] & 0x01)) {
681 input_report_key(input, wacom->tool[1], 1);
682 input_report_abs(input, ABS_MISC, PAD_DEVICE_ID); 681 input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
683 } else { 682 } else {
684 input_report_key(input, wacom->tool[1], 0);
685 input_report_abs(input, ABS_MISC, 0); 683 input_report_abs(input, ABS_MISC, 0);
686 } 684 }
687 } 685 }