Skip to content

Commit f0aacea

Browse files
Pinglinuxdtor
authored andcommitted
Input: wacom - add a few new styli for Cintiq series
Add new styli for Cintiq 13HD and 22HD. Update comments for for tools. Check whole 10 nibbles of tool ID for tool types. Remove unuecessary tool type for Intuos series PAD. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 5621856 commit f0aacea

1 file changed

Lines changed: 17 additions & 19 deletions

File tree

‎drivers/input/tablet/wacom_wac.c‎

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,10 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
342342
wacom->id[idx] = (data[2] << 4) | (data[3] >> 4) |
343343
((data[7] & 0x0f) << 20) | ((data[8] & 0xf0) << 12);
344344

345-
switch (wacom->id[idx] & 0xfffff) {
345+
switch (wacom->id[idx]) {
346346
case 0x812: /* Inking pen */
347347
case 0x801: /* Intuos3 Inking pen */
348-
case 0x20802: /* Intuos4 Inking Pen */
348+
case 0x120802: /* Intuos4/5 Inking Pen */
349349
case 0x012:
350350
wacom->tool[idx] = BTN_TOOL_PENCIL;
351351
break;
@@ -356,11 +356,13 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
356356
case 0x823: /* Intuos3 Grip Pen */
357357
case 0x813: /* Intuos3 Classic Pen */
358358
case 0x885: /* Intuos3 Marker Pen */
359-
case 0x802: /* Intuos4 General Pen */
360-
case 0x804: /* Intuos4 Marker Pen */
361-
case 0x40802: /* Intuos4 Classic Pen */
362-
case 0x18802: /* DTH2242 Grip Pen */
359+
case 0x802: /* Intuos4/5 13HD/24HD General Pen */
360+
case 0x804: /* Intuos4/5 13HD/24HD Marker Pen */
363361
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 */
364366
wacom->tool[idx] = BTN_TOOL_PEN;
365367
break;
366368

@@ -391,18 +393,22 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
391393
case 0x82b: /* Intuos3 Grip Pen Eraser */
392394
case 0x81b: /* Intuos3 Classic Pen Eraser */
393395
case 0x91b: /* Intuos3 Airbrush Eraser */
394-
case 0x80c: /* Intuos4 Marker Pen Eraser */
395-
case 0x80a: /* Intuos4 General Pen Eraser */
396-
case 0x4080a: /* Intuos4 Classic Pen Eraser */
397-
case 0x90a: /* Intuos4 Airbrush Eraser */
396+
case 0x80c: /* Intuos4/5 13HD/24HD Marker Pen Eraser */
397+
case 0x80a: /* Intuos4/5 13HD/24HD General Pen Eraser */
398+
case 0x90a: /* Intuos4/5 13HD/24HD 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 */
398403
wacom->tool[idx] = BTN_TOOL_RUBBER;
399404
break;
400405

401406
case 0xd12:
402407
case 0x912:
403408
case 0x112:
404409
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 */
406412
wacom->tool[idx] = BTN_TOOL_AIRBRUSH;
407413
break;
408414

@@ -533,10 +539,8 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
533539
input_report_key(input, BTN_8, (data[3] & 0x80));
534540
}
535541
if (data[1] | (data[2] & 0x01) | data[3]) {
536-
input_report_key(input, wacom->tool[1], 1);
537542
input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
538543
} else {
539-
input_report_key(input, wacom->tool[1], 0);
540544
input_report_abs(input, ABS_MISC, 0);
541545
}
542546
} else if (features->type == DTK) {
@@ -600,10 +604,8 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
600604
}
601605

602606
if (data[1] | data[2] | (data[3] & 0x1f) | data[4] | data[6] | data[8]) {
603-
input_report_key(input, wacom->tool[1], 1);
604607
input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
605608
} else {
606-
input_report_key(input, wacom->tool[1], 0);
607609
input_report_abs(input, ABS_MISC, 0);
608610
}
609611
} else if (features->type >= INTUOS5S && features->type <= INTUOS5L) {
@@ -628,10 +630,8 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
628630
}
629631

630632
if (data[2] | (data[3] & 0x01) | data[4] | data[5]) {
631-
input_report_key(input, wacom->tool[1], 1);
632633
input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
633634
} else {
634-
input_report_key(input, wacom->tool[1], 0);
635635
input_report_abs(input, ABS_MISC, 0);
636636
}
637637
} else {
@@ -678,10 +678,8 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
678678
if ((data[5] & 0x1f) | data[6] | (data[1] & 0x1f) |
679679
data[2] | (data[3] & 0x1f) | data[4] | data[8] |
680680
(data[7] & 0x01)) {
681-
input_report_key(input, wacom->tool[1], 1);
682681
input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
683682
} else {
684-
input_report_key(input, wacom->tool[1], 0);
685683
input_report_abs(input, ABS_MISC, 0);
686684
}
687685
}

0 commit comments

Comments
 (0)