aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>2013-01-31 11:22:31 -0500
committerJiri Kosina <jkosina@suse.cz>2013-02-05 06:07:42 -0500
commitdc3e1d8052548f5b46288a1d43c93684f7d64804 (patch)
tree075a5e629027dfbe91fd5983db0a7fddd8def0cf /drivers
parente325905c6c28331772dcd3218a690af744a1a564 (diff)
HID: multitouch: make MT_CLS_ALWAYS_TRUE the new default class
By running a test on all the traces of the devices I have, I noticed that the class MT_CLS_ALWAYS_TRUE could handle all the devices I've seen so far without any other quirks. I guess this is the behavior Win 7 requires in its driver. We can change the default class then and keep the existing classes for backward compatibility and performances for some of them. Two operations have been done: * replaced MT_CLS_DEFAULT by MT_CLS_NSMU * then replaced MT_CLS_ALWAYS_TRUE by MT_CLS_DEFAULT Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hid/hid-multitouch.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index a3d4f0fbc4be..28af54fb07d9 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -114,7 +114,7 @@ struct mt_device {
114#define MT_CLS_DUAL_INRANGE_CONTACTNUMBER 0x0007 114#define MT_CLS_DUAL_INRANGE_CONTACTNUMBER 0x0007
115#define MT_CLS_DUAL_NSMU_CONTACTID 0x0008 115#define MT_CLS_DUAL_NSMU_CONTACTID 0x0008
116#define MT_CLS_INRANGE_CONTACTNUMBER 0x0009 116#define MT_CLS_INRANGE_CONTACTNUMBER 0x0009
117#define MT_CLS_ALWAYS_TRUE 0x000a 117#define MT_CLS_NSMU 0x000a
118#define MT_CLS_DUAL_CONTACT_NUMBER 0x0010 118#define MT_CLS_DUAL_CONTACT_NUMBER 0x0010
119#define MT_CLS_DUAL_CONTACT_ID 0x0011 119#define MT_CLS_DUAL_CONTACT_ID 0x0011
120 120
@@ -150,6 +150,9 @@ static int cypress_compute_slot(struct mt_device *td)
150 150
151static struct mt_class mt_classes[] = { 151static struct mt_class mt_classes[] = {
152 { .name = MT_CLS_DEFAULT, 152 { .name = MT_CLS_DEFAULT,
153 .quirks = MT_QUIRK_ALWAYS_VALID |
154 MT_QUIRK_CONTACT_CNT_ACCURATE },
155 { .name = MT_CLS_NSMU,
153 .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP }, 156 .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP },
154 { .name = MT_CLS_SERIAL, 157 { .name = MT_CLS_SERIAL,
155 .quirks = MT_QUIRK_ALWAYS_VALID}, 158 .quirks = MT_QUIRK_ALWAYS_VALID},
@@ -176,9 +179,6 @@ static struct mt_class mt_classes[] = {
176 { .name = MT_CLS_INRANGE_CONTACTNUMBER, 179 { .name = MT_CLS_INRANGE_CONTACTNUMBER,
177 .quirks = MT_QUIRK_VALID_IS_INRANGE | 180 .quirks = MT_QUIRK_VALID_IS_INRANGE |
178 MT_QUIRK_SLOT_IS_CONTACTNUMBER }, 181 MT_QUIRK_SLOT_IS_CONTACTNUMBER },
179 { .name = MT_CLS_ALWAYS_TRUE,
180 .quirks = MT_QUIRK_ALWAYS_VALID |
181 MT_QUIRK_CONTACT_CNT_ACCURATE },
182 { .name = MT_CLS_DUAL_CONTACT_NUMBER, 182 { .name = MT_CLS_DUAL_CONTACT_NUMBER,
183 .quirks = MT_QUIRK_ALWAYS_VALID | 183 .quirks = MT_QUIRK_ALWAYS_VALID |
184 MT_QUIRK_CONTACT_CNT_ACCURATE | 184 MT_QUIRK_CONTACT_CNT_ACCURATE |
@@ -939,7 +939,7 @@ static const struct hid_device_id mt_devices[] = {
939 USB_DEVICE_ID_3M3266) }, 939 USB_DEVICE_ID_3M3266) },
940 940
941 /* ActionStar panels */ 941 /* ActionStar panels */
942 { .driver_data = MT_CLS_DEFAULT, 942 { .driver_data = MT_CLS_NSMU,
943 MT_USB_DEVICE(USB_VENDOR_ID_ACTIONSTAR, 943 MT_USB_DEVICE(USB_VENDOR_ID_ACTIONSTAR,
944 USB_DEVICE_ID_ACTIONSTAR_1011) }, 944 USB_DEVICE_ID_ACTIONSTAR_1011) },
945 945
@@ -952,7 +952,7 @@ static const struct hid_device_id mt_devices[] = {
952 USB_DEVICE_ID_ATMEL_MXT_DIGITIZER) }, 952 USB_DEVICE_ID_ATMEL_MXT_DIGITIZER) },
953 953
954 /* Baanto multitouch devices */ 954 /* Baanto multitouch devices */
955 { .driver_data = MT_CLS_DEFAULT, 955 { .driver_data = MT_CLS_NSMU,
956 MT_USB_DEVICE(USB_VENDOR_ID_BAANTO, 956 MT_USB_DEVICE(USB_VENDOR_ID_BAANTO,
957 USB_DEVICE_ID_BAANTO_MT_190W2) }, 957 USB_DEVICE_ID_BAANTO_MT_190W2) },
958 /* Cando panels */ 958 /* Cando panels */
@@ -970,12 +970,12 @@ static const struct hid_device_id mt_devices[] = {
970 USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6) }, 970 USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6) },
971 971
972 /* Chunghwa Telecom touch panels */ 972 /* Chunghwa Telecom touch panels */
973 { .driver_data = MT_CLS_DEFAULT, 973 { .driver_data = MT_CLS_NSMU,
974 MT_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT, 974 MT_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT,
975 USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) }, 975 USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) },
976 976
977 /* CVTouch panels */ 977 /* CVTouch panels */
978 { .driver_data = MT_CLS_DEFAULT, 978 { .driver_data = MT_CLS_NSMU,
979 MT_USB_DEVICE(USB_VENDOR_ID_CVTOUCH, 979 MT_USB_DEVICE(USB_VENDOR_ID_CVTOUCH,
980 USB_DEVICE_ID_CVTOUCH_SCREEN) }, 980 USB_DEVICE_ID_CVTOUCH_SCREEN) },
981 981
@@ -1064,12 +1064,12 @@ static const struct hid_device_id mt_devices[] = {
1064 USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PWT_TENFINGERS) }, 1064 USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PWT_TENFINGERS) },
1065 1065
1066 /* Gametel game controller */ 1066 /* Gametel game controller */
1067 { .driver_data = MT_CLS_DEFAULT, 1067 { .driver_data = MT_CLS_NSMU,
1068 MT_BT_DEVICE(USB_VENDOR_ID_FRUCTEL, 1068 MT_BT_DEVICE(USB_VENDOR_ID_FRUCTEL,
1069 USB_DEVICE_ID_GAMETEL_MT_MODE) }, 1069 USB_DEVICE_ID_GAMETEL_MT_MODE) },
1070 1070
1071 /* GoodTouch panels */ 1071 /* GoodTouch panels */
1072 { .driver_data = MT_CLS_DEFAULT, 1072 { .driver_data = MT_CLS_NSMU,
1073 MT_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH, 1073 MT_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH,
1074 USB_DEVICE_ID_GOODTOUCH_000f) }, 1074 USB_DEVICE_ID_GOODTOUCH_000f) },
1075 1075
@@ -1087,7 +1087,7 @@ static const struct hid_device_id mt_devices[] = {
1087 USB_DEVICE_ID_IDEACOM_IDC6651) }, 1087 USB_DEVICE_ID_IDEACOM_IDC6651) },
1088 1088
1089 /* Ilitek dual touch panel */ 1089 /* Ilitek dual touch panel */
1090 { .driver_data = MT_CLS_DEFAULT, 1090 { .driver_data = MT_CLS_NSMU,
1091 MT_USB_DEVICE(USB_VENDOR_ID_ILITEK, 1091 MT_USB_DEVICE(USB_VENDOR_ID_ILITEK,
1092 USB_DEVICE_ID_ILITEK_MULTITOUCH) }, 1092 USB_DEVICE_ID_ILITEK_MULTITOUCH) },
1093 1093
@@ -1121,7 +1121,7 @@ static const struct hid_device_id mt_devices[] = {
1121 USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) }, 1121 USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) },
1122 1122
1123 /* Nexio panels */ 1123 /* Nexio panels */
1124 { .driver_data = MT_CLS_ALWAYS_TRUE, 1124 { .driver_data = MT_CLS_DEFAULT,
1125 MT_USB_DEVICE(USB_VENDOR_ID_NEXIO, 1125 MT_USB_DEVICE(USB_VENDOR_ID_NEXIO,
1126 USB_DEVICE_ID_NEXIO_MULTITOUCH_420)}, 1126 USB_DEVICE_ID_NEXIO_MULTITOUCH_420)},
1127 1127
@@ -1134,7 +1134,7 @@ static const struct hid_device_id mt_devices[] = {
1134 USB_DEVICE_ID_PANABOARD_UBT880) }, 1134 USB_DEVICE_ID_PANABOARD_UBT880) },
1135 1135
1136 /* Novatek Panel */ 1136 /* Novatek Panel */
1137 { .driver_data = MT_CLS_DEFAULT, 1137 { .driver_data = MT_CLS_NSMU,
1138 MT_USB_DEVICE(USB_VENDOR_ID_NOVATEK, 1138 MT_USB_DEVICE(USB_VENDOR_ID_NOVATEK,
1139 USB_DEVICE_ID_NOVATEK_PCT) }, 1139 USB_DEVICE_ID_NOVATEK_PCT) },
1140 1140
@@ -1180,7 +1180,7 @@ static const struct hid_device_id mt_devices[] = {
1180 { .driver_data = MT_CLS_CONFIDENCE, 1180 { .driver_data = MT_CLS_CONFIDENCE,
1181 MT_USB_DEVICE(USB_VENDOR_ID_STANTUM_STM, 1181 MT_USB_DEVICE(USB_VENDOR_ID_STANTUM_STM,
1182 USB_DEVICE_ID_MTP_STM)}, 1182 USB_DEVICE_ID_MTP_STM)},
1183 { .driver_data = MT_CLS_ALWAYS_TRUE, 1183 { .driver_data = MT_CLS_DEFAULT,
1184 MT_USB_DEVICE(USB_VENDOR_ID_STANTUM_SITRONIX, 1184 MT_USB_DEVICE(USB_VENDOR_ID_STANTUM_SITRONIX,
1185 USB_DEVICE_ID_MTP_SITRONIX)}, 1185 USB_DEVICE_ID_MTP_SITRONIX)},
1186 1186
@@ -1190,48 +1190,48 @@ static const struct hid_device_id mt_devices[] = {
1190 USB_DEVICE_ID_TOPSEED2_PERIPAD_701) }, 1190 USB_DEVICE_ID_TOPSEED2_PERIPAD_701) },
1191 1191
1192 /* Touch International panels */ 1192 /* Touch International panels */
1193 { .driver_data = MT_CLS_DEFAULT, 1193 { .driver_data = MT_CLS_NSMU,
1194 MT_USB_DEVICE(USB_VENDOR_ID_TOUCH_INTL, 1194 MT_USB_DEVICE(USB_VENDOR_ID_TOUCH_INTL,
1195 USB_DEVICE_ID_TOUCH_INTL_MULTI_TOUCH) }, 1195 USB_DEVICE_ID_TOUCH_INTL_MULTI_TOUCH) },
1196 1196
1197 /* Unitec panels */ 1197 /* Unitec panels */
1198 { .driver_data = MT_CLS_DEFAULT, 1198 { .driver_data = MT_CLS_NSMU,
1199 MT_USB_DEVICE(USB_VENDOR_ID_UNITEC, 1199 MT_USB_DEVICE(USB_VENDOR_ID_UNITEC,
1200 USB_DEVICE_ID_UNITEC_USB_TOUCH_0709) }, 1200 USB_DEVICE_ID_UNITEC_USB_TOUCH_0709) },
1201 { .driver_data = MT_CLS_DEFAULT, 1201 { .driver_data = MT_CLS_NSMU,
1202 MT_USB_DEVICE(USB_VENDOR_ID_UNITEC, 1202 MT_USB_DEVICE(USB_VENDOR_ID_UNITEC,
1203 USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19) }, 1203 USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19) },
1204 /* XAT */ 1204 /* XAT */
1205 { .driver_data = MT_CLS_DEFAULT, 1205 { .driver_data = MT_CLS_NSMU,
1206 MT_USB_DEVICE(USB_VENDOR_ID_XAT, 1206 MT_USB_DEVICE(USB_VENDOR_ID_XAT,
1207 USB_DEVICE_ID_XAT_CSR) }, 1207 USB_DEVICE_ID_XAT_CSR) },
1208 1208
1209 /* Xiroku */ 1209 /* Xiroku */
1210 { .driver_data = MT_CLS_DEFAULT, 1210 { .driver_data = MT_CLS_NSMU,
1211 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, 1211 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
1212 USB_DEVICE_ID_XIROKU_SPX) }, 1212 USB_DEVICE_ID_XIROKU_SPX) },
1213 { .driver_data = MT_CLS_DEFAULT, 1213 { .driver_data = MT_CLS_NSMU,
1214 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, 1214 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
1215 USB_DEVICE_ID_XIROKU_MPX) }, 1215 USB_DEVICE_ID_XIROKU_MPX) },
1216 { .driver_data = MT_CLS_DEFAULT, 1216 { .driver_data = MT_CLS_NSMU,
1217 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, 1217 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
1218 USB_DEVICE_ID_XIROKU_CSR) }, 1218 USB_DEVICE_ID_XIROKU_CSR) },
1219 { .driver_data = MT_CLS_DEFAULT, 1219 { .driver_data = MT_CLS_NSMU,
1220 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, 1220 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
1221 USB_DEVICE_ID_XIROKU_SPX1) }, 1221 USB_DEVICE_ID_XIROKU_SPX1) },
1222 { .driver_data = MT_CLS_DEFAULT, 1222 { .driver_data = MT_CLS_NSMU,
1223 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, 1223 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
1224 USB_DEVICE_ID_XIROKU_MPX1) }, 1224 USB_DEVICE_ID_XIROKU_MPX1) },
1225 { .driver_data = MT_CLS_DEFAULT, 1225 { .driver_data = MT_CLS_NSMU,
1226 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, 1226 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
1227 USB_DEVICE_ID_XIROKU_CSR1) }, 1227 USB_DEVICE_ID_XIROKU_CSR1) },
1228 { .driver_data = MT_CLS_DEFAULT, 1228 { .driver_data = MT_CLS_NSMU,
1229 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, 1229 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
1230 USB_DEVICE_ID_XIROKU_SPX2) }, 1230 USB_DEVICE_ID_XIROKU_SPX2) },
1231 { .driver_data = MT_CLS_DEFAULT, 1231 { .driver_data = MT_CLS_NSMU,
1232 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, 1232 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
1233 USB_DEVICE_ID_XIROKU_MPX2) }, 1233 USB_DEVICE_ID_XIROKU_MPX2) },
1234 { .driver_data = MT_CLS_DEFAULT, 1234 { .driver_data = MT_CLS_NSMU,
1235 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU, 1235 MT_USB_DEVICE(USB_VENDOR_ID_XIROKU,
1236 USB_DEVICE_ID_XIROKU_CSR2) }, 1236 USB_DEVICE_ID_XIROKU_CSR2) },
1237 1237