@@ -1176,10 +1176,16 @@ static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)
1176
1176
static void wacom_bpt3_button_msg (struct wacom_wac * wacom , unsigned char * data )
1177
1177
{
1178
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
1188
input_report_key (input , BTN_FORWARD , (data [1 ] & 0x04 ) != 0 );
1182
- input_report_key (input , BTN_BACK , (data [1 ] & 0x02 ) != 0 );
1183
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
1223
unsigned char * data = wacom -> data ;
1218
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
1227
return 0 ;
1222
1228
1223
1229
prox = (data [1 ] & 0x20 ) == 0x20 ;
@@ -1297,7 +1303,7 @@ static int wacom_wireless_irq(struct wacom_wac *wacom, size_t len)
1297
1303
unsigned char * data = wacom -> data ;
1298
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
1307
return 0 ;
1302
1308
1303
1309
connected = data [1 ] & 0x01 ;
@@ -1391,6 +1397,7 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)
1391
1397
break ;
1392
1398
1393
1399
case BAMBOO_PT :
1400
+ case INTUOSHT :
1394
1401
sync = wacom_bpt_irq (wacom_wac , len );
1395
1402
break ;
1396
1403
@@ -1459,7 +1466,7 @@ void wacom_setup_device_quirks(struct wacom_features *features)
1459
1466
1460
1467
/* these device have multiple inputs */
1461
1468
if (features -> type >= WIRELESS ||
1462
- (features -> type >= INTUOS5S && features -> type <= INTUOSPL ) ||
1469
+ (features -> type >= INTUOS5S && features -> type <= INTUOSHT ) ||
1463
1470
(features -> oVid && features -> oPid ))
1464
1471
features -> quirks |= WACOM_QUIRK_MULTI_INPUT ;
1465
1472
@@ -1771,33 +1778,43 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
1771
1778
__set_bit (INPUT_PROP_POINTER , input_dev -> propbit );
1772
1779
break ;
1773
1780
1781
+ case INTUOSHT :
1774
1782
case BAMBOO_PT :
1775
1783
__clear_bit (ABS_MISC , input_dev -> absbit );
1776
1784
1777
- __set_bit (INPUT_PROP_POINTER , input_dev -> propbit );
1778
-
1779
1785
if (features -> device_type == BTN_TOOL_FINGER ) {
1780
- unsigned int flags = INPUT_MT_POINTER ;
1781
1786
1782
1787
__set_bit (BTN_LEFT , input_dev -> keybit );
1783
1788
__set_bit (BTN_FORWARD , input_dev -> keybit );
1784
1789
__set_bit (BTN_BACK , input_dev -> keybit );
1785
1790
__set_bit (BTN_RIGHT , input_dev -> keybit );
1786
1791
1787
- if (features -> pktlen == WACOM_PKGLEN_BBTOUCH3 ) {
1788
- input_set_abs_params (input_dev ,
1792
+ if (features -> touch_max ) {
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
1799
ABS_MT_TOUCH_MAJOR ,
1790
1800
0 , features -> x_max , 0 , 0 );
1791
- input_set_abs_params (input_dev ,
1801
+ input_set_abs_params (input_dev ,
1792
1802
ABS_MT_TOUCH_MINOR ,
1793
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
1810
} else {
1795
- __set_bit (BTN_TOOL_FINGER , input_dev -> keybit );
1796
- __set_bit (BTN_TOOL_DOUBLETAP , input_dev -> keybit );
1797
- flags = 0 ;
1811
+ /* buttons/keys only interface */
1812
+ __clear_bit (ABS_X , input_dev -> absbit );
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
1816
} else if (features -> device_type == BTN_TOOL_PEN ) {
1817
+ __set_bit (INPUT_PROP_POINTER , input_dev -> propbit );
1801
1818
__set_bit (BTN_TOOL_RUBBER , input_dev -> keybit );
1802
1819
__set_bit (BTN_TOOL_PEN , input_dev -> keybit );
1803
1820
__set_bit (BTN_STYLUS , input_dev -> keybit );
@@ -2194,6 +2211,17 @@ static const struct wacom_features wacom_features_0x300 =
2194
2211
static const struct wacom_features wacom_features_0x301 =
2195
2212
{ "Wacom Bamboo One M" , WACOM_PKGLEN_BBPEN , 21648 , 13530 , 1023 ,
2196
2213
31 , BAMBOO_PT , WACOM_INTUOS_RES , WACOM_INTUOS_RES };
2214
+ static 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 };
2218
+ static 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 };
2222
+ static 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 };
2197
2225
static const struct wacom_features wacom_features_0x6004 =
2198
2226
{ "ISD-V4" , WACOM_PKGLEN_GRAPHIRE , 12800 , 8000 , 255 ,
2199
2227
0 , TABLETPC , WACOM_INTUOS_RES , WACOM_INTUOS_RES };
@@ -2329,6 +2357,9 @@ const struct usb_device_id wacom_ids[] = {
2329
2357
{ USB_DEVICE_WACOM (0x10D ) },
2330
2358
{ USB_DEVICE_WACOM (0x300 ) },
2331
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
2363
{ USB_DEVICE_WACOM (0x304 ) },
2333
2364
{ USB_DEVICE_DETAILED (0x314 , USB_CLASS_HID , 0 , 0 ) },
2334
2365
{ USB_DEVICE_DETAILED (0x315 , USB_CLASS_HID , 0 , 0 ) },
0 commit comments