diff options
author | Ping Cheng <pinglinux@gmail.com> | 2013-02-13 23:20:01 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-02-13 23:21:22 -0500 |
commit | a112e9fdda1e4a412628650f0988c46daaee9028 (patch) | |
tree | 40a021db23db1ddf188c866100a1958f17531f64 | |
parent | 6ddaf744c9f6dd08aaec05bc9536173317b913a3 (diff) |
Input: wacom - add support for DTH-2242
It is a pen with 10 finger touch device.
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 25 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.h | 1 |
2 files changed, 25 insertions, 1 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index a318bf4ada05..ad11ec543623 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -359,6 +359,7 @@ static int wacom_intuos_inout(struct wacom_wac *wacom) | |||
359 | case 0x802: /* Intuos4 General Pen */ | 359 | case 0x802: /* Intuos4 General Pen */ |
360 | case 0x804: /* Intuos4 Marker Pen */ | 360 | case 0x804: /* Intuos4 Marker Pen */ |
361 | case 0x40802: /* Intuos4 Classic Pen */ | 361 | case 0x40802: /* Intuos4 Classic Pen */ |
362 | case 0x18803: /* DTH2242 Grip Pen */ | ||
362 | case 0x022: | 363 | case 0x022: |
363 | wacom->tool[idx] = BTN_TOOL_PEN; | 364 | wacom->tool[idx] = BTN_TOOL_PEN; |
364 | break; | 365 | break; |
@@ -538,6 +539,13 @@ static int wacom_intuos_irq(struct wacom_wac *wacom) | |||
538 | input_report_key(input, wacom->tool[1], 0); | 539 | input_report_key(input, wacom->tool[1], 0); |
539 | input_report_abs(input, ABS_MISC, 0); | 540 | input_report_abs(input, ABS_MISC, 0); |
540 | } | 541 | } |
542 | } else if (features->type == DTK) { | ||
543 | input_report_key(input, BTN_0, (data[6] & 0x01)); | ||
544 | input_report_key(input, BTN_1, (data[6] & 0x02)); | ||
545 | input_report_key(input, BTN_2, (data[6] & 0x04)); | ||
546 | input_report_key(input, BTN_3, (data[6] & 0x08)); | ||
547 | input_report_key(input, BTN_4, (data[6] & 0x10)); | ||
548 | input_report_key(input, BTN_5, (data[6] & 0x20)); | ||
541 | } else if (features->type == WACOM_24HD) { | 549 | } else if (features->type == WACOM_24HD) { |
542 | input_report_key(input, BTN_0, (data[6] & 0x01)); | 550 | input_report_key(input, BTN_0, (data[6] & 0x01)); |
543 | input_report_key(input, BTN_1, (data[6] & 0x02)); | 551 | input_report_key(input, BTN_1, (data[6] & 0x02)); |
@@ -1296,6 +1304,7 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len) | |||
1296 | case WACOM_21UX2: | 1304 | case WACOM_21UX2: |
1297 | case WACOM_22HD: | 1305 | case WACOM_22HD: |
1298 | case WACOM_24HD: | 1306 | case WACOM_24HD: |
1307 | case DTK: | ||
1299 | sync = wacom_intuos_irq(wacom_wac); | 1308 | sync = wacom_intuos_irq(wacom_wac); |
1300 | break; | 1309 | break; |
1301 | 1310 | ||
@@ -1515,12 +1524,17 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
1515 | __set_bit(BTN_Y, input_dev->keybit); | 1524 | __set_bit(BTN_Y, input_dev->keybit); |
1516 | __set_bit(BTN_Z, input_dev->keybit); | 1525 | __set_bit(BTN_Z, input_dev->keybit); |
1517 | 1526 | ||
1518 | for (i = 0; i < 10; i++) | 1527 | for (i = 6; i < 10; i++) |
1519 | __set_bit(BTN_0 + i, input_dev->keybit); | 1528 | __set_bit(BTN_0 + i, input_dev->keybit); |
1520 | 1529 | ||
1521 | __set_bit(KEY_PROG1, input_dev->keybit); | 1530 | __set_bit(KEY_PROG1, input_dev->keybit); |
1522 | __set_bit(KEY_PROG2, input_dev->keybit); | 1531 | __set_bit(KEY_PROG2, input_dev->keybit); |
1523 | __set_bit(KEY_PROG3, input_dev->keybit); | 1532 | __set_bit(KEY_PROG3, input_dev->keybit); |
1533 | /* fall through */ | ||
1534 | |||
1535 | case DTK: | ||
1536 | for (i = 0; i < 6; i++) | ||
1537 | __set_bit(BTN_0 + i, input_dev->keybit); | ||
1524 | 1538 | ||
1525 | input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); | 1539 | input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); |
1526 | input_set_abs_params(input_dev, ABS_THROTTLE, 0, 71, 0, 0); | 1540 | input_set_abs_params(input_dev, ABS_THROTTLE, 0, 71, 0, 0); |
@@ -1945,6 +1959,13 @@ static const struct wacom_features wacom_features_0xCE = | |||
1945 | static const struct wacom_features wacom_features_0xF0 = | 1959 | static const struct wacom_features wacom_features_0xF0 = |
1946 | { "Wacom DTU1631", WACOM_PKGLEN_GRAPHIRE, 34623, 19553, 511, | 1960 | { "Wacom DTU1631", WACOM_PKGLEN_GRAPHIRE, 34623, 19553, 511, |
1947 | 0, DTU, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | 1961 | 0, DTU, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
1962 | static const struct wacom_features wacom_features_0x59 = /* Pen */ | ||
1963 | { "Wacom DTH2242", WACOM_PKGLEN_INTUOS, 95840, 54260, 2047, | ||
1964 | 63, DTK, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, | ||
1965 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x5D }; | ||
1966 | static const struct wacom_features wacom_features_0x5D = /* Touch */ | ||
1967 | { "Wacom DTH2242", .type = WACOM_24HDT, | ||
1968 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x59, .touch_max = 10 }; | ||
1948 | static const struct wacom_features wacom_features_0xCC = | 1969 | static const struct wacom_features wacom_features_0xCC = |
1949 | { "Wacom Cintiq 21UX2", WACOM_PKGLEN_INTUOS, 87200, 65600, 2047, | 1970 | { "Wacom Cintiq 21UX2", WACOM_PKGLEN_INTUOS, 87200, 65600, 2047, |
1950 | 63, WACOM_21UX2, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 1971 | 63, WACOM_21UX2, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; |
@@ -2118,6 +2139,8 @@ const struct usb_device_id wacom_ids[] = { | |||
2118 | { USB_DEVICE_WACOM(0x43) }, | 2139 | { USB_DEVICE_WACOM(0x43) }, |
2119 | { USB_DEVICE_WACOM(0x44) }, | 2140 | { USB_DEVICE_WACOM(0x44) }, |
2120 | { USB_DEVICE_WACOM(0x45) }, | 2141 | { USB_DEVICE_WACOM(0x45) }, |
2142 | { USB_DEVICE_WACOM(0x59) }, | ||
2143 | { USB_DEVICE_WACOM(0x5D) }, | ||
2121 | { USB_DEVICE_WACOM(0xB0) }, | 2144 | { USB_DEVICE_WACOM(0xB0) }, |
2122 | { USB_DEVICE_WACOM(0xB1) }, | 2145 | { USB_DEVICE_WACOM(0xB1) }, |
2123 | { USB_DEVICE_WACOM(0xB2) }, | 2146 | { USB_DEVICE_WACOM(0xB2) }, |
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index 06410fe6425f..5f9a7721e16c 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h | |||
@@ -78,6 +78,7 @@ enum { | |||
78 | INTUOS5L, | 78 | INTUOS5L, |
79 | WACOM_21UX2, | 79 | WACOM_21UX2, |
80 | WACOM_22HD, | 80 | WACOM_22HD, |
81 | DTK, | ||
81 | WACOM_24HD, | 82 | WACOM_24HD, |
82 | CINTIQ, | 83 | CINTIQ, |
83 | WACOM_BEE, | 84 | WACOM_BEE, |