diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-09-07 17:18:36 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-09-07 17:18:36 -0400 |
commit | 7e66eaf14e19c032433be7c4df3c892fa2a5282f (patch) | |
tree | 56b0d5f9d16eb18744e102f3f216715196cd62e6 /drivers/input/tablet | |
parent | d3654d7ef3adad0083525cfb6fe27be62cb83d0d (diff) | |
parent | c6a389f123b9f68d605bb7e0f9b32ec1e3e14132 (diff) |
Merge commit 'v3.1-rc4' into next
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 17 | ||||
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 4 |
2 files changed, 14 insertions, 7 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 449c0a46dbac..d27c9d91630b 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -49,6 +49,7 @@ struct hid_descriptor { | |||
49 | #define USB_REQ_GET_REPORT 0x01 | 49 | #define USB_REQ_GET_REPORT 0x01 |
50 | #define USB_REQ_SET_REPORT 0x09 | 50 | #define USB_REQ_SET_REPORT 0x09 |
51 | #define WAC_HID_FEATURE_REPORT 0x03 | 51 | #define WAC_HID_FEATURE_REPORT 0x03 |
52 | #define WAC_MSG_RETRIES 5 | ||
52 | 53 | ||
53 | static int usb_get_report(struct usb_interface *intf, unsigned char type, | 54 | static int usb_get_report(struct usb_interface *intf, unsigned char type, |
54 | unsigned char id, void *buf, int size) | 55 | unsigned char id, void *buf, int size) |
@@ -165,7 +166,7 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi | |||
165 | report, | 166 | report, |
166 | hid_desc->wDescriptorLength, | 167 | hid_desc->wDescriptorLength, |
167 | 5000); /* 5 secs */ | 168 | 5000); /* 5 secs */ |
168 | } while (result < 0 && limit++ < 5); | 169 | } while (result < 0 && limit++ < WAC_MSG_RETRIES); |
169 | 170 | ||
170 | /* No need to parse the Descriptor. It isn't an error though */ | 171 | /* No need to parse the Descriptor. It isn't an error though */ |
171 | if (result < 0) | 172 | if (result < 0) |
@@ -319,24 +320,26 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat | |||
319 | int limit = 0, report_id = 2; | 320 | int limit = 0, report_id = 2; |
320 | int error = -ENOMEM; | 321 | int error = -ENOMEM; |
321 | 322 | ||
322 | rep_data = kmalloc(2, GFP_KERNEL); | 323 | rep_data = kmalloc(4, GFP_KERNEL); |
323 | if (!rep_data) | 324 | if (!rep_data) |
324 | return error; | 325 | return error; |
325 | 326 | ||
326 | /* ask to report tablet data if it is 2FGT Tablet PC or | 327 | /* ask to report tablet data if it is MT Tablet PC or |
327 | * not a Tablet PC */ | 328 | * not a Tablet PC */ |
328 | if (features->type == TABLETPC2FG) { | 329 | if (features->type == TABLETPC2FG) { |
329 | do { | 330 | do { |
330 | rep_data[0] = 3; | 331 | rep_data[0] = 3; |
331 | rep_data[1] = 4; | 332 | rep_data[1] = 4; |
333 | rep_data[2] = 0; | ||
334 | rep_data[3] = 0; | ||
332 | report_id = 3; | 335 | report_id = 3; |
333 | error = usb_set_report(intf, WAC_HID_FEATURE_REPORT, | 336 | error = usb_set_report(intf, WAC_HID_FEATURE_REPORT, |
334 | report_id, rep_data, 2); | 337 | report_id, rep_data, 4); |
335 | if (error >= 0) | 338 | if (error >= 0) |
336 | error = usb_get_report(intf, | 339 | error = usb_get_report(intf, |
337 | WAC_HID_FEATURE_REPORT, report_id, | 340 | WAC_HID_FEATURE_REPORT, report_id, |
338 | rep_data, 3); | 341 | rep_data, 4); |
339 | } while ((error < 0 || rep_data[1] != 4) && limit++ < 5); | 342 | } while ((error < 0 || rep_data[1] != 4) && limit++ < WAC_MSG_RETRIES); |
340 | } else if (features->type != TABLETPC) { | 343 | } else if (features->type != TABLETPC) { |
341 | do { | 344 | do { |
342 | rep_data[0] = 2; | 345 | rep_data[0] = 2; |
@@ -347,7 +350,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat | |||
347 | error = usb_get_report(intf, | 350 | error = usb_get_report(intf, |
348 | WAC_HID_FEATURE_REPORT, report_id, | 351 | WAC_HID_FEATURE_REPORT, report_id, |
349 | rep_data, 2); | 352 | rep_data, 2); |
350 | } while ((error < 0 || rep_data[1] != 2) && limit++ < 5); | 353 | } while ((error < 0 || rep_data[1] != 2) && limit++ < WAC_MSG_RETRIES); |
351 | } | 354 | } |
352 | 355 | ||
353 | kfree(rep_data); | 356 | kfree(rep_data); |
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index 03ebcc8b24b5..c1c2f7b28d89 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c | |||
@@ -1460,6 +1460,9 @@ static const struct wacom_features wacom_features_0xD3 = | |||
1460 | static const struct wacom_features wacom_features_0xD4 = | 1460 | static const struct wacom_features wacom_features_0xD4 = |
1461 | { "Wacom Bamboo Pen", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, | 1461 | { "Wacom Bamboo Pen", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, |
1462 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | 1462 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
1463 | static const struct wacom_features wacom_features_0xD5 = | ||
1464 | { "Wacom Bamboo Pen 6x8", WACOM_PKGLEN_BBFUN, 21648, 13530, 1023, | ||
1465 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | ||
1463 | static const struct wacom_features wacom_features_0xD6 = | 1466 | static const struct wacom_features wacom_features_0xD6 = |
1464 | { "Wacom BambooPT 2FG 4x5", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, | 1467 | { "Wacom BambooPT 2FG 4x5", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, |
1465 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; | 1468 | 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; |
@@ -1564,6 +1567,7 @@ const struct usb_device_id wacom_ids[] = { | |||
1564 | { USB_DEVICE_WACOM(0xD2) }, | 1567 | { USB_DEVICE_WACOM(0xD2) }, |
1565 | { USB_DEVICE_WACOM(0xD3) }, | 1568 | { USB_DEVICE_WACOM(0xD3) }, |
1566 | { USB_DEVICE_WACOM(0xD4) }, | 1569 | { USB_DEVICE_WACOM(0xD4) }, |
1570 | { USB_DEVICE_WACOM(0xD5) }, | ||
1567 | { USB_DEVICE_WACOM(0xD6) }, | 1571 | { USB_DEVICE_WACOM(0xD6) }, |
1568 | { USB_DEVICE_WACOM(0xD7) }, | 1572 | { USB_DEVICE_WACOM(0xD7) }, |
1569 | { USB_DEVICE_WACOM(0xD8) }, | 1573 | { USB_DEVICE_WACOM(0xD8) }, |