diff options
-rw-r--r-- | drivers/hid/Kconfig | 9 | ||||
-rw-r--r-- | drivers/hid/hid-multitouch.c | 93 |
2 files changed, 54 insertions, 48 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 88e6b2b9a42e..d588a5e28d0e 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
@@ -304,21 +304,20 @@ config HID_MULTITOUCH | |||
304 | Say Y here if you have one of the following devices: | 304 | Say Y here if you have one of the following devices: |
305 | - 3M PCT touch screens | 305 | - 3M PCT touch screens |
306 | - ActionStar dual touch panels | 306 | - ActionStar dual touch panels |
307 | - Cando dual touch panel | 307 | - Cando dual touch panels |
308 | - CVTouch panels | 308 | - CVTouch panels |
309 | - Cypress TrueTouch panels | 309 | - Cypress TrueTouch panels |
310 | - Elo TouchSystems IntelliTouch Plus panels | 310 | - Elo TouchSystems IntelliTouch Plus panels |
311 | - GeneralTouch 'Sensing Win7-TwoFinger' panels | ||
311 | - GoodTouch panels | 312 | - GoodTouch panels |
312 | - Hanvon dual touch panels | 313 | - Hanvon dual touch panels |
313 | - Ilitek dual touch panel | 314 | - Ilitek dual touch panels |
314 | - IrTouch Infrared USB panels | 315 | - IrTouch Infrared USB panels |
315 | - Lumio CrystalTouch panels | 316 | - Lumio CrystalTouch panels |
316 | - MosArt dual-touch panels | 317 | - MosArt dual-touch panels |
317 | - PenMount dual touch panels | 318 | - PenMount dual touch panels |
318 | - Pixcir dual touch panels | 319 | - Pixcir dual touch panels |
319 | - 'Sensing Win7-TwoFinger' panel by GeneralTouch | 320 | - eGalax dual-touch panels, including the Joojoo and Wetab tablets |
320 | - eGalax dual-touch panels, including the | ||
321 | Joojoo and Wetab tablets | ||
322 | - Stantum multitouch panels | 321 | - Stantum multitouch panels |
323 | - Touch International Panels | 322 | - Touch International Panels |
324 | - Unitec Panels | 323 | - Unitec Panels |
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 65b92d2bf759..ecd4d2db9e80 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
@@ -83,15 +83,18 @@ struct mt_class { | |||
83 | }; | 83 | }; |
84 | 84 | ||
85 | /* classes of device behavior */ | 85 | /* classes of device behavior */ |
86 | #define MT_CLS_DEFAULT 1 | 86 | #define MT_CLS_DEFAULT 0x0001 |
87 | #define MT_CLS_DUAL_INRANGE_CONTACTID 2 | 87 | |
88 | #define MT_CLS_DUAL_INRANGE_CONTACTNUMBER 3 | 88 | #define MT_CLS_CONFIDENCE 0x0002 |
89 | #define MT_CLS_CYPRESS 4 | 89 | #define MT_CLS_CONFIDENCE_MINUS_ONE 0x0003 |
90 | #define MT_CLS_EGALAX 5 | 90 | #define MT_CLS_DUAL_INRANGE_CONTACTID 0x0004 |
91 | #define MT_CLS_3M 7 | 91 | #define MT_CLS_DUAL_INRANGE_CONTACTNUMBER 0x0005 |
92 | #define MT_CLS_CONFIDENCE 8 | 92 | #define MT_CLS_DUAL_NSMU_CONTACTID 0x0006 |
93 | #define MT_CLS_CONFIDENCE_MINUS_ONE 9 | 93 | |
94 | #define MT_CLS_DUAL_NSMU_CONTACTID 10 | 94 | /* vendor specific classes */ |
95 | #define MT_CLS_3M 0x0101 | ||
96 | #define MT_CLS_CYPRESS 0x0102 | ||
97 | #define MT_CLS_EGALAX 0x0103 | ||
95 | 98 | ||
96 | #define MT_DEFAULT_MAXCONTACT 10 | 99 | #define MT_DEFAULT_MAXCONTACT 10 |
97 | 100 | ||
@@ -130,6 +133,11 @@ static int find_slot_from_contactid(struct mt_device *td) | |||
130 | struct mt_class mt_classes[] = { | 133 | struct mt_class mt_classes[] = { |
131 | { .name = MT_CLS_DEFAULT, | 134 | { .name = MT_CLS_DEFAULT, |
132 | .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP }, | 135 | .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP }, |
136 | { .name = MT_CLS_CONFIDENCE, | ||
137 | .quirks = MT_QUIRK_VALID_IS_CONFIDENCE }, | ||
138 | { .name = MT_CLS_CONFIDENCE_MINUS_ONE, | ||
139 | .quirks = MT_QUIRK_VALID_IS_CONFIDENCE | | ||
140 | MT_QUIRK_SLOT_IS_CONTACTID_MINUS_ONE }, | ||
133 | { .name = MT_CLS_DUAL_INRANGE_CONTACTID, | 141 | { .name = MT_CLS_DUAL_INRANGE_CONTACTID, |
134 | .quirks = MT_QUIRK_VALID_IS_INRANGE | | 142 | .quirks = MT_QUIRK_VALID_IS_INRANGE | |
135 | MT_QUIRK_SLOT_IS_CONTACTID, | 143 | MT_QUIRK_SLOT_IS_CONTACTID, |
@@ -138,13 +146,24 @@ struct mt_class mt_classes[] = { | |||
138 | .quirks = MT_QUIRK_VALID_IS_INRANGE | | 146 | .quirks = MT_QUIRK_VALID_IS_INRANGE | |
139 | MT_QUIRK_SLOT_IS_CONTACTNUMBER, | 147 | MT_QUIRK_SLOT_IS_CONTACTNUMBER, |
140 | .maxcontacts = 2 }, | 148 | .maxcontacts = 2 }, |
149 | { .name = MT_CLS_DUAL_NSMU_CONTACTID, | ||
150 | .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP | | ||
151 | MT_QUIRK_SLOT_IS_CONTACTID, | ||
152 | .maxcontacts = 2 }, | ||
153 | |||
154 | /* | ||
155 | * vendor specific classes | ||
156 | */ | ||
157 | { .name = MT_CLS_3M, | ||
158 | .quirks = MT_QUIRK_VALID_IS_CONFIDENCE | | ||
159 | MT_QUIRK_SLOT_IS_CONTACTID, | ||
160 | .sn_move = 2048, | ||
161 | .sn_width = 128, | ||
162 | .sn_height = 128 }, | ||
141 | { .name = MT_CLS_CYPRESS, | 163 | { .name = MT_CLS_CYPRESS, |
142 | .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP | | 164 | .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP | |
143 | MT_QUIRK_CYPRESS, | 165 | MT_QUIRK_CYPRESS, |
144 | .maxcontacts = 10 }, | 166 | .maxcontacts = 10 }, |
145 | { .name = MT_CLS_CONFIDENCE_MINUS_ONE, | ||
146 | .quirks = MT_QUIRK_VALID_IS_CONFIDENCE | | ||
147 | MT_QUIRK_SLOT_IS_CONTACTID_MINUS_ONE }, | ||
148 | { .name = MT_CLS_EGALAX, | 167 | { .name = MT_CLS_EGALAX, |
149 | .quirks = MT_QUIRK_SLOT_IS_CONTACTID | | 168 | .quirks = MT_QUIRK_SLOT_IS_CONTACTID | |
150 | MT_QUIRK_VALID_IS_INRANGE | | 169 | MT_QUIRK_VALID_IS_INRANGE | |
@@ -153,18 +172,6 @@ struct mt_class mt_classes[] = { | |||
153 | .sn_move = 4096, | 172 | .sn_move = 4096, |
154 | .sn_pressure = 32, | 173 | .sn_pressure = 32, |
155 | }, | 174 | }, |
156 | { .name = MT_CLS_3M, | ||
157 | .quirks = MT_QUIRK_VALID_IS_CONFIDENCE | | ||
158 | MT_QUIRK_SLOT_IS_CONTACTID, | ||
159 | .sn_move = 2048, | ||
160 | .sn_width = 128, | ||
161 | .sn_height = 128 }, | ||
162 | { .name = MT_CLS_CONFIDENCE, | ||
163 | .quirks = MT_QUIRK_VALID_IS_CONFIDENCE }, | ||
164 | { .name = MT_CLS_DUAL_NSMU_CONTACTID, | ||
165 | .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP | | ||
166 | MT_QUIRK_SLOT_IS_CONTACTID, | ||
167 | .maxcontacts = 2 }, | ||
168 | 175 | ||
169 | { } | 176 | { } |
170 | }; | 177 | }; |
@@ -596,6 +603,25 @@ static const struct hid_device_id mt_devices[] = { | |||
596 | HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, | 603 | HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, |
597 | USB_DEVICE_ID_CYPRESS_TRUETOUCH) }, | 604 | USB_DEVICE_ID_CYPRESS_TRUETOUCH) }, |
598 | 605 | ||
606 | /* eGalax devices (resistive) */ | ||
607 | { .driver_data = MT_CLS_EGALAX, | ||
608 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
609 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) }, | ||
610 | { .driver_data = MT_CLS_EGALAX, | ||
611 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
612 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3) }, | ||
613 | |||
614 | /* eGalax devices (capacitive) */ | ||
615 | { .driver_data = MT_CLS_EGALAX, | ||
616 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
617 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) }, | ||
618 | { .driver_data = MT_CLS_EGALAX, | ||
619 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
620 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2) }, | ||
621 | { .driver_data = MT_CLS_EGALAX, | ||
622 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
623 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) }, | ||
624 | |||
599 | /* Elo TouchSystems IntelliTouch Plus panel */ | 625 | /* Elo TouchSystems IntelliTouch Plus panel */ |
600 | { .driver_data = MT_CLS_DUAL_NSMU_CONTACTID, | 626 | { .driver_data = MT_CLS_DUAL_NSMU_CONTACTID, |
601 | HID_USB_DEVICE(USB_VENDOR_ID_ELO, | 627 | HID_USB_DEVICE(USB_VENDOR_ID_ELO, |
@@ -650,25 +676,6 @@ static const struct hid_device_id mt_devices[] = { | |||
650 | HID_USB_DEVICE(USB_VENDOR_ID_CANDO, | 676 | HID_USB_DEVICE(USB_VENDOR_ID_CANDO, |
651 | USB_DEVICE_ID_CANDO_PIXCIR_MULTI_TOUCH) }, | 677 | USB_DEVICE_ID_CANDO_PIXCIR_MULTI_TOUCH) }, |
652 | 678 | ||
653 | /* Resistive eGalax devices */ | ||
654 | { .driver_data = MT_CLS_EGALAX, | ||
655 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
656 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) }, | ||
657 | { .driver_data = MT_CLS_EGALAX, | ||
658 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
659 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3) }, | ||
660 | |||
661 | /* Capacitive eGalax devices */ | ||
662 | { .driver_data = MT_CLS_EGALAX, | ||
663 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
664 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) }, | ||
665 | { .driver_data = MT_CLS_EGALAX, | ||
666 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
667 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2) }, | ||
668 | { .driver_data = MT_CLS_EGALAX, | ||
669 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
670 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) }, | ||
671 | |||
672 | /* Stantum panels */ | 679 | /* Stantum panels */ |
673 | { .driver_data = MT_CLS_CONFIDENCE, | 680 | { .driver_data = MT_CLS_CONFIDENCE, |
674 | HID_USB_DEVICE(USB_VENDOR_ID_STANTUM, | 681 | HID_USB_DEVICE(USB_VENDOR_ID_STANTUM, |