aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r--drivers/input/tablet/wacom_sys.c6
-rw-r--r--drivers/input/tablet/wacom_wac.c61
-rw-r--r--drivers/input/tablet/wacom_wac.h2
3 files changed, 51 insertions, 18 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 3d71b608330e..3a7d99c720cd 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -1198,7 +1198,8 @@ static void wacom_wireless_work(struct work_struct *work)
1198 goto fail; 1198 goto fail;
1199 1199
1200 /* Touch interface */ 1200 /* Touch interface */
1201 if (wacom_wac1->features.touch_max) { 1201 if (wacom_wac1->features.touch_max ||
1202 wacom_wac1->features.type == INTUOSHT) {
1202 wacom_wac2->features = 1203 wacom_wac2->features =
1203 *((struct wacom_features *)id->driver_info); 1204 *((struct wacom_features *)id->driver_info);
1204 wacom_wac2->features.pktlen = WACOM_PKGLEN_BBTOUCH3; 1205 wacom_wac2->features.pktlen = WACOM_PKGLEN_BBTOUCH3;
@@ -1321,7 +1322,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
1321 * HID descriptor. If this is the touch interface (wMaxPacketSize 1322 * HID descriptor. If this is the touch interface (wMaxPacketSize
1322 * of WACOM_PKGLEN_BBTOUCH3), override the table values. 1323 * of WACOM_PKGLEN_BBTOUCH3), override the table values.
1323 */ 1324 */
1324 if (features->type >= INTUOS5S && features->type <= INTUOSPL) { 1325 if (features->type >= INTUOS5S && features->type <= INTUOSHT) {
1325 if (endpoint->wMaxPacketSize == WACOM_PKGLEN_BBTOUCH3) { 1326 if (endpoint->wMaxPacketSize == WACOM_PKGLEN_BBTOUCH3) {
1326 features->device_type = BTN_TOOL_FINGER; 1327 features->device_type = BTN_TOOL_FINGER;
1327 features->pktlen = WACOM_PKGLEN_BBTOUCH3; 1328 features->pktlen = WACOM_PKGLEN_BBTOUCH3;
@@ -1391,7 +1392,6 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
1391 goto fail5; 1392 goto fail5;
1392 } 1393 }
1393 } 1394 }
1394
1395 return 0; 1395 return 0;
1396 1396
1397 fail5: wacom_destroy_leds(wacom); 1397 fail5: wacom_destroy_leds(wacom);
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 3f75f1d3b348..eb60a284be05 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1176,10 +1176,16 @@ static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)
1176static void wacom_bpt3_button_msg(struct wacom_wac *wacom, unsigned char *data) 1176static void wacom_bpt3_button_msg(struct wacom_wac *wacom, unsigned char *data)
1177{ 1177{
1178 struct input_dev *input = wacom->input; 1178 struct input_dev *input = wacom->input;
1179 struct wacom_features *features = &wacom->features;
1179 1180
1180 input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0); 1181 if (features->type == INTUOSHT) {
1182 input_report_key(input, BTN_LEFT, (data[1] & 0x02) != 0);
1183 input_report_key(input, BTN_BACK, (data[1] & 0x08) != 0);
1184 } else {
1185 input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0);
1186 input_report_key(input, BTN_LEFT, (data[1] & 0x08) != 0);
1187 }
1181 input_report_key(input, BTN_FORWARD, (data[1] & 0x04) != 0); 1188 input_report_key(input, BTN_FORWARD, (data[1] & 0x04) != 0);
1182 input_report_key(input, BTN_BACK, (data[1] & 0x02) != 0);
1183 input_report_key(input, BTN_RIGHT, (data[1] & 0x01) != 0); 1189 input_report_key(input, BTN_RIGHT, (data[1] & 0x01) != 0);
1184} 1190}
1185 1191
@@ -1217,7 +1223,7 @@ static int wacom_bpt_pen(struct wacom_wac *wacom)
1217 unsigned char *data = wacom->data; 1223 unsigned char *data = wacom->data;
1218 int prox = 0, x = 0, y = 0, p = 0, d = 0, pen = 0, btn1 = 0, btn2 = 0; 1224 int prox = 0, x = 0, y = 0, p = 0, d = 0, pen = 0, btn1 = 0, btn2 = 0;
1219 1225
1220 if (data[0] != 0x02) 1226 if (data[0] != WACOM_REPORT_PENABLED)
1221 return 0; 1227 return 0;
1222 1228
1223 prox = (data[1] & 0x20) == 0x20; 1229 prox = (data[1] & 0x20) == 0x20;
@@ -1297,7 +1303,7 @@ static int wacom_wireless_irq(struct wacom_wac *wacom, size_t len)
1297 unsigned char *data = wacom->data; 1303 unsigned char *data = wacom->data;
1298 int connected; 1304 int connected;
1299 1305
1300 if (len != WACOM_PKGLEN_WIRELESS || data[0] != 0x80) 1306 if (len != WACOM_PKGLEN_WIRELESS || data[0] != WACOM_REPORT_WL)
1301 return 0; 1307 return 0;
1302 1308
1303 connected = data[1] & 0x01; 1309 connected = data[1] & 0x01;
@@ -1391,6 +1397,7 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)
1391 break; 1397 break;
1392 1398
1393 case BAMBOO_PT: 1399 case BAMBOO_PT:
1400 case INTUOSHT:
1394 sync = wacom_bpt_irq(wacom_wac, len); 1401 sync = wacom_bpt_irq(wacom_wac, len);
1395 break; 1402 break;
1396 1403
@@ -1459,7 +1466,7 @@ void wacom_setup_device_quirks(struct wacom_features *features)
1459 1466
1460 /* these device have multiple inputs */ 1467 /* these device have multiple inputs */
1461 if (features->type >= WIRELESS || 1468 if (features->type >= WIRELESS ||
1462 (features->type >= INTUOS5S && features->type <= INTUOSPL) || 1469 (features->type >= INTUOS5S && features->type <= INTUOSHT) ||
1463 (features->oVid && features->oPid)) 1470 (features->oVid && features->oPid))
1464 features->quirks |= WACOM_QUIRK_MULTI_INPUT; 1471 features->quirks |= WACOM_QUIRK_MULTI_INPUT;
1465 1472
@@ -1771,33 +1778,43 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
1771 __set_bit(INPUT_PROP_POINTER, input_dev->propbit); 1778 __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
1772 break; 1779 break;
1773 1780
1781 case INTUOSHT:
1774 case BAMBOO_PT: 1782 case BAMBOO_PT:
1775 __clear_bit(ABS_MISC, input_dev->absbit); 1783 __clear_bit(ABS_MISC, input_dev->absbit);
1776 1784
1777 __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
1778
1779 if (features->device_type == BTN_TOOL_FINGER) { 1785 if (features->device_type == BTN_TOOL_FINGER) {
1780 unsigned int flags = INPUT_MT_POINTER;
1781 1786
1782 __set_bit(BTN_LEFT, input_dev->keybit); 1787 __set_bit(BTN_LEFT, input_dev->keybit);
1783 __set_bit(BTN_FORWARD, input_dev->keybit); 1788 __set_bit(BTN_FORWARD, input_dev->keybit);
1784 __set_bit(BTN_BACK, input_dev->keybit); 1789 __set_bit(BTN_BACK, input_dev->keybit);
1785 __set_bit(BTN_RIGHT, input_dev->keybit); 1790 __set_bit(BTN_RIGHT, input_dev->keybit);
1786 1791
1787 if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) { 1792 if (features->touch_max) {
1788 input_set_abs_params(input_dev, 1793 /* touch interface */
1794 unsigned int flags = INPUT_MT_POINTER;
1795
1796 __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
1797 if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) {
1798 input_set_abs_params(input_dev,
1789 ABS_MT_TOUCH_MAJOR, 1799 ABS_MT_TOUCH_MAJOR,
1790 0, features->x_max, 0, 0); 1800 0, features->x_max, 0, 0);
1791 input_set_abs_params(input_dev, 1801 input_set_abs_params(input_dev,
1792 ABS_MT_TOUCH_MINOR, 1802 ABS_MT_TOUCH_MINOR,
1793 0, features->y_max, 0, 0); 1803 0, features->y_max, 0, 0);
1804 } else {
1805 __set_bit(BTN_TOOL_FINGER, input_dev->keybit);
1806 __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit);
1807 flags = 0;
1808 }
1809 input_mt_init_slots(input_dev, features->touch_max, flags);
1794 } else { 1810 } else {
1795 __set_bit(BTN_TOOL_FINGER, input_dev->keybit); 1811 /* buttons/keys only interface */
1796 __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit); 1812 __clear_bit(ABS_X, input_dev->absbit);
1797 flags = 0; 1813 __clear_bit(ABS_Y, input_dev->absbit);
1814 __clear_bit(BTN_TOUCH, input_dev->keybit);
1798 } 1815 }
1799 input_mt_init_slots(input_dev, features->touch_max, flags);
1800 } else if (features->device_type == BTN_TOOL_PEN) { 1816 } else if (features->device_type == BTN_TOOL_PEN) {
1817 __set_bit(INPUT_PROP_POINTER, input_dev->propbit);
1801 __set_bit(BTN_TOOL_RUBBER, input_dev->keybit); 1818 __set_bit(BTN_TOOL_RUBBER, input_dev->keybit);
1802 __set_bit(BTN_TOOL_PEN, input_dev->keybit); 1819 __set_bit(BTN_TOOL_PEN, input_dev->keybit);
1803 __set_bit(BTN_STYLUS, input_dev->keybit); 1820 __set_bit(BTN_STYLUS, input_dev->keybit);
@@ -2194,6 +2211,17 @@ static const struct wacom_features wacom_features_0x300 =
2194static const struct wacom_features wacom_features_0x301 = 2211static const struct wacom_features wacom_features_0x301 =
2195 { "Wacom Bamboo One M", WACOM_PKGLEN_BBPEN, 21648, 13530, 1023, 2212 { "Wacom Bamboo One M", WACOM_PKGLEN_BBPEN, 21648, 13530, 1023,
2196 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 2213 31, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
2214static const struct wacom_features wacom_features_0x302 =
2215 { "Wacom Intuos PT S", WACOM_PKGLEN_BBPEN, 15200, 9500, 1023,
2216 31, INTUOSHT, WACOM_INTUOS_RES, WACOM_INTUOS_RES,
2217 .touch_max = 16 };
2218static const struct wacom_features wacom_features_0x303 =
2219 { "Wacom Intuos PT M", WACOM_PKGLEN_BBPEN, 21600, 13500, 1023,
2220 31, INTUOSHT, WACOM_INTUOS_RES, WACOM_INTUOS_RES,
2221 .touch_max = 16 };
2222static const struct wacom_features wacom_features_0x30E =
2223 { "Wacom Intuos S", WACOM_PKGLEN_BBPEN, 15200, 9500, 1023,
2224 31, INTUOSHT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
2197static const struct wacom_features wacom_features_0x6004 = 2225static const struct wacom_features wacom_features_0x6004 =
2198 { "ISD-V4", WACOM_PKGLEN_GRAPHIRE, 12800, 8000, 255, 2226 { "ISD-V4", WACOM_PKGLEN_GRAPHIRE, 12800, 8000, 255,
2199 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 2227 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
@@ -2329,6 +2357,9 @@ const struct usb_device_id wacom_ids[] = {
2329 { USB_DEVICE_WACOM(0x10D) }, 2357 { USB_DEVICE_WACOM(0x10D) },
2330 { USB_DEVICE_WACOM(0x300) }, 2358 { USB_DEVICE_WACOM(0x300) },
2331 { USB_DEVICE_WACOM(0x301) }, 2359 { USB_DEVICE_WACOM(0x301) },
2360 { USB_DEVICE_DETAILED(0x302, USB_CLASS_HID, 0, 0) },
2361 { USB_DEVICE_DETAILED(0x303, USB_CLASS_HID, 0, 0) },
2362 { USB_DEVICE_DETAILED(0x30E, USB_CLASS_HID, 0, 0) },
2332 { USB_DEVICE_WACOM(0x304) }, 2363 { USB_DEVICE_WACOM(0x304) },
2333 { USB_DEVICE_DETAILED(0x314, USB_CLASS_HID, 0, 0) }, 2364 { USB_DEVICE_DETAILED(0x314, USB_CLASS_HID, 0, 0) },
2334 { USB_DEVICE_DETAILED(0x315, USB_CLASS_HID, 0, 0) }, 2365 { USB_DEVICE_DETAILED(0x315, USB_CLASS_HID, 0, 0) },
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
index fd23a3790605..854cceb6d6de 100644
--- a/drivers/input/tablet/wacom_wac.h
+++ b/drivers/input/tablet/wacom_wac.h
@@ -54,6 +54,7 @@
54#define WACOM_REPORT_TPCST 16 54#define WACOM_REPORT_TPCST 16
55#define WACOM_REPORT_TPC1FGE 18 55#define WACOM_REPORT_TPC1FGE 18
56#define WACOM_REPORT_24HDT 1 56#define WACOM_REPORT_24HDT 1
57#define WACOM_REPORT_WL 128
57 58
58/* device quirks */ 59/* device quirks */
59#define WACOM_QUIRK_MULTI_INPUT 0x0001 60#define WACOM_QUIRK_MULTI_INPUT 0x0001
@@ -81,6 +82,7 @@ enum {
81 INTUOSPS, 82 INTUOSPS,
82 INTUOSPM, 83 INTUOSPM,
83 INTUOSPL, 84 INTUOSPL,
85 INTUOSHT,
84 WACOM_21UX2, 86 WACOM_21UX2,
85 WACOM_22HD, 87 WACOM_22HD,
86 DTK, 88 DTK,