aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2013-11-14 20:38:05 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-11-14 20:38:05 -0500
commit42249094f79422fbf5ed4b54eeb48ff096809b8f (patch)
tree91e6850c8c7e8cc284cf8bb6363f8662f84011f4 /drivers/input/tablet
parent936816161978ca716a56c5e553c68f25972b1e3a (diff)
parent2c027b7c48a888ab173ba45babb4525e278375d9 (diff)
Merge branch 'next' into for-linus
Merge first round of changes for 3.13 merge window.
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r--drivers/input/tablet/wacom_sys.c96
-rw-r--r--drivers/input/tablet/wacom_wac.c114
-rw-r--r--drivers/input/tablet/wacom_wac.h8
3 files changed, 165 insertions, 53 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index e53416a4d7f3..867e7c33ac55 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -524,9 +524,6 @@ static int wacom_set_device_mode(struct usb_interface *intf, int report_id, int
524 524
525 error = wacom_set_report(intf, WAC_HID_FEATURE_REPORT, 525 error = wacom_set_report(intf, WAC_HID_FEATURE_REPORT,
526 report_id, rep_data, length, 1); 526 report_id, rep_data, length, 1);
527 if (error >= 0)
528 error = wacom_get_report(intf, WAC_HID_FEATURE_REPORT,
529 report_id, rep_data, length, 1);
530 } while ((error < 0 || rep_data[1] != mode) && limit++ < WAC_MSG_RETRIES); 527 } while ((error < 0 || rep_data[1] != mode) && limit++ < WAC_MSG_RETRIES);
531 528
532 kfree(rep_data); 529 kfree(rep_data);
@@ -548,7 +545,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
548 /* MT Tablet PC touch */ 545 /* MT Tablet PC touch */
549 return wacom_set_device_mode(intf, 3, 4, 4); 546 return wacom_set_device_mode(intf, 3, 4, 4);
550 } 547 }
551 else if (features->type == WACOM_24HDT) { 548 else if (features->type == WACOM_24HDT || features->type == CINTIQ_HYBRID) {
552 return wacom_set_device_mode(intf, 18, 3, 2); 549 return wacom_set_device_mode(intf, 18, 3, 2);
553 } 550 }
554 } else if (features->device_type == BTN_TOOL_PEN) { 551 } else if (features->device_type == BTN_TOOL_PEN) {
@@ -719,7 +716,7 @@ static int wacom_led_control(struct wacom *wacom)
719 return -ENOMEM; 716 return -ENOMEM;
720 717
721 if (wacom->wacom_wac.features.type >= INTUOS5S && 718 if (wacom->wacom_wac.features.type >= INTUOS5S &&
722 wacom->wacom_wac.features.type <= INTUOS5L) { 719 wacom->wacom_wac.features.type <= INTUOSPL) {
723 /* 720 /*
724 * Touch Ring and crop mark LED luminance may take on 721 * Touch Ring and crop mark LED luminance may take on
725 * one of four values: 722 * one of four values:
@@ -981,14 +978,20 @@ static int wacom_initialize_leds(struct wacom *wacom)
981 case INTUOS5S: 978 case INTUOS5S:
982 case INTUOS5: 979 case INTUOS5:
983 case INTUOS5L: 980 case INTUOS5L:
984 wacom->led.select[0] = 0; 981 case INTUOSPS:
985 wacom->led.select[1] = 0; 982 case INTUOSPM:
986 wacom->led.llv = 32; 983 case INTUOSPL:
987 wacom->led.hlv = 0; 984 if (wacom->wacom_wac.features.device_type == BTN_TOOL_PEN) {
988 wacom->led.img_lum = 0; 985 wacom->led.select[0] = 0;
989 986 wacom->led.select[1] = 0;
990 error = sysfs_create_group(&wacom->intf->dev.kobj, 987 wacom->led.llv = 32;
991 &intuos5_led_attr_group); 988 wacom->led.hlv = 0;
989 wacom->led.img_lum = 0;
990
991 error = sysfs_create_group(&wacom->intf->dev.kobj,
992 &intuos5_led_attr_group);
993 } else
994 return 0;
992 break; 995 break;
993 996
994 default: 997 default:
@@ -1024,8 +1027,12 @@ static void wacom_destroy_leds(struct wacom *wacom)
1024 case INTUOS5S: 1027 case INTUOS5S:
1025 case INTUOS5: 1028 case INTUOS5:
1026 case INTUOS5L: 1029 case INTUOS5L:
1027 sysfs_remove_group(&wacom->intf->dev.kobj, 1030 case INTUOSPS:
1028 &intuos5_led_attr_group); 1031 case INTUOSPM:
1032 case INTUOSPL:
1033 if (wacom->wacom_wac.features.device_type == BTN_TOOL_PEN)
1034 sysfs_remove_group(&wacom->intf->dev.kobj,
1035 &intuos5_led_attr_group);
1029 break; 1036 break;
1030 } 1037 }
1031} 1038}
@@ -1185,34 +1192,47 @@ static void wacom_wireless_work(struct work_struct *work)
1185 wacom_wac1->features = 1192 wacom_wac1->features =
1186 *((struct wacom_features *)id->driver_info); 1193 *((struct wacom_features *)id->driver_info);
1187 wacom_wac1->features.device_type = BTN_TOOL_PEN; 1194 wacom_wac1->features.device_type = BTN_TOOL_PEN;
1195 snprintf(wacom_wac1->name, WACOM_NAME_MAX, "%s (WL) Pen",
1196 wacom_wac1->features.name);
1188 error = wacom_register_input(wacom1); 1197 error = wacom_register_input(wacom1);
1189 if (error) 1198 if (error)
1190 goto fail1; 1199 goto fail;
1191 1200
1192 /* Touch interface */ 1201 /* Touch interface */
1193 wacom_wac2->features = 1202 if (wacom_wac1->features.touch_max) {
1194 *((struct wacom_features *)id->driver_info); 1203 wacom_wac2->features =
1195 wacom_wac2->features.pktlen = WACOM_PKGLEN_BBTOUCH3; 1204 *((struct wacom_features *)id->driver_info);
1196 wacom_wac2->features.device_type = BTN_TOOL_FINGER; 1205 wacom_wac2->features.pktlen = WACOM_PKGLEN_BBTOUCH3;
1197 wacom_wac2->features.x_max = wacom_wac2->features.y_max = 4096; 1206 wacom_wac2->features.device_type = BTN_TOOL_FINGER;
1198 error = wacom_register_input(wacom2); 1207 wacom_wac2->features.x_max = wacom_wac2->features.y_max = 4096;
1199 if (error) 1208 if (wacom_wac2->features.touch_max)
1200 goto fail2; 1209 snprintf(wacom_wac2->name, WACOM_NAME_MAX,
1210 "%s (WL) Finger",wacom_wac2->features.name);
1211 else
1212 snprintf(wacom_wac2->name, WACOM_NAME_MAX,
1213 "%s (WL) Pad",wacom_wac2->features.name);
1214 error = wacom_register_input(wacom2);
1215 if (error)
1216 goto fail;
1217 }
1201 1218
1202 error = wacom_initialize_battery(wacom); 1219 error = wacom_initialize_battery(wacom);
1203 if (error) 1220 if (error)
1204 goto fail3; 1221 goto fail;
1205 } 1222 }
1206 1223
1207 return; 1224 return;
1208 1225
1209fail3: 1226fail:
1210 input_unregister_device(wacom_wac2->input); 1227 if (wacom_wac2->input) {
1211 wacom_wac2->input = NULL; 1228 input_unregister_device(wacom_wac2->input);
1212fail2: 1229 wacom_wac2->input = NULL;
1213 input_unregister_device(wacom_wac1->input); 1230 }
1214 wacom_wac1->input = NULL; 1231
1215fail1: 1232 if (wacom_wac1->input) {
1233 input_unregister_device(wacom_wac1->input);
1234 wacom_wac1->input = NULL;
1235 }
1216 return; 1236 return;
1217} 1237}
1218 1238
@@ -1302,7 +1322,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
1302 * HID descriptor. If this is the touch interface (wMaxPacketSize 1322 * HID descriptor. If this is the touch interface (wMaxPacketSize
1303 * of WACOM_PKGLEN_BBTOUCH3), override the table values. 1323 * of WACOM_PKGLEN_BBTOUCH3), override the table values.
1304 */ 1324 */
1305 if (features->type >= INTUOS5S && features->type <= INTUOS5L) { 1325 if (features->type >= INTUOS5S && features->type <= INTUOSPL) {
1306 if (endpoint->wMaxPacketSize == WACOM_PKGLEN_BBTOUCH3) { 1326 if (endpoint->wMaxPacketSize == WACOM_PKGLEN_BBTOUCH3) {
1307 features->device_type = BTN_TOOL_FINGER; 1327 features->device_type = BTN_TOOL_FINGER;
1308 features->pktlen = WACOM_PKGLEN_BBTOUCH3; 1328 features->pktlen = WACOM_PKGLEN_BBTOUCH3;
@@ -1329,10 +1349,12 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
1329 struct usb_device *other_dev; 1349 struct usb_device *other_dev;
1330 1350
1331 /* Append the device type to the name */ 1351 /* Append the device type to the name */
1332 strlcat(wacom_wac->name, 1352 if (features->device_type != BTN_TOOL_FINGER)
1333 features->device_type == BTN_TOOL_PEN ? 1353 strlcat(wacom_wac->name, " Pen", WACOM_NAME_MAX);
1334 " Pen" : " Finger", 1354 else if (features->touch_max)
1335 sizeof(wacom_wac->name)); 1355 strlcat(wacom_wac->name, " Finger", WACOM_NAME_MAX);
1356 else
1357 strlcat(wacom_wac->name, " Pad", WACOM_NAME_MAX);
1336 1358
1337 other_dev = wacom_get_sibling(dev, features->oVid, features->oPid); 1359 other_dev = wacom_get_sibling(dev, features->oVid, features->oPid);
1338 if (other_dev == NULL || wacom_get_usbdev_data(other_dev) == NULL) 1360 if (other_dev == NULL || wacom_get_usbdev_data(other_dev) == NULL)
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index c59b797eeafa..782c2535f1d8 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -427,6 +427,13 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
427 (features->type == WACOM_21UX2)) 427 (features->type == WACOM_21UX2))
428 return 1; 428 return 1;
429 429
430 /* Range Report */
431 if ((data[1] & 0xfe) == 0x20) {
432 input_report_key(input, BTN_TOUCH, 0);
433 input_report_abs(input, ABS_PRESSURE, 0);
434 input_report_abs(input, ABS_DISTANCE, wacom->features.distance_max);
435 }
436
430 /* Exit report */ 437 /* Exit report */
431 if ((data[1] & 0xfe) == 0x80) { 438 if ((data[1] & 0xfe) == 0x80) {
432 if (features->quirks == WACOM_QUIRK_MULTI_INPUT) 439 if (features->quirks == WACOM_QUIRK_MULTI_INPUT)
@@ -477,7 +484,7 @@ static void wacom_intuos_general(struct wacom_wac *wacom)
477 /* general pen packet */ 484 /* general pen packet */
478 if ((data[1] & 0xb8) == 0xa0) { 485 if ((data[1] & 0xb8) == 0xa0) {
479 t = (data[6] << 2) | ((data[7] >> 6) & 3); 486 t = (data[6] << 2) | ((data[7] >> 6) & 3);
480 if (features->type >= INTUOS4S && features->type <= WACOM_24HD) { 487 if (features->type >= INTUOS4S && features->type <= CINTIQ_HYBRID) {
481 t = (t << 1) | (data[1] & 1); 488 t = (t << 1) | (data[1] & 1);
482 } 489 }
483 input_report_abs(input, ABS_PRESSURE, t); 490 input_report_abs(input, ABS_PRESSURE, t);
@@ -621,14 +628,30 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
621 } else { 628 } else {
622 input_report_abs(input, ABS_MISC, 0); 629 input_report_abs(input, ABS_MISC, 0);
623 } 630 }
624 } else if (features->type >= INTUOS5S && features->type <= INTUOS5L) { 631 } else if (features->type == CINTIQ_HYBRID) {
632 /*
633 * Do not send hardware buttons under Android. They
634 * are already sent to the system through GPIO (and
635 * have different meaning).
636 */
637 input_report_key(input, BTN_1, (data[4] & 0x01));
638 input_report_key(input, BTN_2, (data[4] & 0x02));
639 input_report_key(input, BTN_3, (data[4] & 0x04));
640 input_report_key(input, BTN_4, (data[4] & 0x08));
641
642 input_report_key(input, BTN_5, (data[4] & 0x10)); /* Right */
643 input_report_key(input, BTN_6, (data[4] & 0x20)); /* Up */
644 input_report_key(input, BTN_7, (data[4] & 0x40)); /* Left */
645 input_report_key(input, BTN_8, (data[4] & 0x80)); /* Down */
646 input_report_key(input, BTN_0, (data[3] & 0x01)); /* Center */
647 } else if (features->type >= INTUOS5S && features->type <= INTUOSPL) {
625 int i; 648 int i;
626 649
627 /* Touch ring mode switch has no capacitive sensor */ 650 /* Touch ring mode switch has no capacitive sensor */
628 input_report_key(input, BTN_0, (data[3] & 0x01)); 651 input_report_key(input, BTN_0, (data[3] & 0x01));
629 652
630 /* 653 /*
631 * ExpressKeys on Intuos5 have a capacitive sensor in 654 * ExpressKeys on Intuos5/Intuos Pro have a capacitive sensor in
632 * addition to the mechanical switch. Switch data is 655 * addition to the mechanical switch. Switch data is
633 * stored in data[4], capacitive data in data[5]. 656 * stored in data[4], capacitive data in data[5].
634 */ 657 */
@@ -716,7 +739,9 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
716 features->type == INTUOS4 || 739 features->type == INTUOS4 ||
717 features->type == INTUOS4S || 740 features->type == INTUOS4S ||
718 features->type == INTUOS5 || 741 features->type == INTUOS5 ||
719 features->type == INTUOS5S)) { 742 features->type == INTUOS5S ||
743 features->type == INTUOSPM ||
744 features->type == INTUOSPS)) {
720 745
721 return 0; 746 return 0;
722 } 747 }
@@ -769,8 +794,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
769 794
770 } else if (wacom->tool[idx] == BTN_TOOL_MOUSE) { 795 } else if (wacom->tool[idx] == BTN_TOOL_MOUSE) {
771 /* I4 mouse */ 796 /* I4 mouse */
772 if ((features->type >= INTUOS4S && features->type <= INTUOS4L) || 797 if (features->type >= INTUOS4S && features->type <= INTUOSPL) {
773 (features->type >= INTUOS5S && features->type <= INTUOS5L)) {
774 input_report_key(input, BTN_LEFT, data[6] & 0x01); 798 input_report_key(input, BTN_LEFT, data[6] & 0x01);
775 input_report_key(input, BTN_MIDDLE, data[6] & 0x02); 799 input_report_key(input, BTN_MIDDLE, data[6] & 0x02);
776 input_report_key(input, BTN_RIGHT, data[6] & 0x04); 800 input_report_key(input, BTN_RIGHT, data[6] & 0x04);
@@ -797,7 +821,8 @@ static int wacom_intuos_irq(struct wacom_wac *wacom)
797 } 821 }
798 } 822 }
799 } else if ((features->type < INTUOS3S || features->type == INTUOS3L || 823 } else if ((features->type < INTUOS3S || features->type == INTUOS3L ||
800 features->type == INTUOS4L || features->type == INTUOS5L) && 824 features->type == INTUOS4L || features->type == INTUOS5L ||
825 features->type == INTUOSPL) &&
801 wacom->tool[idx] == BTN_TOOL_LENS) { 826 wacom->tool[idx] == BTN_TOOL_LENS) {
802 /* Lens cursor packets */ 827 /* Lens cursor packets */
803 input_report_key(input, BTN_LEFT, data[8] & 0x01); 828 input_report_key(input, BTN_LEFT, data[8] & 0x01);
@@ -1107,6 +1132,7 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
1107 1132
1108static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data) 1133static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)
1109{ 1134{
1135 struct wacom_features *features = &wacom->features;
1110 struct input_dev *input = wacom->input; 1136 struct input_dev *input = wacom->input;
1111 bool touch = data[1] & 0x80; 1137 bool touch = data[1] & 0x80;
1112 int slot = input_mt_get_slot_by_key(input, data[0]); 1138 int slot = input_mt_get_slot_by_key(input, data[0]);
@@ -1122,14 +1148,23 @@ static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)
1122 if (touch) { 1148 if (touch) {
1123 int x = (data[2] << 4) | (data[4] >> 4); 1149 int x = (data[2] << 4) | (data[4] >> 4);
1124 int y = (data[3] << 4) | (data[4] & 0x0f); 1150 int y = (data[3] << 4) | (data[4] & 0x0f);
1125 int a = data[5]; 1151 int width, height;
1126 1152
1127 // "a" is a scaled-down area which we assume is roughly 1153 if (features->type >= INTUOSPS && features->type <= INTUOSPL) {
1128 // circular and which can be described as: a=(pi*r^2)/C. 1154 width = data[5];
1129 int x_res = input_abs_get_res(input, ABS_X); 1155 height = data[6];
1130 int y_res = input_abs_get_res(input, ABS_Y); 1156 } else {
1131 int width = 2 * int_sqrt(a * WACOM_CONTACT_AREA_SCALE); 1157 /*
1132 int height = width * y_res / x_res; 1158 * "a" is a scaled-down area which we assume is
1159 * roughly circular and which can be described as:
1160 * a=(pi*r^2)/C.
1161 */
1162 int a = data[5];
1163 int x_res = input_abs_get_res(input, ABS_X);
1164 int y_res = input_abs_get_res(input, ABS_Y);
1165 width = 2 * int_sqrt(a * WACOM_CONTACT_AREA_SCALE);
1166 height = width * y_res / x_res;
1167 }
1133 1168
1134 input_report_abs(input, ABS_MT_POSITION_X, x); 1169 input_report_abs(input, ABS_MT_POSITION_X, x);
1135 input_report_abs(input, ABS_MT_POSITION_Y, y); 1170 input_report_abs(input, ABS_MT_POSITION_Y, y);
@@ -1327,6 +1362,7 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)
1327 case WACOM_22HD: 1362 case WACOM_22HD:
1328 case WACOM_24HD: 1363 case WACOM_24HD:
1329 case DTK: 1364 case DTK:
1365 case CINTIQ_HYBRID:
1330 sync = wacom_intuos_irq(wacom_wac); 1366 sync = wacom_intuos_irq(wacom_wac);
1331 break; 1367 break;
1332 1368
@@ -1337,6 +1373,9 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)
1337 case INTUOS5S: 1373 case INTUOS5S:
1338 case INTUOS5: 1374 case INTUOS5:
1339 case INTUOS5L: 1375 case INTUOS5L:
1376 case INTUOSPS:
1377 case INTUOSPM:
1378 case INTUOSPL:
1340 if (len == WACOM_PKGLEN_BBTOUCH3) 1379 if (len == WACOM_PKGLEN_BBTOUCH3)
1341 sync = wacom_bpt3_touch(wacom_wac); 1380 sync = wacom_bpt3_touch(wacom_wac);
1342 else 1381 else
@@ -1420,7 +1459,7 @@ void wacom_setup_device_quirks(struct wacom_features *features)
1420 1459
1421 /* these device have multiple inputs */ 1460 /* these device have multiple inputs */
1422 if (features->type >= WIRELESS || 1461 if (features->type >= WIRELESS ||
1423 (features->type >= INTUOS5S && features->type <= INTUOS5L) || 1462 (features->type >= INTUOS5S && features->type <= INTUOSPL) ||
1424 (features->oVid && features->oPid)) 1463 (features->oVid && features->oPid))
1425 features->quirks |= WACOM_QUIRK_MULTI_INPUT; 1464 features->quirks |= WACOM_QUIRK_MULTI_INPUT;
1426 1465
@@ -1627,6 +1666,8 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
1627 1666
1628 case INTUOS5: 1667 case INTUOS5:
1629 case INTUOS5L: 1668 case INTUOS5L:
1669 case INTUOSPM:
1670 case INTUOSPL:
1630 if (features->device_type == BTN_TOOL_PEN) { 1671 if (features->device_type == BTN_TOOL_PEN) {
1631 __set_bit(BTN_7, input_dev->keybit); 1672 __set_bit(BTN_7, input_dev->keybit);
1632 __set_bit(BTN_8, input_dev->keybit); 1673 __set_bit(BTN_8, input_dev->keybit);
@@ -1634,6 +1675,7 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
1634 /* fall through */ 1675 /* fall through */
1635 1676
1636 case INTUOS5S: 1677 case INTUOS5S:
1678 case INTUOSPS:
1637 __set_bit(INPUT_PROP_POINTER, input_dev->propbit); 1679 __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
1638 1680
1639 if (features->device_type == BTN_TOOL_PEN) { 1681 if (features->device_type == BTN_TOOL_PEN) {
@@ -1765,6 +1807,24 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
1765 0, 0); 1807 0, 0);
1766 } 1808 }
1767 break; 1809 break;
1810
1811 case CINTIQ_HYBRID:
1812 __set_bit(BTN_1, input_dev->keybit);
1813 __set_bit(BTN_2, input_dev->keybit);
1814 __set_bit(BTN_3, input_dev->keybit);
1815 __set_bit(BTN_4, input_dev->keybit);
1816
1817 __set_bit(BTN_5, input_dev->keybit);
1818 __set_bit(BTN_6, input_dev->keybit);
1819 __set_bit(BTN_7, input_dev->keybit);
1820 __set_bit(BTN_8, input_dev->keybit);
1821 __set_bit(BTN_0, input_dev->keybit);
1822
1823 input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0);
1824 __set_bit(INPUT_PROP_DIRECT, input_dev->propbit);
1825
1826 wacom_setup_cintiq(wacom_wac);
1827 break;
1768 } 1828 }
1769 return 0; 1829 return 0;
1770} 1830}
@@ -1952,6 +2012,18 @@ static const struct wacom_features wacom_features_0x29 =
1952static const struct wacom_features wacom_features_0x2A = 2012static const struct wacom_features wacom_features_0x2A =
1953 { "Wacom Intuos5 M", WACOM_PKGLEN_INTUOS, 44704, 27940, 2047, 2013 { "Wacom Intuos5 M", WACOM_PKGLEN_INTUOS, 44704, 27940, 2047,
1954 63, INTUOS5, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 2014 63, INTUOS5, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
2015static const struct wacom_features wacom_features_0x314 =
2016 { "Wacom Intuos Pro S", WACOM_PKGLEN_INTUOS, 31496, 19685, 2047,
2017 63, INTUOSPS, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES,
2018 .touch_max = 16 };
2019static const struct wacom_features wacom_features_0x315 =
2020 { "Wacom Intuos Pro M", WACOM_PKGLEN_INTUOS, 44704, 27940, 2047,
2021 63, INTUOSPM, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES,
2022 .touch_max = 16 };
2023static const struct wacom_features wacom_features_0x317 =
2024 { "Wacom Intuos Pro L", WACOM_PKGLEN_INTUOS, 65024, 40640, 2047,
2025 63, INTUOSPL, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES,
2026 .touch_max = 16 };
1955static const struct wacom_features wacom_features_0xF4 = 2027static const struct wacom_features wacom_features_0xF4 =
1956 { "Wacom Cintiq 24HD", WACOM_PKGLEN_INTUOS, 104480, 65600, 2047, 2028 { "Wacom Cintiq 24HD", WACOM_PKGLEN_INTUOS, 104480, 65600, 2047,
1957 63, WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 2029 63, WACOM_24HD, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
@@ -2131,6 +2203,13 @@ static const struct wacom_features wacom_features_0x301 =
2131static const struct wacom_features wacom_features_0x6004 = 2203static const struct wacom_features wacom_features_0x6004 =
2132 { "ISD-V4", WACOM_PKGLEN_GRAPHIRE, 12800, 8000, 255, 2204 { "ISD-V4", WACOM_PKGLEN_GRAPHIRE, 12800, 8000, 255,
2133 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 2205 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
2206static const struct wacom_features wacom_features_0x0307 =
2207 { "Wacom ISDv5 307", WACOM_PKGLEN_INTUOS, 59552, 33848, 2047,
2208 63, CINTIQ_HYBRID, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES,
2209 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x309 };
2210static const struct wacom_features wacom_features_0x0309 =
2211 { "Wacom ISDv5 309", .type = WACOM_24HDT, /* Touch */
2212 .oVid = USB_VENDOR_ID_WACOM, .oPid = 0x0307, .touch_max = 10 };
2134 2213
2135#define USB_DEVICE_WACOM(prod) \ 2214#define USB_DEVICE_WACOM(prod) \
2136 USB_DEVICE(USB_VENDOR_ID_WACOM, prod), \ 2215 USB_DEVICE(USB_VENDOR_ID_WACOM, prod), \
@@ -2259,12 +2338,17 @@ const struct usb_device_id wacom_ids[] = {
2259 { USB_DEVICE_WACOM(0x300) }, 2338 { USB_DEVICE_WACOM(0x300) },
2260 { USB_DEVICE_WACOM(0x301) }, 2339 { USB_DEVICE_WACOM(0x301) },
2261 { USB_DEVICE_WACOM(0x304) }, 2340 { USB_DEVICE_WACOM(0x304) },
2341 { USB_DEVICE_DETAILED(0x314, USB_CLASS_HID, 0, 0) },
2342 { USB_DEVICE_DETAILED(0x315, USB_CLASS_HID, 0, 0) },
2343 { USB_DEVICE_DETAILED(0x317, USB_CLASS_HID, 0, 0) },
2262 { USB_DEVICE_WACOM(0x4001) }, 2344 { USB_DEVICE_WACOM(0x4001) },
2263 { USB_DEVICE_WACOM(0x47) }, 2345 { USB_DEVICE_WACOM(0x47) },
2264 { USB_DEVICE_WACOM(0xF4) }, 2346 { USB_DEVICE_WACOM(0xF4) },
2265 { USB_DEVICE_WACOM(0xF8) }, 2347 { USB_DEVICE_WACOM(0xF8) },
2266 { USB_DEVICE_DETAILED(0xF6, USB_CLASS_HID, 0, 0) }, 2348 { USB_DEVICE_DETAILED(0xF6, USB_CLASS_HID, 0, 0) },
2267 { USB_DEVICE_WACOM(0xFA) }, 2349 { USB_DEVICE_WACOM(0xFA) },
2350 { USB_DEVICE_WACOM(0x0307) },
2351 { USB_DEVICE_DETAILED(0x0309, USB_CLASS_HID, 0, 0) },
2268 { USB_DEVICE_LENOVO(0x6004) }, 2352 { USB_DEVICE_LENOVO(0x6004) },
2269 { } 2353 { }
2270}; 2354};
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
index dfc9e08e7f70..fd23a3790605 100644
--- a/drivers/input/tablet/wacom_wac.h
+++ b/drivers/input/tablet/wacom_wac.h
@@ -14,6 +14,8 @@
14/* maximum packet length for USB devices */ 14/* maximum packet length for USB devices */
15#define WACOM_PKGLEN_MAX 64 15#define WACOM_PKGLEN_MAX 64
16 16
17#define WACOM_NAME_MAX 64
18
17/* packet length for individual models */ 19/* packet length for individual models */
18#define WACOM_PKGLEN_PENPRTN 7 20#define WACOM_PKGLEN_PENPRTN 7
19#define WACOM_PKGLEN_GRAPHIRE 8 21#define WACOM_PKGLEN_GRAPHIRE 8
@@ -76,10 +78,14 @@ enum {
76 INTUOS5S, 78 INTUOS5S,
77 INTUOS5, 79 INTUOS5,
78 INTUOS5L, 80 INTUOS5L,
81 INTUOSPS,
82 INTUOSPM,
83 INTUOSPL,
79 WACOM_21UX2, 84 WACOM_21UX2,
80 WACOM_22HD, 85 WACOM_22HD,
81 DTK, 86 DTK,
82 WACOM_24HD, 87 WACOM_24HD,
88 CINTIQ_HYBRID,
83 CINTIQ, 89 CINTIQ,
84 WACOM_BEE, 90 WACOM_BEE,
85 WACOM_13HD, 91 WACOM_13HD,
@@ -126,7 +132,7 @@ struct wacom_shared {
126}; 132};
127 133
128struct wacom_wac { 134struct wacom_wac {
129 char name[64]; 135 char name[WACOM_NAME_MAX];
130 unsigned char *data; 136 unsigned char *data;
131 int tool[2]; 137 int tool[2];
132 int id[2]; 138 int id[2];