diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 19 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 20 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.h | 3 |
3 files changed, 41 insertions, 1 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 611fc3905d00..2c613cd41dd6 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -349,6 +349,7 @@ static int wacom_parse_hid(struct usb_interface *intf, | |||
349 | break; | 349 | break; |
350 | 350 | ||
351 | case MTTPC: | 351 | case MTTPC: |
352 | case MTTPC_B: | ||
352 | features->pktlen = WACOM_PKGLEN_MTTPC; | 353 | features->pktlen = WACOM_PKGLEN_MTTPC; |
353 | break; | 354 | break; |
354 | 355 | ||
@@ -380,6 +381,16 @@ static int wacom_parse_hid(struct usb_interface *intf, | |||
380 | i += 12; | 381 | i += 12; |
381 | break; | 382 | break; |
382 | 383 | ||
384 | case MTTPC_B: | ||
385 | features->x_max = | ||
386 | get_unaligned_le16(&report[i + 3]); | ||
387 | features->x_phy = | ||
388 | get_unaligned_le16(&report[i + 6]); | ||
389 | features->unit = report[i - 5]; | ||
390 | features->unitExpo = report[i - 3]; | ||
391 | i += 9; | ||
392 | break; | ||
393 | |||
383 | default: | 394 | default: |
384 | features->x_max = | 395 | features->x_max = |
385 | get_unaligned_le16(&report[i + 3]); | 396 | get_unaligned_le16(&report[i + 3]); |
@@ -430,6 +441,14 @@ static int wacom_parse_hid(struct usb_interface *intf, | |||
430 | i += 12; | 441 | i += 12; |
431 | break; | 442 | break; |
432 | 443 | ||
444 | case MTTPC_B: | ||
445 | features->y_max = | ||
446 | get_unaligned_le16(&report[i + 3]); | ||
447 | features->y_phy = | ||
448 | get_unaligned_le16(&report[i + 6]); | ||
449 | i += 9; | ||
450 | break; | ||
451 | |||
433 | default: | 452 | default: |
434 | features->y_max = | 453 | features->y_max = |
435 | features->x_max; | 454 | features->x_max; |
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index f1430d825e43..24c0733cf7e5 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -962,7 +962,7 @@ static int wacom_mt_touch(struct wacom_wac *wacom) | |||
962 | int x_offset = 0; | 962 | int x_offset = 0; |
963 | 963 | ||
964 | /* MTTPC does not support Height and Width */ | 964 | /* MTTPC does not support Height and Width */ |
965 | if (wacom->features.type == MTTPC) | 965 | if (wacom->features.type == MTTPC || wacom->features.type == MTTPC_B) |
966 | x_offset = -4; | 966 | x_offset = -4; |
967 | 967 | ||
968 | /* | 968 | /* |
@@ -1114,6 +1114,9 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len) | |||
1114 | case WACOM_PKGLEN_TPC2FG: | 1114 | case WACOM_PKGLEN_TPC2FG: |
1115 | return wacom_tpc_mt_touch(wacom); | 1115 | return wacom_tpc_mt_touch(wacom); |
1116 | 1116 | ||
1117 | case WACOM_PKGLEN_PENABLED: | ||
1118 | return wacom_tpc_pen(wacom); | ||
1119 | |||
1117 | default: | 1120 | default: |
1118 | switch (data[0]) { | 1121 | switch (data[0]) { |
1119 | case WACOM_REPORT_TPC1FG: | 1122 | case WACOM_REPORT_TPC1FG: |
@@ -1123,6 +1126,7 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len) | |||
1123 | return wacom_tpc_single_touch(wacom, len); | 1126 | return wacom_tpc_single_touch(wacom, len); |
1124 | 1127 | ||
1125 | case WACOM_REPORT_TPCMT: | 1128 | case WACOM_REPORT_TPCMT: |
1129 | case WACOM_REPORT_TPCMT2: | ||
1126 | return wacom_mt_touch(wacom); | 1130 | return wacom_mt_touch(wacom); |
1127 | 1131 | ||
1128 | case WACOM_REPORT_PENABLED: | 1132 | case WACOM_REPORT_PENABLED: |
@@ -1465,6 +1469,7 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len) | |||
1465 | case TABLETPC2FG: | 1469 | case TABLETPC2FG: |
1466 | case MTSCREEN: | 1470 | case MTSCREEN: |
1467 | case MTTPC: | 1471 | case MTTPC: |
1472 | case MTTPC_B: | ||
1468 | sync = wacom_tpc_irq(wacom_wac, len); | 1473 | sync = wacom_tpc_irq(wacom_wac, len); |
1469 | break; | 1474 | break; |
1470 | 1475 | ||
@@ -1806,6 +1811,7 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
1806 | 1811 | ||
1807 | case MTSCREEN: | 1812 | case MTSCREEN: |
1808 | case MTTPC: | 1813 | case MTTPC: |
1814 | case MTTPC_B: | ||
1809 | case TABLETPC2FG: | 1815 | case TABLETPC2FG: |
1810 | if (features->device_type == BTN_TOOL_FINGER) { | 1816 | if (features->device_type == BTN_TOOL_FINGER) { |
1811 | unsigned int flags = INPUT_MT_DIRECT; | 1817 | unsigned int flags = INPUT_MT_DIRECT; |
@@ -2243,6 +2249,15 @@ static const struct wacom_features wacom_features_0x116 = | |||
2243 | static const struct wacom_features wacom_features_0x4001 = | 2249 | static const struct wacom_features wacom_features_0x4001 = |
2244 | { "Wacom ISDv4 4001", WACOM_PKGLEN_MTTPC, 26202, 16325, 255, | 2250 | { "Wacom ISDv4 4001", WACOM_PKGLEN_MTTPC, 26202, 16325, 255, |
2245 | 0, MTTPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | 2251 | 0, MTTPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
2252 | static const struct wacom_features wacom_features_0x4004 = | ||
2253 | { "Wacom ISDv4 4004", WACOM_PKGLEN_MTTPC, 11060, 6220, 255, | ||
2254 | 0, MTTPC_B, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
2255 | static const struct wacom_features wacom_features_0x5000 = | ||
2256 | { "Wacom ISDv4 5000", WACOM_PKGLEN_MTTPC, 27848, 15752, 1023, | ||
2257 | 0, MTTPC_B, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
2258 | static const struct wacom_features wacom_features_0x5002 = | ||
2259 | { "Wacom ISDv4 5002", WACOM_PKGLEN_MTTPC, 29576, 16724, 1023, | ||
2260 | 0, MTTPC_B, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
2246 | static const struct wacom_features wacom_features_0x47 = | 2261 | static const struct wacom_features wacom_features_0x47 = |
2247 | { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, | 2262 | { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, |
2248 | 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | 2263 | 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
@@ -2465,6 +2480,9 @@ const struct usb_device_id wacom_ids[] = { | |||
2465 | { USB_DEVICE_DETAILED(0x315, USB_CLASS_HID, 0, 0) }, | 2480 | { USB_DEVICE_DETAILED(0x315, USB_CLASS_HID, 0, 0) }, |
2466 | { USB_DEVICE_DETAILED(0x317, USB_CLASS_HID, 0, 0) }, | 2481 | { USB_DEVICE_DETAILED(0x317, USB_CLASS_HID, 0, 0) }, |
2467 | { USB_DEVICE_WACOM(0x4001) }, | 2482 | { USB_DEVICE_WACOM(0x4001) }, |
2483 | { USB_DEVICE_WACOM(0x4004) }, | ||
2484 | { USB_DEVICE_WACOM(0x5000) }, | ||
2485 | { USB_DEVICE_WACOM(0x5002) }, | ||
2468 | { USB_DEVICE_WACOM(0x47) }, | 2486 | { USB_DEVICE_WACOM(0x47) }, |
2469 | { USB_DEVICE_WACOM(0xF4) }, | 2487 | { USB_DEVICE_WACOM(0xF4) }, |
2470 | { USB_DEVICE_WACOM(0xF8) }, | 2488 | { USB_DEVICE_WACOM(0xF8) }, |
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index a066dc00989f..29774cae7da1 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #define WACOM_PKGLEN_MTOUCH 62 | 31 | #define WACOM_PKGLEN_MTOUCH 62 |
32 | #define WACOM_PKGLEN_MTTPC 40 | 32 | #define WACOM_PKGLEN_MTTPC 40 |
33 | #define WACOM_PKGLEN_DTUS 68 | 33 | #define WACOM_PKGLEN_DTUS 68 |
34 | #define WACOM_PKGLEN_PENABLED 8 | ||
34 | 35 | ||
35 | /* wacom data size per MT contact */ | 36 | /* wacom data size per MT contact */ |
36 | #define WACOM_BYTES_PER_MT_PACKET 11 | 37 | #define WACOM_BYTES_PER_MT_PACKET 11 |
@@ -53,6 +54,7 @@ | |||
53 | #define WACOM_REPORT_TPC1FG 6 | 54 | #define WACOM_REPORT_TPC1FG 6 |
54 | #define WACOM_REPORT_TPC2FG 13 | 55 | #define WACOM_REPORT_TPC2FG 13 |
55 | #define WACOM_REPORT_TPCMT 13 | 56 | #define WACOM_REPORT_TPCMT 13 |
57 | #define WACOM_REPORT_TPCMT2 3 | ||
56 | #define WACOM_REPORT_TPCHID 15 | 58 | #define WACOM_REPORT_TPCHID 15 |
57 | #define WACOM_REPORT_TPCST 16 | 59 | #define WACOM_REPORT_TPCST 16 |
58 | #define WACOM_REPORT_DTUS 17 | 60 | #define WACOM_REPORT_DTUS 17 |
@@ -106,6 +108,7 @@ enum { | |||
106 | TABLETPC2FG, | 108 | TABLETPC2FG, |
107 | MTSCREEN, | 109 | MTSCREEN, |
108 | MTTPC, | 110 | MTTPC, |
111 | MTTPC_B, | ||
109 | MAX_TYPE | 112 | MAX_TYPE |
110 | }; | 113 | }; |
111 | 114 | ||