diff options
author | Ping Cheng <pinglinux@gmail.com> | 2012-07-25 02:54:11 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-07-25 02:55:10 -0400 |
commit | d838c644fea603eb24811333c6e2cf4f9722bf10 (patch) | |
tree | 577b0289a9c1d0f8961880774a460871d52a8c6c | |
parent | 43c4d13e901a8f37d9abbd410f093ebe885b5322 (diff) |
Input: wacom - add support to Cintiq 22HD
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 | 21 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.h | 3 |
2 files changed, 21 insertions, 3 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 6533f44be5bd..002041975de9 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -464,7 +464,7 @@ static void wacom_intuos_general(struct wacom_wac *wacom) | |||
464 | t = (data[6] << 2) | ((data[7] >> 6) & 3); | 464 | t = (data[6] << 2) | ((data[7] >> 6) & 3); |
465 | if ((features->type >= INTUOS4S && features->type <= INTUOS4L) || | 465 | if ((features->type >= INTUOS4S && features->type <= INTUOS4L) || |
466 | (features->type >= INTUOS5S && features->type <= INTUOS5L) || | 466 | (features->type >= INTUOS5S && features->type <= INTUOS5L) || |
467 | features->type == WACOM_21UX2 || features->type == WACOM_24HD) { | 467 | (features->type >= WACOM_21UX2 && features->type <= WACOM_24HD)) { |
468 | t = (t << 1) | (data[1] & 1); | 468 | t = (t << 1) | (data[1] & 1); |
469 | } | 469 | } |
470 | input_report_abs(input, ABS_PRESSURE, t); | 470 | input_report_abs(input, ABS_PRESSURE, t); |
@@ -614,7 +614,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom) | |||
614 | input_report_abs(input, ABS_MISC, 0); | 614 | input_report_abs(input, ABS_MISC, 0); |
615 | } | 615 | } |
616 | } else { | 616 | } else { |
617 | if (features->type == WACOM_21UX2) { | 617 | if (features->type == WACOM_21UX2 || features->type == WACOM_22HD) { |
618 | input_report_key(input, BTN_0, (data[5] & 0x01)); | 618 | input_report_key(input, BTN_0, (data[5] & 0x01)); |
619 | input_report_key(input, BTN_1, (data[6] & 0x01)); | 619 | input_report_key(input, BTN_1, (data[6] & 0x01)); |
620 | input_report_key(input, BTN_2, (data[6] & 0x02)); | 620 | input_report_key(input, BTN_2, (data[6] & 0x02)); |
@@ -633,6 +633,12 @@ static int wacom_intuos_irq(struct wacom_wac *wacom) | |||
633 | input_report_key(input, BTN_Z, (data[8] & 0x20)); | 633 | input_report_key(input, BTN_Z, (data[8] & 0x20)); |
634 | input_report_key(input, BTN_BASE, (data[8] & 0x40)); | 634 | input_report_key(input, BTN_BASE, (data[8] & 0x40)); |
635 | input_report_key(input, BTN_BASE2, (data[8] & 0x80)); | 635 | input_report_key(input, BTN_BASE2, (data[8] & 0x80)); |
636 | |||
637 | if (features->type == WACOM_22HD) { | ||
638 | input_report_key(input, KEY_PROG1, data[9] & 0x01); | ||
639 | input_report_key(input, KEY_PROG2, data[9] & 0x02); | ||
640 | input_report_key(input, KEY_PROG3, data[9] & 0x04); | ||
641 | } | ||
636 | } else { | 642 | } else { |
637 | input_report_key(input, BTN_0, (data[5] & 0x01)); | 643 | input_report_key(input, BTN_0, (data[5] & 0x01)); |
638 | input_report_key(input, BTN_1, (data[5] & 0x02)); | 644 | input_report_key(input, BTN_1, (data[5] & 0x02)); |
@@ -1231,6 +1237,7 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len) | |||
1231 | case CINTIQ: | 1237 | case CINTIQ: |
1232 | case WACOM_BEE: | 1238 | case WACOM_BEE: |
1233 | case WACOM_21UX2: | 1239 | case WACOM_21UX2: |
1240 | case WACOM_22HD: | ||
1234 | case WACOM_24HD: | 1241 | case WACOM_24HD: |
1235 | sync = wacom_intuos_irq(wacom_wac); | 1242 | sync = wacom_intuos_irq(wacom_wac); |
1236 | break; | 1243 | break; |
@@ -1432,6 +1439,12 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev, | |||
1432 | wacom_setup_cintiq(wacom_wac); | 1439 | wacom_setup_cintiq(wacom_wac); |
1433 | break; | 1440 | break; |
1434 | 1441 | ||
1442 | case WACOM_22HD: | ||
1443 | __set_bit(KEY_PROG1, input_dev->keybit); | ||
1444 | __set_bit(KEY_PROG2, input_dev->keybit); | ||
1445 | __set_bit(KEY_PROG3, input_dev->keybit); | ||
1446 | /* fall through */ | ||
1447 | |||
1435 | case WACOM_21UX2: | 1448 | case WACOM_21UX2: |
1436 | __set_bit(BTN_A, input_dev->keybit); | 1449 | __set_bit(BTN_A, input_dev->keybit); |
1437 | __set_bit(BTN_B, input_dev->keybit); | 1450 | __set_bit(BTN_B, input_dev->keybit); |
@@ -1858,6 +1871,9 @@ static const struct wacom_features wacom_features_0xF0 = | |||
1858 | static const struct wacom_features wacom_features_0xCC = | 1871 | static const struct wacom_features wacom_features_0xCC = |
1859 | { "Wacom Cintiq 21UX2", WACOM_PKGLEN_INTUOS, 87200, 65600, 2047, | 1872 | { "Wacom Cintiq 21UX2", WACOM_PKGLEN_INTUOS, 87200, 65600, 2047, |
1860 | 63, WACOM_21UX2, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | 1873 | 63, WACOM_21UX2, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; |
1874 | static const struct wacom_features wacom_features_0xFA = | ||
1875 | { "Wacom Cintiq 22HD", WACOM_PKGLEN_INTUOS, 95840, 54260, 2047, | ||
1876 | 63, WACOM_22HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; | ||
1861 | static const struct wacom_features wacom_features_0x90 = | 1877 | static const struct wacom_features wacom_features_0x90 = |
1862 | { "Wacom ISDv4 90", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, | 1878 | { "Wacom ISDv4 90", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, |
1863 | 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | 1879 | 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
@@ -2075,6 +2091,7 @@ const struct usb_device_id wacom_ids[] = { | |||
2075 | { USB_DEVICE_WACOM(0xEF) }, | 2091 | { USB_DEVICE_WACOM(0xEF) }, |
2076 | { USB_DEVICE_WACOM(0x47) }, | 2092 | { USB_DEVICE_WACOM(0x47) }, |
2077 | { USB_DEVICE_WACOM(0xF4) }, | 2093 | { USB_DEVICE_WACOM(0xF4) }, |
2094 | { USB_DEVICE_WACOM(0xFA) }, | ||
2078 | { USB_DEVICE_LENOVO(0x6004) }, | 2095 | { USB_DEVICE_LENOVO(0x6004) }, |
2079 | { } | 2096 | { } |
2080 | }; | 2097 | }; |
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index bd5d37b28714..96c185cc301e 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h | |||
@@ -73,8 +73,9 @@ enum { | |||
73 | INTUOS5S, | 73 | INTUOS5S, |
74 | INTUOS5, | 74 | INTUOS5, |
75 | INTUOS5L, | 75 | INTUOS5L, |
76 | WACOM_24HD, | ||
77 | WACOM_21UX2, | 76 | WACOM_21UX2, |
77 | WACOM_22HD, | ||
78 | WACOM_24HD, | ||
78 | CINTIQ, | 79 | CINTIQ, |
79 | WACOM_BEE, | 80 | WACOM_BEE, |
80 | WACOM_MO, | 81 | WACOM_MO, |