diff options
Diffstat (limited to 'drivers/hid/hid-multitouch.c')
-rw-r--r-- | drivers/hid/hid-multitouch.c | 163 |
1 files changed, 114 insertions, 49 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 61543c02ea0b..7a1ebb867cf4 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
@@ -54,6 +54,7 @@ MODULE_LICENSE("GPL"); | |||
54 | #define MT_QUIRK_NO_AREA (1 << 9) | 54 | #define MT_QUIRK_NO_AREA (1 << 9) |
55 | #define MT_QUIRK_IGNORE_DUPLICATES (1 << 10) | 55 | #define MT_QUIRK_IGNORE_DUPLICATES (1 << 10) |
56 | #define MT_QUIRK_HOVERING (1 << 11) | 56 | #define MT_QUIRK_HOVERING (1 << 11) |
57 | #define MT_QUIRK_CONTACT_CNT_ACCURATE (1 << 12) | ||
57 | 58 | ||
58 | struct mt_slot { | 59 | struct mt_slot { |
59 | __s32 x, y, cx, cy, p, w, h; | 60 | __s32 x, y, cx, cy, p, w, h; |
@@ -83,8 +84,11 @@ struct mt_device { | |||
83 | struct mt_class mtclass; /* our mt device class */ | 84 | struct mt_class mtclass; /* our mt device class */ |
84 | struct mt_fields *fields; /* temporary placeholder for storing the | 85 | struct mt_fields *fields; /* temporary placeholder for storing the |
85 | multitouch fields */ | 86 | multitouch fields */ |
87 | int cc_index; /* contact count field index in the report */ | ||
88 | int cc_value_index; /* contact count value index in the field */ | ||
86 | unsigned last_field_index; /* last field index of the report */ | 89 | unsigned last_field_index; /* last field index of the report */ |
87 | unsigned last_slot_field; /* the last field of a slot */ | 90 | unsigned last_slot_field; /* the last field of a slot */ |
91 | unsigned mt_report_id; /* the report ID of the multitouch device */ | ||
88 | __s8 inputmode; /* InputMode HID feature, -1 if non-existent */ | 92 | __s8 inputmode; /* InputMode HID feature, -1 if non-existent */ |
89 | __s8 inputmode_index; /* InputMode HID feature index in the report */ | 93 | __s8 inputmode_index; /* InputMode HID feature index in the report */ |
90 | __s8 maxcontact_report_id; /* Maximum Contact Number HID feature, | 94 | __s8 maxcontact_report_id; /* Maximum Contact Number HID feature, |
@@ -111,6 +115,9 @@ struct mt_device { | |||
111 | #define MT_CLS_DUAL_INRANGE_CONTACTNUMBER 0x0007 | 115 | #define MT_CLS_DUAL_INRANGE_CONTACTNUMBER 0x0007 |
112 | #define MT_CLS_DUAL_NSMU_CONTACTID 0x0008 | 116 | #define MT_CLS_DUAL_NSMU_CONTACTID 0x0008 |
113 | #define MT_CLS_INRANGE_CONTACTNUMBER 0x0009 | 117 | #define MT_CLS_INRANGE_CONTACTNUMBER 0x0009 |
118 | #define MT_CLS_NSMU 0x000a | ||
119 | #define MT_CLS_DUAL_CONTACT_NUMBER 0x0010 | ||
120 | #define MT_CLS_DUAL_CONTACT_ID 0x0011 | ||
114 | 121 | ||
115 | /* vendor specific classes */ | 122 | /* vendor specific classes */ |
116 | #define MT_CLS_3M 0x0101 | 123 | #define MT_CLS_3M 0x0101 |
@@ -144,6 +151,9 @@ static int cypress_compute_slot(struct mt_device *td) | |||
144 | 151 | ||
145 | static struct mt_class mt_classes[] = { | 152 | static struct mt_class mt_classes[] = { |
146 | { .name = MT_CLS_DEFAULT, | 153 | { .name = MT_CLS_DEFAULT, |
154 | .quirks = MT_QUIRK_ALWAYS_VALID | | ||
155 | MT_QUIRK_CONTACT_CNT_ACCURATE }, | ||
156 | { .name = MT_CLS_NSMU, | ||
147 | .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP }, | 157 | .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP }, |
148 | { .name = MT_CLS_SERIAL, | 158 | { .name = MT_CLS_SERIAL, |
149 | .quirks = MT_QUIRK_ALWAYS_VALID}, | 159 | .quirks = MT_QUIRK_ALWAYS_VALID}, |
@@ -170,6 +180,16 @@ static struct mt_class mt_classes[] = { | |||
170 | { .name = MT_CLS_INRANGE_CONTACTNUMBER, | 180 | { .name = MT_CLS_INRANGE_CONTACTNUMBER, |
171 | .quirks = MT_QUIRK_VALID_IS_INRANGE | | 181 | .quirks = MT_QUIRK_VALID_IS_INRANGE | |
172 | MT_QUIRK_SLOT_IS_CONTACTNUMBER }, | 182 | MT_QUIRK_SLOT_IS_CONTACTNUMBER }, |
183 | { .name = MT_CLS_DUAL_CONTACT_NUMBER, | ||
184 | .quirks = MT_QUIRK_ALWAYS_VALID | | ||
185 | MT_QUIRK_CONTACT_CNT_ACCURATE | | ||
186 | MT_QUIRK_SLOT_IS_CONTACTNUMBER, | ||
187 | .maxcontacts = 2 }, | ||
188 | { .name = MT_CLS_DUAL_CONTACT_ID, | ||
189 | .quirks = MT_QUIRK_ALWAYS_VALID | | ||
190 | MT_QUIRK_CONTACT_CNT_ACCURATE | | ||
191 | MT_QUIRK_SLOT_IS_CONTACTID, | ||
192 | .maxcontacts = 2 }, | ||
173 | 193 | ||
174 | /* | 194 | /* |
175 | * vendor specific classes | 195 | * vendor specific classes |
@@ -250,6 +270,9 @@ static ssize_t mt_set_quirks(struct device *dev, | |||
250 | 270 | ||
251 | td->mtclass.quirks = val; | 271 | td->mtclass.quirks = val; |
252 | 272 | ||
273 | if (td->cc_index < 0) | ||
274 | td->mtclass.quirks &= ~MT_QUIRK_CONTACT_CNT_ACCURATE; | ||
275 | |||
253 | return count; | 276 | return count; |
254 | } | 277 | } |
255 | 278 | ||
@@ -301,6 +324,7 @@ static void mt_feature_mapping(struct hid_device *hdev, | |||
301 | *quirks |= MT_QUIRK_ALWAYS_VALID; | 324 | *quirks |= MT_QUIRK_ALWAYS_VALID; |
302 | *quirks |= MT_QUIRK_IGNORE_DUPLICATES; | 325 | *quirks |= MT_QUIRK_IGNORE_DUPLICATES; |
303 | *quirks |= MT_QUIRK_HOVERING; | 326 | *quirks |= MT_QUIRK_HOVERING; |
327 | *quirks |= MT_QUIRK_CONTACT_CNT_ACCURATE; | ||
304 | *quirks &= ~MT_QUIRK_NOT_SEEN_MEANS_UP; | 328 | *quirks &= ~MT_QUIRK_NOT_SEEN_MEANS_UP; |
305 | *quirks &= ~MT_QUIRK_VALID_IS_INRANGE; | 329 | *quirks &= ~MT_QUIRK_VALID_IS_INRANGE; |
306 | *quirks &= ~MT_QUIRK_VALID_IS_CONFIDENCE; | 330 | *quirks &= ~MT_QUIRK_VALID_IS_CONFIDENCE; |
@@ -428,6 +452,7 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |||
428 | mt_store_field(usage, td, hi); | 452 | mt_store_field(usage, td, hi); |
429 | td->last_field_index = field->index; | 453 | td->last_field_index = field->index; |
430 | td->touches_by_report++; | 454 | td->touches_by_report++; |
455 | td->mt_report_id = field->report->id; | ||
431 | return 1; | 456 | return 1; |
432 | case HID_DG_WIDTH: | 457 | case HID_DG_WIDTH: |
433 | hid_map_usage(hi, usage, bit, max, | 458 | hid_map_usage(hi, usage, bit, max, |
@@ -459,6 +484,8 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |||
459 | td->last_field_index = field->index; | 484 | td->last_field_index = field->index; |
460 | return 1; | 485 | return 1; |
461 | case HID_DG_CONTACTCOUNT: | 486 | case HID_DG_CONTACTCOUNT: |
487 | td->cc_index = field->index; | ||
488 | td->cc_value_index = usage->usage_index; | ||
462 | td->last_field_index = field->index; | 489 | td->last_field_index = field->index; |
463 | return 1; | 490 | return 1; |
464 | case HID_DG_CONTACTMAX: | 491 | case HID_DG_CONTACTMAX: |
@@ -523,6 +550,10 @@ static int mt_compute_slot(struct mt_device *td, struct input_dev *input) | |||
523 | */ | 550 | */ |
524 | static void mt_complete_slot(struct mt_device *td, struct input_dev *input) | 551 | static void mt_complete_slot(struct mt_device *td, struct input_dev *input) |
525 | { | 552 | { |
553 | if ((td->mtclass.quirks & MT_QUIRK_CONTACT_CNT_ACCURATE) && | ||
554 | td->num_received >= td->num_expected) | ||
555 | return; | ||
556 | |||
526 | if (td->curvalid || (td->mtclass.quirks & MT_QUIRK_ALWAYS_VALID)) { | 557 | if (td->curvalid || (td->mtclass.quirks & MT_QUIRK_ALWAYS_VALID)) { |
527 | int slotnum = mt_compute_slot(td, input); | 558 | int slotnum = mt_compute_slot(td, input); |
528 | struct mt_slot *s = &td->curdata; | 559 | struct mt_slot *s = &td->curdata; |
@@ -578,6 +609,16 @@ static void mt_sync_frame(struct mt_device *td, struct input_dev *input) | |||
578 | static int mt_event(struct hid_device *hid, struct hid_field *field, | 609 | static int mt_event(struct hid_device *hid, struct hid_field *field, |
579 | struct hid_usage *usage, __s32 value) | 610 | struct hid_usage *usage, __s32 value) |
580 | { | 611 | { |
612 | /* we will handle the hidinput part later, now remains hiddev */ | ||
613 | if (hid->claimed & HID_CLAIMED_HIDDEV && hid->hiddev_hid_event) | ||
614 | hid->hiddev_hid_event(hid, field, usage, value); | ||
615 | |||
616 | return 1; | ||
617 | } | ||
618 | |||
619 | static void mt_process_mt_event(struct hid_device *hid, struct hid_field *field, | ||
620 | struct hid_usage *usage, __s32 value) | ||
621 | { | ||
581 | struct mt_device *td = hid_get_drvdata(hid); | 622 | struct mt_device *td = hid_get_drvdata(hid); |
582 | __s32 quirks = td->mtclass.quirks; | 623 | __s32 quirks = td->mtclass.quirks; |
583 | 624 | ||
@@ -623,20 +664,13 @@ static int mt_event(struct hid_device *hid, struct hid_field *field, | |||
623 | td->curdata.h = value; | 664 | td->curdata.h = value; |
624 | break; | 665 | break; |
625 | case HID_DG_CONTACTCOUNT: | 666 | case HID_DG_CONTACTCOUNT: |
626 | /* | ||
627 | * Includes multi-packet support where subsequent | ||
628 | * packets are sent with zero contactcount. | ||
629 | */ | ||
630 | if (value) | ||
631 | td->num_expected = value; | ||
632 | break; | 667 | break; |
633 | case HID_DG_TOUCH: | 668 | case HID_DG_TOUCH: |
634 | /* do nothing */ | 669 | /* do nothing */ |
635 | break; | 670 | break; |
636 | 671 | ||
637 | default: | 672 | default: |
638 | /* fallback to the generic hidinput handling */ | 673 | return; |
639 | return 0; | ||
640 | } | 674 | } |
641 | 675 | ||
642 | if (usage->usage_index + 1 == field->report_count) { | 676 | if (usage->usage_index + 1 == field->report_count) { |
@@ -650,12 +684,43 @@ static int mt_event(struct hid_device *hid, struct hid_field *field, | |||
650 | } | 684 | } |
651 | 685 | ||
652 | } | 686 | } |
687 | } | ||
653 | 688 | ||
654 | /* we have handled the hidinput part, now remains hiddev */ | 689 | static void mt_report(struct hid_device *hid, struct hid_report *report) |
655 | if (hid->claimed & HID_CLAIMED_HIDDEV && hid->hiddev_hid_event) | 690 | { |
656 | hid->hiddev_hid_event(hid, field, usage, value); | 691 | struct mt_device *td = hid_get_drvdata(hid); |
692 | struct hid_field *field; | ||
693 | unsigned count; | ||
694 | int r, n; | ||
657 | 695 | ||
658 | return 1; | 696 | if (report->id != td->mt_report_id) |
697 | return; | ||
698 | |||
699 | if (!(hid->claimed & HID_CLAIMED_INPUT)) | ||
700 | return; | ||
701 | |||
702 | /* | ||
703 | * Includes multi-packet support where subsequent | ||
704 | * packets are sent with zero contactcount. | ||
705 | */ | ||
706 | if (td->cc_index >= 0) { | ||
707 | struct hid_field *field = report->field[td->cc_index]; | ||
708 | int value = field->value[td->cc_value_index]; | ||
709 | if (value) | ||
710 | td->num_expected = value; | ||
711 | } | ||
712 | |||
713 | for (r = 0; r < report->maxfield; r++) { | ||
714 | field = report->field[r]; | ||
715 | count = field->report_count; | ||
716 | |||
717 | if (!(HID_MAIN_ITEM_VARIABLE & field->flags)) | ||
718 | continue; | ||
719 | |||
720 | for (n = 0; n < count; n++) | ||
721 | mt_process_mt_event(hid, field, &field->usage[n], | ||
722 | field->value[n]); | ||
723 | } | ||
659 | } | 724 | } |
660 | 725 | ||
661 | static void mt_set_input_mode(struct hid_device *hdev) | 726 | static void mt_set_input_mode(struct hid_device *hdev) |
@@ -711,6 +776,7 @@ static void mt_post_parse_default_settings(struct mt_device *td) | |||
711 | quirks &= ~MT_QUIRK_NOT_SEEN_MEANS_UP; | 776 | quirks &= ~MT_QUIRK_NOT_SEEN_MEANS_UP; |
712 | quirks &= ~MT_QUIRK_VALID_IS_INRANGE; | 777 | quirks &= ~MT_QUIRK_VALID_IS_INRANGE; |
713 | quirks &= ~MT_QUIRK_VALID_IS_CONFIDENCE; | 778 | quirks &= ~MT_QUIRK_VALID_IS_CONFIDENCE; |
779 | quirks &= ~MT_QUIRK_CONTACT_CNT_ACCURATE; | ||
714 | } | 780 | } |
715 | 781 | ||
716 | td->mtclass.quirks = quirks; | 782 | td->mtclass.quirks = quirks; |
@@ -719,11 +785,15 @@ static void mt_post_parse_default_settings(struct mt_device *td) | |||
719 | static void mt_post_parse(struct mt_device *td) | 785 | static void mt_post_parse(struct mt_device *td) |
720 | { | 786 | { |
721 | struct mt_fields *f = td->fields; | 787 | struct mt_fields *f = td->fields; |
788 | struct mt_class *cls = &td->mtclass; | ||
722 | 789 | ||
723 | if (td->touches_by_report > 0) { | 790 | if (td->touches_by_report > 0) { |
724 | int field_count_per_touch = f->length / td->touches_by_report; | 791 | int field_count_per_touch = f->length / td->touches_by_report; |
725 | td->last_slot_field = f->usages[field_count_per_touch - 1]; | 792 | td->last_slot_field = f->usages[field_count_per_touch - 1]; |
726 | } | 793 | } |
794 | |||
795 | if (td->cc_index < 0) | ||
796 | cls->quirks &= ~MT_QUIRK_CONTACT_CNT_ACCURATE; | ||
727 | } | 797 | } |
728 | 798 | ||
729 | static void mt_input_configured(struct hid_device *hdev, struct hid_input *hi) | 799 | static void mt_input_configured(struct hid_device *hdev, struct hid_input *hi) |
@@ -781,6 +851,7 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
781 | td->mtclass = *mtclass; | 851 | td->mtclass = *mtclass; |
782 | td->inputmode = -1; | 852 | td->inputmode = -1; |
783 | td->maxcontact_report_id = -1; | 853 | td->maxcontact_report_id = -1; |
854 | td->cc_index = -1; | ||
784 | hid_set_drvdata(hdev, td); | 855 | hid_set_drvdata(hdev, td); |
785 | 856 | ||
786 | td->fields = kzalloc(sizeof(struct mt_fields), GFP_KERNEL); | 857 | td->fields = kzalloc(sizeof(struct mt_fields), GFP_KERNEL); |
@@ -875,7 +946,7 @@ static const struct hid_device_id mt_devices[] = { | |||
875 | USB_DEVICE_ID_3M3266) }, | 946 | USB_DEVICE_ID_3M3266) }, |
876 | 947 | ||
877 | /* ActionStar panels */ | 948 | /* ActionStar panels */ |
878 | { .driver_data = MT_CLS_DEFAULT, | 949 | { .driver_data = MT_CLS_NSMU, |
879 | MT_USB_DEVICE(USB_VENDOR_ID_ACTIONSTAR, | 950 | MT_USB_DEVICE(USB_VENDOR_ID_ACTIONSTAR, |
880 | USB_DEVICE_ID_ACTIONSTAR_1011) }, | 951 | USB_DEVICE_ID_ACTIONSTAR_1011) }, |
881 | 952 | ||
@@ -888,14 +959,14 @@ static const struct hid_device_id mt_devices[] = { | |||
888 | USB_DEVICE_ID_ATMEL_MXT_DIGITIZER) }, | 959 | USB_DEVICE_ID_ATMEL_MXT_DIGITIZER) }, |
889 | 960 | ||
890 | /* Baanto multitouch devices */ | 961 | /* Baanto multitouch devices */ |
891 | { .driver_data = MT_CLS_DEFAULT, | 962 | { .driver_data = MT_CLS_NSMU, |
892 | MT_USB_DEVICE(USB_VENDOR_ID_BAANTO, | 963 | MT_USB_DEVICE(USB_VENDOR_ID_BAANTO, |
893 | USB_DEVICE_ID_BAANTO_MT_190W2) }, | 964 | USB_DEVICE_ID_BAANTO_MT_190W2) }, |
894 | /* Cando panels */ | 965 | /* Cando panels */ |
895 | { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER, | 966 | { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER, |
896 | MT_USB_DEVICE(USB_VENDOR_ID_CANDO, | 967 | MT_USB_DEVICE(USB_VENDOR_ID_CANDO, |
897 | USB_DEVICE_ID_CANDO_MULTI_TOUCH) }, | 968 | USB_DEVICE_ID_CANDO_MULTI_TOUCH) }, |
898 | { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER, | 969 | { .driver_data = MT_CLS_DUAL_CONTACT_NUMBER, |
899 | MT_USB_DEVICE(USB_VENDOR_ID_CANDO, | 970 | MT_USB_DEVICE(USB_VENDOR_ID_CANDO, |
900 | USB_DEVICE_ID_CANDO_MULTI_TOUCH_10_1) }, | 971 | USB_DEVICE_ID_CANDO_MULTI_TOUCH_10_1) }, |
901 | { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER, | 972 | { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER, |
@@ -906,12 +977,12 @@ static const struct hid_device_id mt_devices[] = { | |||
906 | USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6) }, | 977 | USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6) }, |
907 | 978 | ||
908 | /* Chunghwa Telecom touch panels */ | 979 | /* Chunghwa Telecom touch panels */ |
909 | { .driver_data = MT_CLS_DEFAULT, | 980 | { .driver_data = MT_CLS_NSMU, |
910 | MT_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT, | 981 | MT_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT, |
911 | USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) }, | 982 | USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) }, |
912 | 983 | ||
913 | /* CVTouch panels */ | 984 | /* CVTouch panels */ |
914 | { .driver_data = MT_CLS_DEFAULT, | 985 | { .driver_data = MT_CLS_NSMU, |
915 | MT_USB_DEVICE(USB_VENDOR_ID_CVTOUCH, | 986 | MT_USB_DEVICE(USB_VENDOR_ID_CVTOUCH, |
916 | USB_DEVICE_ID_CVTOUCH_SCREEN) }, | 987 | USB_DEVICE_ID_CVTOUCH_SCREEN) }, |
917 | 988 | ||
@@ -982,7 +1053,7 @@ static const struct hid_device_id mt_devices[] = { | |||
982 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72C4) }, | 1053 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72C4) }, |
983 | 1054 | ||
984 | /* Elo TouchSystems IntelliTouch Plus panel */ | 1055 | /* Elo TouchSystems IntelliTouch Plus panel */ |
985 | { .driver_data = MT_CLS_DUAL_NSMU_CONTACTID, | 1056 | { .driver_data = MT_CLS_DUAL_CONTACT_ID, |
986 | MT_USB_DEVICE(USB_VENDOR_ID_ELO, | 1057 | MT_USB_DEVICE(USB_VENDOR_ID_ELO, |
987 | USB_DEVICE_ID_ELO_TS2515) }, | 1058 | USB_DEVICE_ID_ELO_TS2515) }, |
988 | 1059 | ||
@@ -1000,12 +1071,12 @@ static const struct hid_device_id mt_devices[] = { | |||
1000 | USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PWT_TENFINGERS) }, | 1071 | USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PWT_TENFINGERS) }, |
1001 | 1072 | ||
1002 | /* Gametel game controller */ | 1073 | /* Gametel game controller */ |
1003 | { .driver_data = MT_CLS_DEFAULT, | 1074 | { .driver_data = MT_CLS_NSMU, |
1004 | MT_BT_DEVICE(USB_VENDOR_ID_FRUCTEL, | 1075 | MT_BT_DEVICE(USB_VENDOR_ID_FRUCTEL, |
1005 | USB_DEVICE_ID_GAMETEL_MT_MODE) }, | 1076 | USB_DEVICE_ID_GAMETEL_MT_MODE) }, |
1006 | 1077 | ||
1007 | /* GoodTouch panels */ | 1078 | /* GoodTouch panels */ |
1008 | { .driver_data = MT_CLS_DEFAULT, | 1079 | { .driver_data = MT_CLS_NSMU, |
1009 | MT_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH, | 1080 | MT_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH, |
1010 | USB_DEVICE_ID_GOODTOUCH_000f) }, | 1081 | USB_DEVICE_ID_GOODTOUCH_000f) }, |
1011 | 1082 | ||
@@ -1023,7 +1094,7 @@ static const struct hid_device_id mt_devices[] = { | |||
1023 | USB_DEVICE_ID_IDEACOM_IDC6651) }, | 1094 | USB_DEVICE_ID_IDEACOM_IDC6651) }, |
1024 | 1095 | ||
1025 | /* Ilitek dual touch panel */ | 1096 | /* Ilitek dual touch panel */ |
1026 | { .driver_data = MT_CLS_DEFAULT, | 1097 | { .driver_data = MT_CLS_NSMU, |
1027 | MT_USB_DEVICE(USB_VENDOR_ID_ILITEK, | 1098 | MT_USB_DEVICE(USB_VENDOR_ID_ILITEK, |
1028 | USB_DEVICE_ID_ILITEK_MULTITOUCH) }, | 1099 | USB_DEVICE_ID_ILITEK_MULTITOUCH) }, |
1029 | 1100 | ||
@@ -1056,6 +1127,11 @@ static const struct hid_device_id mt_devices[] = { | |||
1056 | MT_USB_DEVICE(USB_VENDOR_ID_TURBOX, | 1127 | MT_USB_DEVICE(USB_VENDOR_ID_TURBOX, |
1057 | USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) }, | 1128 | USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) }, |
1058 | 1129 | ||
1130 | /* Nexio panels */ | ||
1131 | { .driver_data = MT_CLS_DEFAULT, | ||
1132 | MT_USB_DEVICE(USB_VENDOR_ID_NEXIO, | ||
1133 | USB_DEVICE_ID_NEXIO_MULTITOUCH_420)}, | ||
1134 | |||
1059 | /* Panasonic panels */ | 1135 | /* Panasonic panels */ |
1060 | { .driver_data = MT_CLS_PANASONIC, | 1136 | { .driver_data = MT_CLS_PANASONIC, |
1061 | MT_USB_DEVICE(USB_VENDOR_ID_PANASONIC, | 1137 | MT_USB_DEVICE(USB_VENDOR_ID_PANASONIC, |
@@ -1065,7 +1141,7 @@ static const struct hid_device_id mt_devices[] = { | |||
1065 | USB_DEVICE_ID_PANABOARD_UBT880) }, | 1141 | USB_DEVICE_ID_PANABOARD_UBT880) }, |
1066 | 1142 | ||
1067 | /* Novatek Panel */ | 1143 | /* Novatek Panel */ |
1068 | { .driver_data = MT_CLS_DEFAULT, | 1144 | { .driver_data = MT_CLS_NSMU, |
1069 | MT_USB_DEVICE(USB_VENDOR_ID_NOVATEK, | 1145 | MT_USB_DEVICE(USB_VENDOR_ID_NOVATEK, |
1070 | USB_DEVICE_ID_NOVATEK_PCT) }, | 1146 | USB_DEVICE_ID_NOVATEK_PCT) }, |
1071 | 1147 | ||
@@ -1111,7 +1187,7 @@ static const struct hid_device_id mt_devices[] = { | |||
1111 | { .driver_data = MT_CLS_CONFIDENCE, | 1187 | { .driver_data = MT_CLS_CONFIDENCE, |
1112 | MT_USB_DEVICE(USB_VENDOR_ID_STANTUM_STM, | 1188 | MT_USB_DEVICE(USB_VENDOR_ID_STANTUM_STM, |
1113 | USB_DEVICE_ID_MTP_STM)}, | 1189 | USB_DEVICE_ID_MTP_STM)}, |
1114 | { .driver_data = MT_CLS_CONFIDENCE, | 1190 | { .driver_data = MT_CLS_DEFAULT, |
1115 | MT_USB_DEVICE(USB_VENDOR_ID_STANTUM_SITRONIX, | 1191 | MT_USB_DEVICE(USB_VENDOR_ID_STANTUM_SITRONIX, |
1116 | USB_DEVICE_ID_MTP_SITRONIX)}, | 1192 | USB_DEVICE_ID_MTP_SITRONIX)}, |
1117 | 1193 | ||
@@ -1121,48 +1197,48 @@ static const struct hid_device_id mt_devices[] = { | |||
1121 | USB_DEVICE_ID_TOPSEED2_PERIPAD_701) }, | 1197 | USB_DEVICE_ID_TOPSEED2_PERIPAD_701) }, |
1122 | 1198 | ||
1123 | /* Touch International panels */ | 1199 | /* Touch International panels */ |
1124 | { .driver_data = MT_CLS_DEFAULT, | 1200 | { .driver_data = MT_CLS_NSMU, |
1125 | MT_USB_DEVICE(USB_VENDOR_ID_TOUCH_INTL, | 1201 | MT_USB_DEVICE(USB_VENDOR_ID_TOUCH_INTL, |
1126 | USB_DEVICE_ID_TOUCH_INTL_MULTI_TOUCH) }, | 1202 | USB_DEVICE_ID_TOUCH_INTL_MULTI_TOUCH) }, |
1127 | 1203 | ||
1128 | /* Unitec panels */ | 1204 | /* Unitec panels */ |
1129 | { .driver_data = MT_CLS_DEFAULT, | 1205 | { .driver_data = MT_CLS_NSMU, |
1130 | MT_USB_DEVICE(USB_VENDOR_ID_UNITEC, | 1206 | MT_USB_DEVICE(USB_VENDOR_ID_UNITEC, |
1131 | USB_DEVICE_ID_UNITEC_USB_TOUCH_0709) }, | 1207 | USB_DEVICE_ID_UNITEC_USB_TOUCH_0709) }, |
1132 | { .driver_data = MT_CLS_DEFAULT, | 1208 | { .driver_data = MT_CLS_NSMU, |
1133 | MT_USB_DEVICE(USB_VENDOR_ID_UNITEC, | 1209 | MT_USB_DEVICE(USB_VENDOR_ID_UNITEC, |
1134 | USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19) }, | 1210 | USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19) }, |
1135 | /* XAT */ | 1211 | /* XAT */ |
1136 | { .driver_data = MT_CLS_DEFAULT, | 1212 | { .driver_data = MT_CLS_NSMU, |
1137 | MT_USB_DEVICE(USB_VENDOR_ID_XAT, | 1213 | MT_USB_DEVICE(USB_VENDOR_ID_XAT, |
1138 | USB_DEVICE_ID_XAT_CSR) }, | 1214 | USB_DEVICE_ID_XAT_CSR) }, |
1139 | 1215 | ||
1140 | /* Xiroku */ | 1216 | /* Xiroku */ |
1141 | { .driver_data = MT_CLS_DEFAULT, | 1217 | { .driver_data = MT_CLS_NSMU, |
1142 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, | 1218 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, |
1143 | USB_DEVICE_ID_XIROKU_SPX) }, | 1219 | USB_DEVICE_ID_XIROKU_SPX) }, |
1144 | { .driver_data = MT_CLS_DEFAULT, | 1220 | { .driver_data = MT_CLS_NSMU, |
1145 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, | 1221 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, |
1146 | USB_DEVICE_ID_XIROKU_MPX) }, | 1222 | USB_DEVICE_ID_XIROKU_MPX) }, |
1147 | { .driver_data = MT_CLS_DEFAULT, | 1223 | { .driver_data = MT_CLS_NSMU, |
1148 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, | 1224 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, |
1149 | USB_DEVICE_ID_XIROKU_CSR) }, | 1225 | USB_DEVICE_ID_XIROKU_CSR) }, |
1150 | { .driver_data = MT_CLS_DEFAULT, | 1226 | { .driver_data = MT_CLS_NSMU, |
1151 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, | 1227 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, |
1152 | USB_DEVICE_ID_XIROKU_SPX1) }, | 1228 | USB_DEVICE_ID_XIROKU_SPX1) }, |
1153 | { .driver_data = MT_CLS_DEFAULT, | 1229 | { .driver_data = MT_CLS_NSMU, |
1154 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, | 1230 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, |
1155 | USB_DEVICE_ID_XIROKU_MPX1) }, | 1231 | USB_DEVICE_ID_XIROKU_MPX1) }, |
1156 | { .driver_data = MT_CLS_DEFAULT, | 1232 | { .driver_data = MT_CLS_NSMU, |
1157 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, | 1233 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, |
1158 | USB_DEVICE_ID_XIROKU_CSR1) }, | 1234 | USB_DEVICE_ID_XIROKU_CSR1) }, |
1159 | { .driver_data = MT_CLS_DEFAULT, | 1235 | { .driver_data = MT_CLS_NSMU, |
1160 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, | 1236 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, |
1161 | USB_DEVICE_ID_XIROKU_SPX2) }, | 1237 | USB_DEVICE_ID_XIROKU_SPX2) }, |
1162 | { .driver_data = MT_CLS_DEFAULT, | 1238 | { .driver_data = MT_CLS_NSMU, |
1163 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, | 1239 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, |
1164 | USB_DEVICE_ID_XIROKU_MPX2) }, | 1240 | USB_DEVICE_ID_XIROKU_MPX2) }, |
1165 | { .driver_data = MT_CLS_DEFAULT, | 1241 | { .driver_data = MT_CLS_NSMU, |
1166 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, | 1242 | MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, |
1167 | USB_DEVICE_ID_XIROKU_CSR2) }, | 1243 | USB_DEVICE_ID_XIROKU_CSR2) }, |
1168 | 1244 | ||
@@ -1193,21 +1269,10 @@ static struct hid_driver mt_driver = { | |||
1193 | .feature_mapping = mt_feature_mapping, | 1269 | .feature_mapping = mt_feature_mapping, |
1194 | .usage_table = mt_grabbed_usages, | 1270 | .usage_table = mt_grabbed_usages, |
1195 | .event = mt_event, | 1271 | .event = mt_event, |
1272 | .report = mt_report, | ||
1196 | #ifdef CONFIG_PM | 1273 | #ifdef CONFIG_PM |
1197 | .reset_resume = mt_reset_resume, | 1274 | .reset_resume = mt_reset_resume, |
1198 | .resume = mt_resume, | 1275 | .resume = mt_resume, |
1199 | #endif | 1276 | #endif |
1200 | }; | 1277 | }; |
1201 | 1278 | module_hid_driver(mt_driver); | |
1202 | static int __init mt_init(void) | ||
1203 | { | ||
1204 | return hid_register_driver(&mt_driver); | ||
1205 | } | ||
1206 | |||
1207 | static void __exit mt_exit(void) | ||
1208 | { | ||
1209 | hid_unregister_driver(&mt_driver); | ||
1210 | } | ||
1211 | |||
1212 | module_init(mt_init); | ||
1213 | module_exit(mt_exit); | ||