diff options
Diffstat (limited to 'drivers/usb/input')
-rw-r--r-- | drivers/usb/input/appletouch.c | 2 | ||||
-rw-r--r-- | drivers/usb/input/ati_remote.c | 174 | ||||
-rw-r--r-- | drivers/usb/input/hid-core.c | 153 | ||||
-rw-r--r-- | drivers/usb/input/usbtouchscreen.c | 2 | ||||
-rw-r--r-- | drivers/usb/input/yealink.c | 12 |
5 files changed, 207 insertions, 136 deletions
diff --git a/drivers/usb/input/appletouch.c b/drivers/usb/input/appletouch.c index 9e3f13903371..044faa07e297 100644 --- a/drivers/usb/input/appletouch.c +++ b/drivers/usb/input/appletouch.c | |||
@@ -597,9 +597,9 @@ static void atp_disconnect(struct usb_interface *iface) | |||
597 | if (dev) { | 597 | if (dev) { |
598 | usb_kill_urb(dev->urb); | 598 | usb_kill_urb(dev->urb); |
599 | input_unregister_device(dev->input); | 599 | input_unregister_device(dev->input); |
600 | usb_free_urb(dev->urb); | ||
601 | usb_buffer_free(dev->udev, dev->datalen, | 600 | usb_buffer_free(dev->udev, dev->datalen, |
602 | dev->data, dev->urb->transfer_dma); | 601 | dev->data, dev->urb->transfer_dma); |
602 | usb_free_urb(dev->urb); | ||
603 | kfree(dev); | 603 | kfree(dev); |
604 | } | 604 | } |
605 | printk(KERN_INFO "input: appletouch disconnected\n"); | 605 | printk(KERN_INFO "input: appletouch disconnected\n"); |
diff --git a/drivers/usb/input/ati_remote.c b/drivers/usb/input/ati_remote.c index 05d2d6012eb2..3719fcb04b8f 100644 --- a/drivers/usb/input/ati_remote.c +++ b/drivers/usb/input/ati_remote.c | |||
@@ -111,14 +111,28 @@ | |||
111 | #define NAME_BUFSIZE 80 /* size of product name, path buffers */ | 111 | #define NAME_BUFSIZE 80 /* size of product name, path buffers */ |
112 | #define DATA_BUFSIZE 63 /* size of URB data buffers */ | 112 | #define DATA_BUFSIZE 63 /* size of URB data buffers */ |
113 | 113 | ||
114 | /* | ||
115 | * Duplicate event filtering time. | ||
116 | * Sequential, identical KIND_FILTERED inputs with less than | ||
117 | * FILTER_TIME milliseconds between them are considered as repeat | ||
118 | * events. The hardware generates 5 events for the first keypress | ||
119 | * and we have to take this into account for an accurate repeat | ||
120 | * behaviour. | ||
121 | */ | ||
122 | #define FILTER_TIME 60 /* msec */ | ||
123 | |||
114 | static unsigned long channel_mask; | 124 | static unsigned long channel_mask; |
115 | module_param(channel_mask, ulong, 0444); | 125 | module_param(channel_mask, ulong, 0644); |
116 | MODULE_PARM_DESC(channel_mask, "Bitmask of remote control channels to ignore"); | 126 | MODULE_PARM_DESC(channel_mask, "Bitmask of remote control channels to ignore"); |
117 | 127 | ||
118 | static int debug; | 128 | static int debug; |
119 | module_param(debug, int, 0444); | 129 | module_param(debug, int, 0644); |
120 | MODULE_PARM_DESC(debug, "Enable extra debug messages and information"); | 130 | MODULE_PARM_DESC(debug, "Enable extra debug messages and information"); |
121 | 131 | ||
132 | static int repeat_filter = FILTER_TIME; | ||
133 | module_param(repeat_filter, int, 0644); | ||
134 | MODULE_PARM_DESC(repeat_filter, "Repeat filter time, default = 60 msec"); | ||
135 | |||
122 | #define dbginfo(dev, format, arg...) do { if (debug) dev_info(dev , format , ## arg); } while (0) | 136 | #define dbginfo(dev, format, arg...) do { if (debug) dev_info(dev , format , ## arg); } while (0) |
123 | #undef err | 137 | #undef err |
124 | #define err(format, arg...) printk(KERN_ERR format , ## arg) | 138 | #define err(format, arg...) printk(KERN_ERR format , ## arg) |
@@ -143,19 +157,6 @@ MODULE_DEVICE_TABLE(usb, ati_remote_table); | |||
143 | static char init1[] = { 0x01, 0x00, 0x20, 0x14 }; | 157 | static char init1[] = { 0x01, 0x00, 0x20, 0x14 }; |
144 | static char init2[] = { 0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 }; | 158 | static char init2[] = { 0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 }; |
145 | 159 | ||
146 | /* Acceleration curve for directional control pad */ | ||
147 | static const char accel[] = { 1, 2, 4, 6, 9, 13, 20 }; | ||
148 | |||
149 | /* Duplicate event filtering time. | ||
150 | * Sequential, identical KIND_FILTERED inputs with less than | ||
151 | * FILTER_TIME jiffies between them are considered as repeat | ||
152 | * events. The hardware generates 5 events for the first keypress | ||
153 | * and we have to take this into account for an accurate repeat | ||
154 | * behaviour. | ||
155 | * (HZ / 20) == 50 ms and works well for me. | ||
156 | */ | ||
157 | #define FILTER_TIME (HZ / 20) | ||
158 | |||
159 | struct ati_remote { | 160 | struct ati_remote { |
160 | struct input_dev *idev; | 161 | struct input_dev *idev; |
161 | struct usb_device *udev; | 162 | struct usb_device *udev; |
@@ -413,6 +414,43 @@ static int ati_remote_event_lookup(int rem, unsigned char d1, unsigned char d2) | |||
413 | } | 414 | } |
414 | 415 | ||
415 | /* | 416 | /* |
417 | * ati_remote_compute_accel | ||
418 | * | ||
419 | * Implements acceleration curve for directional control pad | ||
420 | * If elapsed time since last event is > 1/4 second, user "stopped", | ||
421 | * so reset acceleration. Otherwise, user is probably holding the control | ||
422 | * pad down, so we increase acceleration, ramping up over two seconds to | ||
423 | * a maximum speed. | ||
424 | */ | ||
425 | static int ati_remote_compute_accel(struct ati_remote *ati_remote) | ||
426 | { | ||
427 | static const char accel[] = { 1, 2, 4, 6, 9, 13, 20 }; | ||
428 | unsigned long now = jiffies; | ||
429 | int acc; | ||
430 | |||
431 | if (time_after(now, ati_remote->old_jiffies + msecs_to_jiffies(250))) { | ||
432 | acc = 1; | ||
433 | ati_remote->acc_jiffies = now; | ||
434 | } | ||
435 | else if (time_before(now, ati_remote->acc_jiffies + msecs_to_jiffies(125))) | ||
436 | acc = accel[0]; | ||
437 | else if (time_before(now, ati_remote->acc_jiffies + msecs_to_jiffies(250))) | ||
438 | acc = accel[1]; | ||
439 | else if (time_before(now, ati_remote->acc_jiffies + msecs_to_jiffies(500))) | ||
440 | acc = accel[2]; | ||
441 | else if (time_before(now, ati_remote->acc_jiffies + msecs_to_jiffies(1000))) | ||
442 | acc = accel[3]; | ||
443 | else if (time_before(now, ati_remote->acc_jiffies + msecs_to_jiffies(1500))) | ||
444 | acc = accel[4]; | ||
445 | else if (time_before(now, ati_remote->acc_jiffies + msecs_to_jiffies(2000))) | ||
446 | acc = accel[5]; | ||
447 | else | ||
448 | acc = accel[6]; | ||
449 | |||
450 | return acc; | ||
451 | } | ||
452 | |||
453 | /* | ||
416 | * ati_remote_report_input | 454 | * ati_remote_report_input |
417 | */ | 455 | */ |
418 | static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs) | 456 | static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs) |
@@ -465,9 +503,9 @@ static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs) | |||
465 | 503 | ||
466 | if (ati_remote_tbl[index].kind == KIND_FILTERED) { | 504 | if (ati_remote_tbl[index].kind == KIND_FILTERED) { |
467 | /* Filter duplicate events which happen "too close" together. */ | 505 | /* Filter duplicate events which happen "too close" together. */ |
468 | if ((ati_remote->old_data[0] == data[1]) && | 506 | if (ati_remote->old_data[0] == data[1] && |
469 | (ati_remote->old_data[1] == data[2]) && | 507 | ati_remote->old_data[1] == data[2] && |
470 | time_before(jiffies, ati_remote->old_jiffies + FILTER_TIME)) { | 508 | time_before(jiffies, ati_remote->old_jiffies + msecs_to_jiffies(repeat_filter))) { |
471 | ati_remote->repeat_count++; | 509 | ati_remote->repeat_count++; |
472 | } else { | 510 | } else { |
473 | ati_remote->repeat_count = 0; | 511 | ati_remote->repeat_count = 0; |
@@ -477,75 +515,61 @@ static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs) | |||
477 | ati_remote->old_data[1] = data[2]; | 515 | ati_remote->old_data[1] = data[2]; |
478 | ati_remote->old_jiffies = jiffies; | 516 | ati_remote->old_jiffies = jiffies; |
479 | 517 | ||
480 | if ((ati_remote->repeat_count > 0) | 518 | if (ati_remote->repeat_count > 0 && |
481 | && (ati_remote->repeat_count < 5)) | 519 | ati_remote->repeat_count < 5) |
482 | return; | 520 | return; |
483 | 521 | ||
484 | 522 | ||
485 | input_regs(dev, regs); | 523 | input_regs(dev, regs); |
486 | input_event(dev, ati_remote_tbl[index].type, | 524 | input_event(dev, ati_remote_tbl[index].type, |
487 | ati_remote_tbl[index].code, 1); | 525 | ati_remote_tbl[index].code, 1); |
526 | input_sync(dev); | ||
488 | input_event(dev, ati_remote_tbl[index].type, | 527 | input_event(dev, ati_remote_tbl[index].type, |
489 | ati_remote_tbl[index].code, 0); | 528 | ati_remote_tbl[index].code, 0); |
490 | input_sync(dev); | 529 | input_sync(dev); |
491 | 530 | ||
492 | return; | 531 | } else { |
493 | } | ||
494 | 532 | ||
495 | /* | 533 | /* |
496 | * Other event kinds are from the directional control pad, and have an | 534 | * Other event kinds are from the directional control pad, and have an |
497 | * acceleration factor applied to them. Without this acceleration, the | 535 | * acceleration factor applied to them. Without this acceleration, the |
498 | * control pad is mostly unusable. | 536 | * control pad is mostly unusable. |
499 | * | 537 | */ |
500 | * If elapsed time since last event is > 1/4 second, user "stopped", | 538 | acc = ati_remote_compute_accel(ati_remote); |
501 | * so reset acceleration. Otherwise, user is probably holding the control | 539 | |
502 | * pad down, so we increase acceleration, ramping up over two seconds to | 540 | input_regs(dev, regs); |
503 | * a maximum speed. The acceleration curve is #defined above. | 541 | switch (ati_remote_tbl[index].kind) { |
504 | */ | 542 | case KIND_ACCEL: |
505 | if (time_after(jiffies, ati_remote->old_jiffies + (HZ >> 2))) { | 543 | input_event(dev, ati_remote_tbl[index].type, |
506 | acc = 1; | 544 | ati_remote_tbl[index].code, |
507 | ati_remote->acc_jiffies = jiffies; | 545 | ati_remote_tbl[index].value * acc); |
508 | } | 546 | break; |
509 | else if (time_before(jiffies, ati_remote->acc_jiffies + (HZ >> 3))) acc = accel[0]; | 547 | case KIND_LU: |
510 | else if (time_before(jiffies, ati_remote->acc_jiffies + (HZ >> 2))) acc = accel[1]; | 548 | input_report_rel(dev, REL_X, -acc); |
511 | else if (time_before(jiffies, ati_remote->acc_jiffies + (HZ >> 1))) acc = accel[2]; | 549 | input_report_rel(dev, REL_Y, -acc); |
512 | else if (time_before(jiffies, ati_remote->acc_jiffies + HZ)) acc = accel[3]; | 550 | break; |
513 | else if (time_before(jiffies, ati_remote->acc_jiffies + HZ+(HZ>>1))) acc = accel[4]; | 551 | case KIND_RU: |
514 | else if (time_before(jiffies, ati_remote->acc_jiffies + (HZ << 1))) acc = accel[5]; | 552 | input_report_rel(dev, REL_X, acc); |
515 | else acc = accel[6]; | 553 | input_report_rel(dev, REL_Y, -acc); |
516 | 554 | break; | |
517 | input_regs(dev, regs); | 555 | case KIND_LD: |
518 | switch (ati_remote_tbl[index].kind) { | 556 | input_report_rel(dev, REL_X, -acc); |
519 | case KIND_ACCEL: | 557 | input_report_rel(dev, REL_Y, acc); |
520 | input_event(dev, ati_remote_tbl[index].type, | 558 | break; |
521 | ati_remote_tbl[index].code, | 559 | case KIND_RD: |
522 | ati_remote_tbl[index].value * acc); | 560 | input_report_rel(dev, REL_X, acc); |
523 | break; | 561 | input_report_rel(dev, REL_Y, acc); |
524 | case KIND_LU: | 562 | break; |
525 | input_report_rel(dev, REL_X, -acc); | 563 | default: |
526 | input_report_rel(dev, REL_Y, -acc); | 564 | dev_dbg(&ati_remote->interface->dev, "ati_remote kind=%d\n", |
527 | break; | 565 | ati_remote_tbl[index].kind); |
528 | case KIND_RU: | 566 | } |
529 | input_report_rel(dev, REL_X, acc); | 567 | input_sync(dev); |
530 | input_report_rel(dev, REL_Y, -acc); | ||
531 | break; | ||
532 | case KIND_LD: | ||
533 | input_report_rel(dev, REL_X, -acc); | ||
534 | input_report_rel(dev, REL_Y, acc); | ||
535 | break; | ||
536 | case KIND_RD: | ||
537 | input_report_rel(dev, REL_X, acc); | ||
538 | input_report_rel(dev, REL_Y, acc); | ||
539 | break; | ||
540 | default: | ||
541 | dev_dbg(&ati_remote->interface->dev, "ati_remote kind=%d\n", | ||
542 | ati_remote_tbl[index].kind); | ||
543 | } | ||
544 | input_sync(dev); | ||
545 | 568 | ||
546 | ati_remote->old_jiffies = jiffies; | 569 | ati_remote->old_jiffies = jiffies; |
547 | ati_remote->old_data[0] = data[1]; | 570 | ati_remote->old_data[0] = data[1]; |
548 | ati_remote->old_data[1] = data[2]; | 571 | ati_remote->old_data[1] = data[2]; |
572 | } | ||
549 | } | 573 | } |
550 | 574 | ||
551 | /* | 575 | /* |
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index e3cd0321c59c..bfa267722f1b 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c | |||
@@ -1410,17 +1410,54 @@ void hid_init_reports(struct hid_device *hid) | |||
1410 | warn("timeout initializing reports"); | 1410 | warn("timeout initializing reports"); |
1411 | } | 1411 | } |
1412 | 1412 | ||
1413 | #define USB_VENDOR_ID_GTCO 0x078c | ||
1414 | #define USB_DEVICE_ID_GTCO_90 0x0090 | ||
1415 | #define USB_DEVICE_ID_GTCO_100 0x0100 | ||
1416 | #define USB_DEVICE_ID_GTCO_101 0x0101 | ||
1417 | #define USB_DEVICE_ID_GTCO_103 0x0103 | ||
1418 | #define USB_DEVICE_ID_GTCO_104 0x0104 | ||
1419 | #define USB_DEVICE_ID_GTCO_105 0x0105 | ||
1420 | #define USB_DEVICE_ID_GTCO_106 0x0106 | ||
1421 | #define USB_DEVICE_ID_GTCO_107 0x0107 | ||
1422 | #define USB_DEVICE_ID_GTCO_108 0x0108 | ||
1423 | #define USB_DEVICE_ID_GTCO_200 0x0200 | ||
1424 | #define USB_DEVICE_ID_GTCO_201 0x0201 | ||
1425 | #define USB_DEVICE_ID_GTCO_202 0x0202 | ||
1426 | #define USB_DEVICE_ID_GTCO_203 0x0203 | ||
1427 | #define USB_DEVICE_ID_GTCO_204 0x0204 | ||
1428 | #define USB_DEVICE_ID_GTCO_205 0x0205 | ||
1429 | #define USB_DEVICE_ID_GTCO_206 0x0206 | ||
1430 | #define USB_DEVICE_ID_GTCO_207 0x0207 | ||
1431 | #define USB_DEVICE_ID_GTCO_300 0x0300 | ||
1432 | #define USB_DEVICE_ID_GTCO_301 0x0301 | ||
1433 | #define USB_DEVICE_ID_GTCO_302 0x0302 | ||
1434 | #define USB_DEVICE_ID_GTCO_303 0x0303 | ||
1435 | #define USB_DEVICE_ID_GTCO_304 0x0304 | ||
1436 | #define USB_DEVICE_ID_GTCO_305 0x0305 | ||
1437 | #define USB_DEVICE_ID_GTCO_306 0x0306 | ||
1438 | #define USB_DEVICE_ID_GTCO_307 0x0307 | ||
1439 | #define USB_DEVICE_ID_GTCO_308 0x0308 | ||
1440 | #define USB_DEVICE_ID_GTCO_309 0x0309 | ||
1441 | #define USB_DEVICE_ID_GTCO_400 0x0400 | ||
1442 | #define USB_DEVICE_ID_GTCO_401 0x0401 | ||
1443 | #define USB_DEVICE_ID_GTCO_402 0x0402 | ||
1444 | #define USB_DEVICE_ID_GTCO_403 0x0403 | ||
1445 | #define USB_DEVICE_ID_GTCO_404 0x0404 | ||
1446 | #define USB_DEVICE_ID_GTCO_405 0x0405 | ||
1447 | #define USB_DEVICE_ID_GTCO_500 0x0500 | ||
1448 | #define USB_DEVICE_ID_GTCO_501 0x0501 | ||
1449 | #define USB_DEVICE_ID_GTCO_502 0x0502 | ||
1450 | #define USB_DEVICE_ID_GTCO_503 0x0503 | ||
1451 | #define USB_DEVICE_ID_GTCO_504 0x0504 | ||
1452 | #define USB_DEVICE_ID_GTCO_1000 0x1000 | ||
1453 | #define USB_DEVICE_ID_GTCO_1001 0x1001 | ||
1454 | #define USB_DEVICE_ID_GTCO_1002 0x1002 | ||
1455 | #define USB_DEVICE_ID_GTCO_1003 0x1003 | ||
1456 | #define USB_DEVICE_ID_GTCO_1004 0x1004 | ||
1457 | #define USB_DEVICE_ID_GTCO_1005 0x1005 | ||
1458 | #define USB_DEVICE_ID_GTCO_1006 0x1006 | ||
1459 | |||
1413 | #define USB_VENDOR_ID_WACOM 0x056a | 1460 | #define USB_VENDOR_ID_WACOM 0x056a |
1414 | #define USB_DEVICE_ID_WACOM_PENPARTNER 0x0000 | ||
1415 | #define USB_DEVICE_ID_WACOM_GRAPHIRE 0x0010 | ||
1416 | #define USB_DEVICE_ID_WACOM_INTUOS 0x0020 | ||
1417 | #define USB_DEVICE_ID_WACOM_PL 0x0030 | ||
1418 | #define USB_DEVICE_ID_WACOM_INTUOS2 0x0040 | ||
1419 | #define USB_DEVICE_ID_WACOM_VOLITO 0x0060 | ||
1420 | #define USB_DEVICE_ID_WACOM_PTU 0x0003 | ||
1421 | #define USB_DEVICE_ID_WACOM_INTUOS3 0x00B0 | ||
1422 | #define USB_DEVICE_ID_WACOM_CINTIQ 0x003F | ||
1423 | #define USB_DEVICE_ID_WACOM_DTF 0x00C0 | ||
1424 | 1461 | ||
1425 | #define USB_VENDOR_ID_ACECAD 0x0460 | 1462 | #define USB_VENDOR_ID_ACECAD 0x0460 |
1426 | #define USB_DEVICE_ID_ACECAD_FLAIR 0x0004 | 1463 | #define USB_DEVICE_ID_ACECAD_FLAIR 0x0004 |
@@ -1506,6 +1543,9 @@ void hid_init_reports(struct hid_device *hid) | |||
1506 | #define USB_DEVICE_ID_4_PHIDGETSERVO_20 0x8104 | 1543 | #define USB_DEVICE_ID_4_PHIDGETSERVO_20 0x8104 |
1507 | #define USB_DEVICE_ID_DUAL_USB_JOYPAD 0x8866 | 1544 | #define USB_DEVICE_ID_DUAL_USB_JOYPAD 0x8866 |
1508 | 1545 | ||
1546 | #define USB_VENDOR_ID_WISEGROUP_LTD 0x6677 | ||
1547 | #define USB_DEVICE_ID_SMARTJOY_DUAL_PLUS 0x8802 | ||
1548 | |||
1509 | #define USB_VENDOR_ID_CODEMERCS 0x07c0 | 1549 | #define USB_VENDOR_ID_CODEMERCS 0x07c0 |
1510 | #define USB_DEVICE_ID_CODEMERCS_IOW40 0x1500 | 1550 | #define USB_DEVICE_ID_CODEMERCS_IOW40 0x1500 |
1511 | #define USB_DEVICE_ID_CODEMERCS_IOW24 0x1501 | 1551 | #define USB_DEVICE_ID_CODEMERCS_IOW24 0x1501 |
@@ -1584,6 +1624,51 @@ static const struct hid_blacklist { | |||
1584 | { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE }, | 1624 | { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE }, |
1585 | { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE }, | 1625 | { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE }, |
1586 | { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE }, | 1626 | { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE }, |
1627 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_90, HID_QUIRK_IGNORE }, | ||
1628 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_100, HID_QUIRK_IGNORE }, | ||
1629 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_101, HID_QUIRK_IGNORE }, | ||
1630 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_103, HID_QUIRK_IGNORE }, | ||
1631 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_104, HID_QUIRK_IGNORE }, | ||
1632 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_105, HID_QUIRK_IGNORE }, | ||
1633 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_106, HID_QUIRK_IGNORE }, | ||
1634 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_107, HID_QUIRK_IGNORE }, | ||
1635 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_108, HID_QUIRK_IGNORE }, | ||
1636 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_200, HID_QUIRK_IGNORE }, | ||
1637 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_201, HID_QUIRK_IGNORE }, | ||
1638 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_202, HID_QUIRK_IGNORE }, | ||
1639 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_203, HID_QUIRK_IGNORE }, | ||
1640 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_204, HID_QUIRK_IGNORE }, | ||
1641 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_205, HID_QUIRK_IGNORE }, | ||
1642 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_206, HID_QUIRK_IGNORE }, | ||
1643 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_207, HID_QUIRK_IGNORE }, | ||
1644 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_300, HID_QUIRK_IGNORE }, | ||
1645 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_301, HID_QUIRK_IGNORE }, | ||
1646 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_302, HID_QUIRK_IGNORE }, | ||
1647 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_303, HID_QUIRK_IGNORE }, | ||
1648 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_304, HID_QUIRK_IGNORE }, | ||
1649 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_305, HID_QUIRK_IGNORE }, | ||
1650 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_306, HID_QUIRK_IGNORE }, | ||
1651 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_307, HID_QUIRK_IGNORE }, | ||
1652 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_308, HID_QUIRK_IGNORE }, | ||
1653 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_309, HID_QUIRK_IGNORE }, | ||
1654 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_400, HID_QUIRK_IGNORE }, | ||
1655 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_401, HID_QUIRK_IGNORE }, | ||
1656 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_402, HID_QUIRK_IGNORE }, | ||
1657 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_403, HID_QUIRK_IGNORE }, | ||
1658 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_404, HID_QUIRK_IGNORE }, | ||
1659 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_405, HID_QUIRK_IGNORE }, | ||
1660 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_500, HID_QUIRK_IGNORE }, | ||
1661 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_501, HID_QUIRK_IGNORE }, | ||
1662 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_502, HID_QUIRK_IGNORE }, | ||
1663 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_503, HID_QUIRK_IGNORE }, | ||
1664 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_504, HID_QUIRK_IGNORE }, | ||
1665 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1000, HID_QUIRK_IGNORE }, | ||
1666 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1001, HID_QUIRK_IGNORE }, | ||
1667 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1002, HID_QUIRK_IGNORE }, | ||
1668 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1003, HID_QUIRK_IGNORE }, | ||
1669 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1004, HID_QUIRK_IGNORE }, | ||
1670 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1005, HID_QUIRK_IGNORE }, | ||
1671 | { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006, HID_QUIRK_IGNORE }, | ||
1587 | { USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO, HID_QUIRK_IGNORE }, | 1672 | { USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO, HID_QUIRK_IGNORE }, |
1588 | { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY, HID_QUIRK_IGNORE }, | 1673 | { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY, HID_QUIRK_IGNORE }, |
1589 | { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY, HID_QUIRK_IGNORE }, | 1674 | { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY, HID_QUIRK_IGNORE }, |
@@ -1613,49 +1698,6 @@ static const struct hid_blacklist { | |||
1613 | { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP, HID_QUIRK_IGNORE }, | 1698 | { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP, HID_QUIRK_IGNORE }, |
1614 | { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP, HID_QUIRK_IGNORE }, | 1699 | { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP, HID_QUIRK_IGNORE }, |
1615 | { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_CYCLOPS, HID_QUIRK_IGNORE }, | 1700 | { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_CYCLOPS, HID_QUIRK_IGNORE }, |
1616 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PENPARTNER, HID_QUIRK_IGNORE }, | ||
1617 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE, HID_QUIRK_IGNORE }, | ||
1618 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 1, HID_QUIRK_IGNORE }, | ||
1619 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 2, HID_QUIRK_IGNORE }, | ||
1620 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 3, HID_QUIRK_IGNORE }, | ||
1621 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 4, HID_QUIRK_IGNORE }, | ||
1622 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS, HID_QUIRK_IGNORE }, | ||
1623 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 1, HID_QUIRK_IGNORE }, | ||
1624 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 2, HID_QUIRK_IGNORE }, | ||
1625 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 3, HID_QUIRK_IGNORE }, | ||
1626 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 4, HID_QUIRK_IGNORE }, | ||
1627 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL, HID_QUIRK_IGNORE }, | ||
1628 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 1, HID_QUIRK_IGNORE }, | ||
1629 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 2, HID_QUIRK_IGNORE }, | ||
1630 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 3, HID_QUIRK_IGNORE }, | ||
1631 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 4, HID_QUIRK_IGNORE }, | ||
1632 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 5, HID_QUIRK_IGNORE }, | ||
1633 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 7, HID_QUIRK_IGNORE }, | ||
1634 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 8, HID_QUIRK_IGNORE }, | ||
1635 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 9, HID_QUIRK_IGNORE }, | ||
1636 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 1, HID_QUIRK_IGNORE }, | ||
1637 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 2, HID_QUIRK_IGNORE }, | ||
1638 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 3, HID_QUIRK_IGNORE }, | ||
1639 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 4, HID_QUIRK_IGNORE }, | ||
1640 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 5, HID_QUIRK_IGNORE }, | ||
1641 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 7, HID_QUIRK_IGNORE }, | ||
1642 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO, HID_QUIRK_IGNORE }, | ||
1643 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 1, HID_QUIRK_IGNORE }, | ||
1644 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 2, HID_QUIRK_IGNORE }, | ||
1645 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 3, HID_QUIRK_IGNORE }, | ||
1646 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 4, HID_QUIRK_IGNORE }, | ||
1647 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 5, HID_QUIRK_IGNORE }, | ||
1648 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 6, HID_QUIRK_IGNORE }, | ||
1649 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PTU, HID_QUIRK_IGNORE }, | ||
1650 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3, HID_QUIRK_IGNORE }, | ||
1651 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 1, HID_QUIRK_IGNORE }, | ||
1652 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 2, HID_QUIRK_IGNORE }, | ||
1653 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 3, HID_QUIRK_IGNORE }, | ||
1654 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 4, HID_QUIRK_IGNORE }, | ||
1655 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 5, HID_QUIRK_IGNORE }, | ||
1656 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_CINTIQ, HID_QUIRK_IGNORE }, | ||
1657 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_DTF, HID_QUIRK_IGNORE }, | ||
1658 | { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_DTF + 3, HID_QUIRK_IGNORE }, | ||
1659 | { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_4_PHIDGETSERVO_20, HID_QUIRK_IGNORE }, | 1701 | { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_4_PHIDGETSERVO_20, HID_QUIRK_IGNORE }, |
1660 | { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20, HID_QUIRK_IGNORE }, | 1702 | { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20, HID_QUIRK_IGNORE }, |
1661 | { USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K, HID_QUIRK_IGNORE }, | 1703 | { USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K, HID_QUIRK_IGNORE }, |
@@ -1669,6 +1711,7 @@ static const struct hid_blacklist { | |||
1669 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET }, | 1711 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET }, |
1670 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET }, | 1712 | { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET }, |
1671 | { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, | 1713 | { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, |
1714 | { USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, | ||
1672 | 1715 | ||
1673 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL }, | 1716 | { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL }, |
1674 | { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 }, | 1717 | { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 }, |
@@ -1773,6 +1816,10 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf) | |||
1773 | char *rdesc; | 1816 | char *rdesc; |
1774 | int n, len, insize = 0; | 1817 | int n, len, insize = 0; |
1775 | 1818 | ||
1819 | /* Ignore all Wacom devices */ | ||
1820 | if (dev->descriptor.idVendor == USB_VENDOR_ID_WACOM) | ||
1821 | return NULL; | ||
1822 | |||
1776 | for (n = 0; hid_blacklist[n].idVendor; n++) | 1823 | for (n = 0; hid_blacklist[n].idVendor; n++) |
1777 | if ((hid_blacklist[n].idVendor == le16_to_cpu(dev->descriptor.idVendor)) && | 1824 | if ((hid_blacklist[n].idVendor == le16_to_cpu(dev->descriptor.idVendor)) && |
1778 | (hid_blacklist[n].idProduct == le16_to_cpu(dev->descriptor.idProduct))) | 1825 | (hid_blacklist[n].idProduct == le16_to_cpu(dev->descriptor.idProduct))) |
diff --git a/drivers/usb/input/usbtouchscreen.c b/drivers/usb/input/usbtouchscreen.c index 3b175aa482cd..a338bf4c2d78 100644 --- a/drivers/usb/input/usbtouchscreen.c +++ b/drivers/usb/input/usbtouchscreen.c | |||
@@ -286,7 +286,7 @@ static int mtouch_init(struct usbtouch_usb *usbtouch) | |||
286 | static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press) | 286 | static int itm_read_data(unsigned char *pkt, int *x, int *y, int *touch, int *press) |
287 | { | 287 | { |
288 | *x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F); | 288 | *x = ((pkt[0] & 0x1F) << 7) | (pkt[3] & 0x7F); |
289 | *x = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F); | 289 | *y = ((pkt[1] & 0x1F) << 7) | (pkt[4] & 0x7F); |
290 | *press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F); | 290 | *press = ((pkt[2] & 0x1F) << 7) | (pkt[5] & 0x7F); |
291 | *touch = ~pkt[7] & 0x20; | 291 | *touch = ~pkt[7] & 0x20; |
292 | 292 | ||
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c index 575a4e672e96..7b45fd3de911 100644 --- a/drivers/usb/input/yealink.c +++ b/drivers/usb/input/yealink.c | |||
@@ -810,12 +810,9 @@ static int usb_cleanup(struct yealink_dev *yld, int err) | |||
810 | if (yld == NULL) | 810 | if (yld == NULL) |
811 | return err; | 811 | return err; |
812 | 812 | ||
813 | if (yld->urb_irq) { | 813 | usb_kill_urb(yld->urb_irq); /* parameter validation in core/urb */ |
814 | usb_kill_urb(yld->urb_irq); | 814 | usb_kill_urb(yld->urb_ctl); /* parameter validation in core/urb */ |
815 | usb_free_urb(yld->urb_irq); | 815 | |
816 | } | ||
817 | if (yld->urb_ctl) | ||
818 | usb_free_urb(yld->urb_ctl); | ||
819 | if (yld->idev) { | 816 | if (yld->idev) { |
820 | if (err) | 817 | if (err) |
821 | input_free_device(yld->idev); | 818 | input_free_device(yld->idev); |
@@ -831,6 +828,9 @@ static int usb_cleanup(struct yealink_dev *yld, int err) | |||
831 | if (yld->irq_data) | 828 | if (yld->irq_data) |
832 | usb_buffer_free(yld->udev, USB_PKT_LEN, | 829 | usb_buffer_free(yld->udev, USB_PKT_LEN, |
833 | yld->irq_data, yld->irq_dma); | 830 | yld->irq_data, yld->irq_dma); |
831 | |||
832 | usb_free_urb(yld->urb_irq); /* parameter validation in core/urb */ | ||
833 | usb_free_urb(yld->urb_ctl); /* parameter validation in core/urb */ | ||
834 | kfree(yld); | 834 | kfree(yld); |
835 | return err; | 835 | return err; |
836 | } | 836 | } |