aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorPing Cheng <pingc@wacom.com>2010-06-22 14:21:34 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-06-22 14:32:24 -0400
commit493630b20389b66dc475eb05cfefd33ad98d3741 (patch)
tree8663e388c438f5f196a966ea63a0f9ea5bd3954d /drivers/input
parent0b28bac5aef7bd1ab213723df031e61db9ff151a (diff)
Input: wacom - fix serial number handling on Cintiq 21UX2
Cintiq 21UX2 added 8 more bits for the tool serial number and more buttons for the expresskey. We did not enable them properly in the last patch. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/tablet/wacom_wac.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index d564af58175c..415f6306105d 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -284,12 +284,13 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
284 (data[4] << 20) + (data[5] << 12) + 284 (data[4] << 20) + (data[5] << 12) +
285 (data[6] << 4) + (data[7] >> 4); 285 (data[6] << 4) + (data[7] >> 4);
286 286
287 wacom->id[idx] = (data[2] << 4) | (data[3] >> 4); 287 wacom->id[idx] = (data[2] << 4) | (data[3] >> 4) |
288 ((data[7] & 0x0f) << 20) | ((data[8] & 0xf0) << 12);
288 289
289 switch (wacom->id[idx]) { 290 switch (wacom->id[idx] & 0xfffff) {
290 case 0x812: /* Inking pen */ 291 case 0x812: /* Inking pen */
291 case 0x801: /* Intuos3 Inking pen */ 292 case 0x801: /* Intuos3 Inking pen */
292 case 0x20802: /* Intuos4 Classic Pen */ 293 case 0x20802: /* Intuos4 Inking Pen */
293 case 0x012: 294 case 0x012:
294 wacom->tool[idx] = BTN_TOOL_PENCIL; 295 wacom->tool[idx] = BTN_TOOL_PENCIL;
295 break; 296 break;
@@ -513,7 +514,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
513 input_report_abs(input, ABS_RX, ((data[1] & 0x1f) << 8) | data[2]); 514 input_report_abs(input, ABS_RX, ((data[1] & 0x1f) << 8) | data[2]);
514 input_report_abs(input, ABS_RY, ((data[3] & 0x1f) << 8) | data[4]); 515 input_report_abs(input, ABS_RY, ((data[3] & 0x1f) << 8) | data[4]);
515 516
516 if ((data[5] & 0x1f) | (data[6] & 0x1f) | (data[1] & 0x1f) | 517 if ((data[5] & 0x1f) | data[6] | (data[1] & 0x1f) |
517 data[2] | (data[3] & 0x1f) | data[4] | data[8] | 518 data[2] | (data[3] & 0x1f) | data[4] | data[8] |
518 (data[7] & 0x01)) { 519 (data[7] & 0x01)) {
519 input_report_key(input, wacom->tool[1], 1); 520 input_report_key(input, wacom->tool[1], 1);