diff options
| -rw-r--r-- | drivers/hid/wacom_sys.c | 2 | ||||
| -rw-r--r-- | drivers/hid/wacom_wac.c | 36 | ||||
| -rw-r--r-- | drivers/hid/wacom_wac.h | 1 |
3 files changed, 37 insertions, 2 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 530476dc7bb9..125e9d5dce38 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c | |||
| @@ -422,7 +422,7 @@ static int wacom_query_tablet_data(struct hid_device *hdev, | |||
| 422 | /* MT Tablet PC touch */ | 422 | /* MT Tablet PC touch */ |
| 423 | return wacom_set_device_mode(hdev, 3, 4, 4); | 423 | return wacom_set_device_mode(hdev, 3, 4, 4); |
| 424 | } | 424 | } |
| 425 | else if (features->type == WACOM_24HDT || features->type == CINTIQ_HYBRID) { | 425 | else if (features->type == WACOM_24HDT || features->type == CINTIQ_HYBRID || features->type == CINTIQ_COMPANION_2) { |
| 426 | return wacom_set_device_mode(hdev, 18, 3, 2); | 426 | return wacom_set_device_mode(hdev, 18, 3, 2); |
| 427 | } | 427 | } |
| 428 | else if (features->type == WACOM_27QHDT) { | 428 | else if (features->type == WACOM_27QHDT) { |
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index a0d875c5ed38..01ff648d6098 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c | |||
| @@ -765,7 +765,7 @@ static void wacom_intuos_general(struct wacom_wac *wacom) | |||
| 765 | /* general pen packet */ | 765 | /* general pen packet */ |
| 766 | if ((data[1] & 0xb8) == 0xa0) { | 766 | if ((data[1] & 0xb8) == 0xa0) { |
| 767 | t = (data[6] << 2) | ((data[7] >> 6) & 3); | 767 | t = (data[6] << 2) | ((data[7] >> 6) & 3); |
| 768 | if (features->type >= INTUOS4S && features->type <= CINTIQ_HYBRID) { | 768 | if (features->type >= INTUOS4S && features->type <= CINTIQ_COMPANION_2) { |
| 769 | t = (t << 1) | (data[1] & 1); | 769 | t = (t << 1) | (data[1] & 1); |
| 770 | } | 770 | } |
| 771 | input_report_abs(input, ABS_PRESSURE, t); | 771 | input_report_abs(input, ABS_PRESSURE, t); |
| @@ -951,6 +951,27 @@ static int wacom_intuos_irq(struct wacom_wac *wacom) | |||
| 951 | } else { | 951 | } else { |
| 952 | input_report_abs(input, ABS_MISC, 0); | 952 | input_report_abs(input, ABS_MISC, 0); |
| 953 | } | 953 | } |
| 954 | |||
| 955 | } else if (features->type == CINTIQ_COMPANION_2) { | ||
| 956 | input_report_key(input, BTN_1, (data[1] & 0x02)); | ||
| 957 | input_report_key(input, BTN_2, (data[2] & 0x01)); | ||
| 958 | input_report_key(input, BTN_3, (data[2] & 0x02)); | ||
| 959 | input_report_key(input, BTN_4, (data[2] & 0x04)); | ||
| 960 | input_report_key(input, BTN_5, (data[2] & 0x08)); | ||
| 961 | input_report_key(input, BTN_6, (data[1] & 0x04)); | ||
| 962 | |||
| 963 | input_report_key(input, BTN_7, (data[2] & 0x10)); /* Right */ | ||
| 964 | input_report_key(input, BTN_8, (data[2] & 0x20)); /* Up */ | ||
| 965 | input_report_key(input, BTN_9, (data[2] & 0x40)); /* Left */ | ||
| 966 | input_report_key(input, BTN_A, (data[2] & 0x80)); /* Down */ | ||
| 967 | input_report_key(input, BTN_0, (data[1] & 0x01)); /* Center */ | ||
| 968 | |||
| 969 | if (data[4] | (data[3] & 0x01)) { | ||
| 970 | input_report_abs(input, ABS_MISC, PAD_DEVICE_ID); | ||
| 971 | } else { | ||
| 972 | input_report_abs(input, ABS_MISC, 0); | ||
| 973 | } | ||
| 974 | |||
| 954 | } else if (features->type >= INTUOS5S && features->type <= INTUOSPL) { | 975 | } else if (features->type >= INTUOS5S && features->type <= INTUOSPL) { |
| 955 | int i; | 976 | int i; |
| 956 | 977 | ||
| @@ -2276,6 +2297,7 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len) | |||
| 2276 | case WACOM_27QHD: | 2297 | case WACOM_27QHD: |
| 2277 | case DTK: | 2298 | case DTK: |
| 2278 | case CINTIQ_HYBRID: | 2299 | case CINTIQ_HYBRID: |
| 2300 | case CINTIQ_COMPANION_2: | ||
| 2279 | sync = wacom_intuos_irq(wacom_wac); | 2301 | sync = wacom_intuos_irq(wacom_wac); |
| 2280 | break; | 2302 | break; |
| 2281 | 2303 | ||
| @@ -2543,6 +2565,7 @@ int wacom_setup_pen_input_capabilities(struct input_dev *input_dev, | |||
| 2543 | case CINTIQ: | 2565 | case CINTIQ: |
| 2544 | case WACOM_13HD: | 2566 | case WACOM_13HD: |
| 2545 | case CINTIQ_HYBRID: | 2567 | case CINTIQ_HYBRID: |
| 2568 | case CINTIQ_COMPANION_2: | ||
| 2546 | input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); | 2569 | input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0); |
| 2547 | input_abs_set_res(input_dev, ABS_Z, 287); | 2570 | input_abs_set_res(input_dev, ABS_Z, 287); |
| 2548 | __set_bit(INPUT_PROP_DIRECT, input_dev->propbit); | 2571 | __set_bit(INPUT_PROP_DIRECT, input_dev->propbit); |
| @@ -2783,6 +2806,7 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, | |||
| 2783 | switch (features->type) { | 2806 | switch (features->type) { |
| 2784 | 2807 | ||
| 2785 | case CINTIQ_HYBRID: | 2808 | case CINTIQ_HYBRID: |
| 2809 | case CINTIQ_COMPANION_2: | ||
| 2786 | case DTK: | 2810 | case DTK: |
| 2787 | case DTUS: | 2811 | case DTUS: |
| 2788 | case GRAPHIRE_BT: | 2812 | case GRAPHIRE_BT: |
| @@ -3356,6 +3380,14 @@ static const struct wacom_features wacom_features_0x318 = | |||
| 3356 | static const struct wacom_features wacom_features_0x319 = | 3380 | static const struct wacom_features wacom_features_0x319 = |
| 3357 | { "Wacom Wireless Bamboo PAD", 4095, 4095, /* Touch */ | 3381 | { "Wacom Wireless Bamboo PAD", 4095, 4095, /* Touch */ |
| 3358 | .type = BAMBOO_PAD, 35, 48, .touch_max = 4 }; | 3382 | .type = BAMBOO_PAD, 35, 48, .touch_max = 4 }; |
| 3383 | static const struct wacom_features wacom_features_0x325 = | ||
| 3384 | { "Wacom ISDv5 325", 59552, 33848, 2047, 63, | ||
| 3385 | CINTIQ_COMPANION_2, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 11, | ||
| 3386 | WACOM_CINTIQ_OFFSET, WACOM_CINTIQ_OFFSET, | ||
| 3387 | .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x326 }; | ||
| 3388 | static const struct wacom_features wacom_features_0x326 = /* Touch */ | ||
| 3389 | { "Wacom ISDv5 326", .type = HID_GENERIC, .oVid = USB_VENDOR_ID_WACOM, | ||
| 3390 | .oPid = 0x325 }; | ||
| 3359 | static const struct wacom_features wacom_features_0x323 = | 3391 | static const struct wacom_features wacom_features_0x323 = |
| 3360 | { "Wacom Intuos P M", 21600, 13500, 1023, 31, | 3392 | { "Wacom Intuos P M", 21600, 13500, 1023, 31, |
| 3361 | INTUOSHT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, | 3393 | INTUOSHT, WACOM_INTUOS_RES, WACOM_INTUOS_RES, |
| @@ -3531,6 +3563,8 @@ const struct hid_device_id wacom_ids[] = { | |||
| 3531 | { USB_DEVICE_WACOM(0x318) }, | 3563 | { USB_DEVICE_WACOM(0x318) }, |
| 3532 | { USB_DEVICE_WACOM(0x319) }, | 3564 | { USB_DEVICE_WACOM(0x319) }, |
| 3533 | { USB_DEVICE_WACOM(0x323) }, | 3565 | { USB_DEVICE_WACOM(0x323) }, |
| 3566 | { USB_DEVICE_WACOM(0x325) }, | ||
| 3567 | { USB_DEVICE_WACOM(0x326) }, | ||
| 3534 | { USB_DEVICE_WACOM(0x32A) }, | 3568 | { USB_DEVICE_WACOM(0x32A) }, |
| 3535 | { USB_DEVICE_WACOM(0x32B) }, | 3569 | { USB_DEVICE_WACOM(0x32B) }, |
| 3536 | { USB_DEVICE_WACOM(0x32C) }, | 3570 | { USB_DEVICE_WACOM(0x32C) }, |
diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h index 1a30e4407a46..95ee92b807e9 100644 --- a/drivers/hid/wacom_wac.h +++ b/drivers/hid/wacom_wac.h | |||
| @@ -124,6 +124,7 @@ enum { | |||
| 124 | WACOM_24HD, | 124 | WACOM_24HD, |
| 125 | WACOM_27QHD, | 125 | WACOM_27QHD, |
| 126 | CINTIQ_HYBRID, | 126 | CINTIQ_HYBRID, |
| 127 | CINTIQ_COMPANION_2, | ||
| 127 | CINTIQ, | 128 | CINTIQ, |
| 128 | WACOM_BEE, | 129 | WACOM_BEE, |
| 129 | WACOM_13HD, | 130 | WACOM_13HD, |
