1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Touchscreen driver DMI based configuration code
4  *
5  * Copyright (c) 2017 Red Hat Inc.
6  *
7  * Red Hat authors:
8  * Hans de Goede <hdegoede@redhat.com>
9  */
10 
11 #include <linux/acpi.h>
12 #include <linux/device.h>
13 #include <linux/dmi.h>
14 #include <linux/efi_embedded_fw.h>
15 #include <linux/i2c.h>
16 #include <linux/notifier.h>
17 #include <linux/property.h>
18 #include <linux/string.h>
19 
20 struct ts_dmi_data {
21 	/* The EFI embedded-fw code expects this to be the first member! */
22 	struct efi_embedded_fw_desc embedded_fw;
23 	const char *acpi_name;
24 	const struct property_entry *properties;
25 };
26 
27 /* NOTE: Please keep all entries sorted alphabetically */
28 
29 static const struct property_entry chuwi_hi8_props[] = {
30 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
31 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
32 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
33 	PROPERTY_ENTRY_BOOL("silead,home-button"),
34 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi8.fw"),
35 	{ }
36 };
37 
38 static const struct ts_dmi_data chuwi_hi8_data = {
39 	.acpi_name      = "MSSL0001:00",
40 	.properties     = chuwi_hi8_props,
41 };
42 
43 static const struct property_entry chuwi_hi8_air_props[] = {
44 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
45 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
46 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
47 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-hi8-air.fw"),
48 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
49 	{ }
50 };
51 
52 static const struct ts_dmi_data chuwi_hi8_air_data = {
53 	.acpi_name	= "MSSL1680:00",
54 	.properties	= chuwi_hi8_air_props,
55 };
56 
57 static const struct property_entry chuwi_hi8_pro_props[] = {
58 	PROPERTY_ENTRY_U32("touchscreen-min-x", 6),
59 	PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
60 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
61 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
62 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
63 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-hi8-pro.fw"),
64 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
65 	PROPERTY_ENTRY_BOOL("silead,home-button"),
66 	{ }
67 };
68 
69 static const struct ts_dmi_data chuwi_hi8_pro_data = {
70 	.embedded_fw = {
71 		.name	= "silead/gsl3680-chuwi-hi8-pro.fw",
72 		.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
73 		.length	= 39864,
74 		.sha256	= { 0xc0, 0x88, 0xc5, 0xef, 0xd1, 0x70, 0x77, 0x59,
75 			    0x4e, 0xe9, 0xc4, 0xd8, 0x2e, 0xcd, 0xbf, 0x95,
76 			    0x32, 0xd9, 0x03, 0x28, 0x0d, 0x48, 0x9f, 0x92,
77 			    0x35, 0x37, 0xf6, 0x8b, 0x2a, 0xe4, 0x73, 0xff },
78 	},
79 	.acpi_name	= "MSSL1680:00",
80 	.properties	= chuwi_hi8_pro_props,
81 };
82 
83 static const struct property_entry chuwi_hi10_air_props[] = {
84 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1981),
85 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1271),
86 	PROPERTY_ENTRY_U32("touchscreen-min-x", 99),
87 	PROPERTY_ENTRY_U32("touchscreen-min-y", 9),
88 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
89 	PROPERTY_ENTRY_U32("touchscreen-fuzz-x", 5),
90 	PROPERTY_ENTRY_U32("touchscreen-fuzz-y", 4),
91 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10-air.fw"),
92 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
93 	PROPERTY_ENTRY_BOOL("silead,home-button"),
94 	{ }
95 };
96 
97 static const struct ts_dmi_data chuwi_hi10_air_data = {
98 	.acpi_name	= "MSSL1680:00",
99 	.properties	= chuwi_hi10_air_props,
100 };
101 
102 static const struct property_entry chuwi_hi10_plus_props[] = {
103 	PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
104 	PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
105 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1914),
106 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1283),
107 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10plus.fw"),
108 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
109 	PROPERTY_ENTRY_BOOL("silead,home-button"),
110 	{ }
111 };
112 
113 static const struct ts_dmi_data chuwi_hi10_plus_data = {
114 	.acpi_name      = "MSSL0017:00",
115 	.properties     = chuwi_hi10_plus_props,
116 };
117 
118 static const struct property_entry chuwi_vi8_props[] = {
119 	PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
120 	PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
121 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1724),
122 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
123 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
124 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-vi8.fw"),
125 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
126 	PROPERTY_ENTRY_BOOL("silead,home-button"),
127 	{ }
128 };
129 
130 static const struct ts_dmi_data chuwi_vi8_data = {
131 	.acpi_name      = "MSSL1680:00",
132 	.properties     = chuwi_vi8_props,
133 };
134 
135 static const struct ts_dmi_data chuwi_vi8_plus_data = {
136 	.embedded_fw = {
137 		.name	= "chipone/icn8505-HAMP0002.fw",
138 		.prefix = { 0xb0, 0x07, 0x00, 0x00, 0xe4, 0x07, 0x00, 0x00 },
139 		.length	= 35012,
140 		.sha256	= { 0x93, 0xe5, 0x49, 0xe0, 0xb6, 0xa2, 0xb4, 0xb3,
141 			    0x88, 0x96, 0x34, 0x97, 0x5e, 0xa8, 0x13, 0x78,
142 			    0x72, 0x98, 0xb8, 0x29, 0xeb, 0x5c, 0xa7, 0xf1,
143 			    0x25, 0x13, 0x43, 0xf4, 0x30, 0x7c, 0xfc, 0x7c },
144 	},
145 };
146 
147 static const struct property_entry chuwi_vi10_props[] = {
148 	PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
149 	PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
150 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1858),
151 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
152 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-vi10.fw"),
153 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
154 	PROPERTY_ENTRY_BOOL("silead,home-button"),
155 	{ }
156 };
157 
158 static const struct ts_dmi_data chuwi_vi10_data = {
159 	.acpi_name      = "MSSL0002:00",
160 	.properties     = chuwi_vi10_props,
161 };
162 
163 static const struct property_entry chuwi_surbook_mini_props[] = {
164 	PROPERTY_ENTRY_U32("touchscreen-min-x", 88),
165 	PROPERTY_ENTRY_U32("touchscreen-min-y", 13),
166 	PROPERTY_ENTRY_U32("touchscreen-size-x", 2040),
167 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1524),
168 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-surbook-mini.fw"),
169 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
170 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
171 	{ }
172 };
173 
174 static const struct ts_dmi_data chuwi_surbook_mini_data = {
175 	.acpi_name      = "MSSL1680:00",
176 	.properties     = chuwi_surbook_mini_props,
177 };
178 
179 static const struct property_entry connect_tablet9_props[] = {
180 	PROPERTY_ENTRY_U32("touchscreen-min-x", 9),
181 	PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
182 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
183 	PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
184 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
185 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
186 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-connect-tablet9.fw"),
187 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
188 	{ }
189 };
190 
191 static const struct ts_dmi_data connect_tablet9_data = {
192 	.acpi_name      = "MSSL1680:00",
193 	.properties     = connect_tablet9_props,
194 };
195 
196 static const struct property_entry cube_iwork8_air_props[] = {
197 	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
198 	PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
199 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
200 	PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
201 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
202 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-cube-iwork8-air.fw"),
203 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
204 	{ }
205 };
206 
207 static const struct ts_dmi_data cube_iwork8_air_data = {
208 	.embedded_fw = {
209 		.name	= "silead/gsl3670-cube-iwork8-air.fw",
210 		.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
211 		.length	= 38808,
212 		.sha256	= { 0xff, 0x62, 0x2d, 0xd1, 0x8a, 0x78, 0x04, 0x7b,
213 			    0x33, 0x06, 0xb0, 0x4f, 0x7f, 0x02, 0x08, 0x9c,
214 			    0x96, 0xd4, 0x9f, 0x04, 0xe1, 0x47, 0x25, 0x25,
215 			    0x60, 0x77, 0x41, 0x33, 0xeb, 0x12, 0x82, 0xfc },
216 	},
217 	.acpi_name	= "MSSL1680:00",
218 	.properties	= cube_iwork8_air_props,
219 };
220 
221 static const struct property_entry cube_knote_i1101_props[] = {
222 	PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
223 	PROPERTY_ENTRY_U32("touchscreen-min-y",  22),
224 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1961),
225 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1513),
226 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-cube-knote-i1101.fw"),
227 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
228 	PROPERTY_ENTRY_BOOL("silead,home-button"),
229 	{ }
230 };
231 
232 static const struct ts_dmi_data cube_knote_i1101_data = {
233 	.acpi_name	= "MSSL1680:00",
234 	.properties	= cube_knote_i1101_props,
235 };
236 
237 static const struct property_entry dexp_ursus_7w_props[] = {
238 	PROPERTY_ENTRY_U32("touchscreen-size-x", 890),
239 	PROPERTY_ENTRY_U32("touchscreen-size-y", 630),
240 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-dexp-ursus-7w.fw"),
241 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
242 	PROPERTY_ENTRY_BOOL("silead,home-button"),
243 	{ }
244 };
245 
246 static const struct ts_dmi_data dexp_ursus_7w_data = {
247 	.acpi_name	= "MSSL1680:00",
248 	.properties	= dexp_ursus_7w_props,
249 };
250 
251 static const struct property_entry digma_citi_e200_props[] = {
252 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
253 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
254 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
255 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-digma_citi_e200.fw"),
256 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
257 	PROPERTY_ENTRY_BOOL("silead,home-button"),
258 	{ }
259 };
260 
261 static const struct ts_dmi_data digma_citi_e200_data = {
262 	.acpi_name	= "MSSL1680:00",
263 	.properties	= digma_citi_e200_props,
264 };
265 
266 static const struct property_entry gp_electronic_t701_props[] = {
267 	PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
268 	PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
269 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
270 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
271 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-gp-electronic-t701.fw"),
272 	{ }
273 };
274 
275 static const struct ts_dmi_data gp_electronic_t701_data = {
276 	.acpi_name	= "MSSL1680:00",
277 	.properties	= gp_electronic_t701_props,
278 };
279 
280 static const struct property_entry irbis_tw90_props[] = {
281 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
282 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
283 	PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
284 	PROPERTY_ENTRY_U32("touchscreen-min-y", 14),
285 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
286 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
287 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-irbis_tw90.fw"),
288 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
289 	PROPERTY_ENTRY_BOOL("silead,home-button"),
290 	{ }
291 };
292 
293 static const struct ts_dmi_data irbis_tw90_data = {
294 	.acpi_name	= "MSSL1680:00",
295 	.properties	= irbis_tw90_props,
296 };
297 
298 static const struct property_entry irbis_tw118_props[] = {
299 	PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
300 	PROPERTY_ENTRY_U32("touchscreen-min-y", 30),
301 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1960),
302 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1510),
303 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-irbis-tw118.fw"),
304 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
305 	{ }
306 };
307 
308 static const struct ts_dmi_data irbis_tw118_data = {
309 	.acpi_name	= "MSSL1680:00",
310 	.properties	= irbis_tw118_props,
311 };
312 
313 static const struct property_entry itworks_tw891_props[] = {
314 	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
315 	PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
316 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
317 	PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
318 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
319 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
320 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
321 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
322 	{ }
323 };
324 
325 static const struct ts_dmi_data itworks_tw891_data = {
326 	.acpi_name	= "MSSL1680:00",
327 	.properties	= itworks_tw891_props,
328 };
329 
330 static const struct property_entry jumper_ezpad_6_pro_props[] = {
331 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
332 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
333 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"),
334 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
335 	PROPERTY_ENTRY_BOOL("silead,home-button"),
336 	{ }
337 };
338 
339 static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
340 	.acpi_name	= "MSSL1680:00",
341 	.properties	= jumper_ezpad_6_pro_props,
342 };
343 
344 static const struct property_entry jumper_ezpad_6_pro_b_props[] = {
345 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
346 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
347 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro-b.fw"),
348 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
349 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
350 	PROPERTY_ENTRY_BOOL("silead,home-button"),
351 	{ }
352 };
353 
354 static const struct ts_dmi_data jumper_ezpad_6_pro_b_data = {
355 	.acpi_name      = "MSSL1680:00",
356 	.properties     = jumper_ezpad_6_pro_b_props,
357 };
358 
359 static const struct property_entry jumper_ezpad_6_m4_props[] = {
360 	PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
361 	PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
362 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1950),
363 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1525),
364 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-m4.fw"),
365 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
366 	PROPERTY_ENTRY_BOOL("silead,home-button"),
367 	{ }
368 };
369 
370 static const struct ts_dmi_data jumper_ezpad_6_m4_data = {
371 	.acpi_name	= "MSSL1680:00",
372 	.properties	= jumper_ezpad_6_m4_props,
373 };
374 
375 static const struct property_entry jumper_ezpad_mini3_props[] = {
376 	PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
377 	PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
378 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
379 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
380 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
381 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
382 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
383 	{ }
384 };
385 
386 static const struct ts_dmi_data jumper_ezpad_mini3_data = {
387 	.acpi_name	= "MSSL1680:00",
388 	.properties	= jumper_ezpad_mini3_props,
389 };
390 
391 static const struct property_entry mpman_converter9_props[] = {
392 	PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
393 	PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
394 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
395 	PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
396 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
397 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
398 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-mpman-converter9.fw"),
399 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
400 	{ }
401 };
402 
403 static const struct ts_dmi_data mpman_converter9_data = {
404 	.acpi_name	= "MSSL1680:00",
405 	.properties	= mpman_converter9_props,
406 };
407 
408 static const struct property_entry mpman_mpwin895cl_props[] = {
409 	PROPERTY_ENTRY_U32("touchscreen-min-x", 3),
410 	PROPERTY_ENTRY_U32("touchscreen-min-y", 9),
411 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
412 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1150),
413 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
414 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-mpman-mpwin895cl.fw"),
415 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
416 	PROPERTY_ENTRY_BOOL("silead,home-button"),
417 	{ }
418 };
419 
420 static const struct ts_dmi_data mpman_mpwin895cl_data = {
421 	.acpi_name	= "MSSL1680:00",
422 	.properties	= mpman_mpwin895cl_props,
423 };
424 
425 static const struct property_entry myria_my8307_props[] = {
426 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
427 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
428 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
429 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
430 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
431 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-myria-my8307.fw"),
432 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
433 	PROPERTY_ENTRY_BOOL("silead,home-button"),
434 	{ }
435 };
436 
437 static const struct ts_dmi_data myria_my8307_data = {
438 	.acpi_name	= "MSSL1680:00",
439 	.properties	= myria_my8307_props,
440 };
441 
442 static const struct property_entry onda_obook_20_plus_props[] = {
443 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
444 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
445 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
446 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
447 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
448 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
449 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
450 	PROPERTY_ENTRY_BOOL("silead,home-button"),
451 	{ }
452 };
453 
454 static const struct ts_dmi_data onda_obook_20_plus_data = {
455 	.acpi_name	= "MSSL1680:00",
456 	.properties	= onda_obook_20_plus_props,
457 };
458 
459 static const struct property_entry onda_v80_plus_v3_props[] = {
460 	PROPERTY_ENTRY_U32("touchscreen-min-x", 22),
461 	PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
462 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1698),
463 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
464 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
465 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v80-plus-v3.fw"),
466 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
467 	PROPERTY_ENTRY_BOOL("silead,home-button"),
468 	{ }
469 };
470 
471 static const struct ts_dmi_data onda_v80_plus_v3_data = {
472 	.embedded_fw = {
473 		.name	= "silead/gsl3676-onda-v80-plus-v3.fw",
474 		.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
475 		.length	= 37224,
476 		.sha256	= { 0x8f, 0xbd, 0x8f, 0x0c, 0x6b, 0xba, 0x5b, 0xf5,
477 			    0xa3, 0xc7, 0xa3, 0xc0, 0x4f, 0xcd, 0xdf, 0x32,
478 			    0xcc, 0xe4, 0x70, 0xd6, 0x46, 0x9c, 0xd7, 0xa7,
479 			    0x4b, 0x82, 0x3f, 0xab, 0xc7, 0x90, 0xea, 0x23 },
480 	},
481 	.acpi_name	= "MSSL1680:00",
482 	.properties	= onda_v80_plus_v3_props,
483 };
484 
485 static const struct property_entry onda_v820w_32g_props[] = {
486 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
487 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
488 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
489 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-onda-v820w-32g.fw"),
490 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
491 	PROPERTY_ENTRY_BOOL("silead,home-button"),
492 	{ }
493 };
494 
495 static const struct ts_dmi_data onda_v820w_32g_data = {
496 	.acpi_name	= "MSSL1680:00",
497 	.properties	= onda_v820w_32g_props,
498 };
499 
500 static const struct property_entry onda_v891_v5_props[] = {
501 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
502 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
503 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
504 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
505 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
506 	PROPERTY_ENTRY_STRING("firmware-name",
507 			      "gsl3676-onda-v891-v5.fw"),
508 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
509 	PROPERTY_ENTRY_BOOL("silead,home-button"),
510 	{ }
511 };
512 
513 static const struct ts_dmi_data onda_v891_v5_data = {
514 	.acpi_name	= "MSSL1680:00",
515 	.properties	= onda_v891_v5_props,
516 };
517 
518 static const struct property_entry onda_v891w_v1_props[] = {
519 	PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
520 	PROPERTY_ENTRY_U32("touchscreen-min-y",  8),
521 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
522 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
523 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-onda-v891w-v1.fw"),
524 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
525 	PROPERTY_ENTRY_BOOL("silead,home-button"),
526 	{ }
527 };
528 
529 static const struct ts_dmi_data onda_v891w_v1_data = {
530 	.acpi_name	= "MSSL1680:00",
531 	.properties	= onda_v891w_v1_props,
532 };
533 
534 static const struct property_entry onda_v891w_v3_props[] = {
535 	PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
536 	PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
537 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
538 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
539 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
540 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v891w-v3.fw"),
541 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
542 	PROPERTY_ENTRY_BOOL("silead,home-button"),
543 	{ }
544 };
545 
546 static const struct ts_dmi_data onda_v891w_v3_data = {
547 	.acpi_name	= "MSSL1680:00",
548 	.properties	= onda_v891w_v3_props,
549 };
550 
551 static const struct property_entry pipo_w2s_props[] = {
552 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
553 	PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
554 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
555 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
556 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w2s.fw"),
557 	{ }
558 };
559 
560 static const struct ts_dmi_data pipo_w2s_data = {
561 	.embedded_fw = {
562 		.name	= "silead/gsl1680-pipo-w2s.fw",
563 		.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
564 		.length	= 39072,
565 		.sha256	= { 0xd0, 0x58, 0xc4, 0x7d, 0x55, 0x2d, 0x62, 0x18,
566 			    0xd1, 0x6a, 0x71, 0x73, 0x0b, 0x3f, 0xbe, 0x60,
567 			    0xbb, 0x45, 0x8c, 0x52, 0x27, 0xb7, 0x18, 0xf4,
568 			    0x31, 0x00, 0x6a, 0x49, 0x76, 0xd8, 0x7c, 0xd3 },
569 	},
570 	.acpi_name	= "MSSL1680:00",
571 	.properties	= pipo_w2s_props,
572 };
573 
574 static const struct property_entry pipo_w11_props[] = {
575 	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
576 	PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
577 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
578 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1532),
579 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w11.fw"),
580 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
581 	PROPERTY_ENTRY_BOOL("silead,home-button"),
582 	{ }
583 };
584 
585 static const struct ts_dmi_data pipo_w11_data = {
586 	.acpi_name	= "MSSL1680:00",
587 	.properties	= pipo_w11_props,
588 };
589 
590 static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
591 	PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
592 	PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
593 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
594 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
595 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
596 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
597 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
598 	PROPERTY_ENTRY_BOOL("silead,home-button"),
599 	{ }
600 };
601 
602 static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
603 	.acpi_name	= "MSSL1680:00",
604 	.properties	= pov_mobii_wintab_p800w_v20_props,
605 };
606 
607 static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
608 	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
609 	PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
610 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1794),
611 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
612 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
613 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p800w.fw"),
614 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
615 	PROPERTY_ENTRY_BOOL("silead,home-button"),
616 	{ }
617 };
618 
619 static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
620 	.acpi_name	= "MSSL1680:00",
621 	.properties	= pov_mobii_wintab_p800w_v21_props,
622 };
623 
624 static const struct property_entry pov_mobii_wintab_p1006w_v10_props[] = {
625 	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
626 	PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
627 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
628 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1520),
629 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
630 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p1006w-v10.fw"),
631 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
632 	PROPERTY_ENTRY_BOOL("silead,home-button"),
633 	{ }
634 };
635 
636 static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = {
637 	.acpi_name	= "MSSL1680:00",
638 	.properties	= pov_mobii_wintab_p1006w_v10_props,
639 };
640 
641 static const struct property_entry predia_basic_props[] = {
642 	PROPERTY_ENTRY_U32("touchscreen-min-x", 3),
643 	PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
644 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
645 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1144),
646 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
647 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-predia-basic.fw"),
648 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
649 	PROPERTY_ENTRY_BOOL("silead,home-button"),
650 	{ }
651 };
652 
653 static const struct ts_dmi_data predia_basic_data = {
654 	.acpi_name	= "MSSL1680:00",
655 	.properties	= predia_basic_props,
656 };
657 
658 static const struct property_entry schneider_sct101ctm_props[] = {
659 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
660 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
661 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
662 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
663 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
664 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-schneider-sct101ctm.fw"),
665 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
666 	PROPERTY_ENTRY_BOOL("silead,home-button"),
667 	{ }
668 };
669 
670 static const struct ts_dmi_data schneider_sct101ctm_data = {
671 	.acpi_name	= "MSSL1680:00",
672 	.properties	= schneider_sct101ctm_props,
673 };
674 
675 static const struct property_entry techbite_arc_11_6_props[] = {
676 	PROPERTY_ENTRY_U32("touchscreen-min-x", 5),
677 	PROPERTY_ENTRY_U32("touchscreen-min-y", 7),
678 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1981),
679 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1270),
680 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
681 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-techbite-arc-11-6.fw"),
682 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
683 	{ }
684 };
685 
686 static const struct ts_dmi_data techbite_arc_11_6_data = {
687 	.acpi_name	= "MSSL1680:00",
688 	.properties	= techbite_arc_11_6_props,
689 };
690 
691 static const struct property_entry teclast_x3_plus_props[] = {
692 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
693 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
694 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"),
695 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
696 	PROPERTY_ENTRY_BOOL("silead,home-button"),
697 	{ }
698 };
699 
700 static const struct ts_dmi_data teclast_x3_plus_data = {
701 	.acpi_name	= "MSSL1680:00",
702 	.properties	= teclast_x3_plus_props,
703 };
704 
705 static const struct property_entry teclast_x98plus2_props[] = {
706 	PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
707 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
708 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
709 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
710 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-teclast_x98plus2.fw"),
711 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
712 	{ }
713 };
714 
715 static const struct ts_dmi_data teclast_x98plus2_data = {
716 	.acpi_name	= "MSSL1680:00",
717 	.properties	= teclast_x98plus2_props,
718 };
719 
720 static const struct property_entry trekstor_primebook_c11_props[] = {
721 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1970),
722 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1530),
723 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
724 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c11.fw"),
725 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
726 	PROPERTY_ENTRY_BOOL("silead,home-button"),
727 	{ }
728 };
729 
730 static const struct ts_dmi_data trekstor_primebook_c11_data = {
731 	.acpi_name	= "MSSL1680:00",
732 	.properties	= trekstor_primebook_c11_props,
733 };
734 
735 static const struct property_entry trekstor_primebook_c13_props[] = {
736 	PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
737 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
738 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c13.fw"),
739 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
740 	PROPERTY_ENTRY_BOOL("silead,home-button"),
741 	{ }
742 };
743 
744 static const struct ts_dmi_data trekstor_primebook_c13_data = {
745 	.acpi_name	= "MSSL1680:00",
746 	.properties	= trekstor_primebook_c13_props,
747 };
748 
749 static const struct property_entry trekstor_primetab_t13b_props[] = {
750 	PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
751 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
752 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primetab-t13b.fw"),
753 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
754 	PROPERTY_ENTRY_BOOL("silead,home-button"),
755 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
756 	{ }
757 };
758 
759 static const struct ts_dmi_data trekstor_primetab_t13b_data = {
760 	.acpi_name  = "MSSL1680:00",
761 	.properties = trekstor_primetab_t13b_props,
762 };
763 
764 static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
765 	PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
766 	PROPERTY_ENTRY_U32("touchscreen-min-y", 0),
767 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1890),
768 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
769 	PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
770 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-surftab-twin-10-1-st10432-8.fw"),
771 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
772 	PROPERTY_ENTRY_BOOL("silead,home-button"),
773 	{ }
774 };
775 
776 static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
777 	.acpi_name	= "MSSL1680:00",
778 	.properties	= trekstor_surftab_twin_10_1_props,
779 };
780 
781 static const struct property_entry trekstor_surftab_wintron70_props[] = {
782 	PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
783 	PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
784 	PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
785 	PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
786 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-surftab-wintron70-st70416-6.fw"),
787 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
788 	PROPERTY_ENTRY_BOOL("silead,home-button"),
789 	{ }
790 };
791 
792 static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
793 	.acpi_name	= "MSSL1680:00",
794 	.properties	= trekstor_surftab_wintron70_props,
795 };
796 
797 static const struct property_entry vinga_twizzle_j116_props[] = {
798 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1920),
799 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
800 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-vinga-twizzle_j116.fw"),
801 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
802 	PROPERTY_ENTRY_BOOL("silead,home-button"),
803 	{ }
804 };
805 
806 static const struct ts_dmi_data vinga_twizzle_j116_data = {
807 	.acpi_name	= "MSSL1680:00",
808 	.properties	= vinga_twizzle_j116_props,
809 };
810 
811 /* NOTE: Please keep this table sorted alphabetically */
812 const struct dmi_system_id touchscreen_dmi_table[] = {
813 	{
814 		/* Chuwi Hi8 */
815 		.driver_data = (void *)&chuwi_hi8_data,
816 		.matches = {
817 			DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
818 			DMI_MATCH(DMI_PRODUCT_NAME, "S806"),
819 		},
820 	},
821 	{
822 		/* Chuwi Hi8 (H1D_S806_206) */
823 		.driver_data = (void *)&chuwi_hi8_data,
824 		.matches = {
825 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
826 			DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
827 			DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"),
828 		},
829 	},
830 	{
831 		/* Chuwi Hi8 Air (CWI543) */
832 		.driver_data = (void *)&chuwi_hi8_air_data,
833 		.matches = {
834 			DMI_MATCH(DMI_BOARD_VENDOR, "Default string"),
835 			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
836 			DMI_MATCH(DMI_PRODUCT_NAME, "Hi8 Air"),
837 		},
838 	},
839 	{
840 		/* Chuwi Hi8 Pro (CWI513) */
841 		.driver_data = (void *)&chuwi_hi8_pro_data,
842 		.matches = {
843 			DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
844 			DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
845 		},
846 	},
847 	{
848 		/* Chuwi Hi10 Air */
849 		.driver_data = (void *)&chuwi_hi10_air_data,
850 		.matches = {
851 			DMI_MATCH(DMI_SYS_VENDOR, "CHUWI INNOVATION AND TECHNOLOGY(SHENZHEN)CO.LTD"),
852 			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
853 			DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"),
854 		},
855 	},
856 	{
857 		/* Chuwi Hi10 Plus (CWI527) */
858 		.driver_data = (void *)&chuwi_hi10_plus_data,
859 		.matches = {
860 			DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
861 			DMI_MATCH(DMI_PRODUCT_NAME, "Hi10 plus tablet"),
862 			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
863 		},
864 	},
865 	{
866 		/* Chuwi Vi8 (CWI506) */
867 		.driver_data = (void *)&chuwi_vi8_data,
868 		.matches = {
869 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
870 			DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
871 			DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
872 		},
873 	},
874 	{
875 		/* Chuwi Vi8 Plus (CWI519) */
876 		.driver_data = (void *)&chuwi_vi8_plus_data,
877 		.matches = {
878 			DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
879 			DMI_MATCH(DMI_PRODUCT_NAME, "D2D3_Vi8A1"),
880 			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
881 		},
882 	},
883 	{
884 		/* Chuwi Vi10 (CWI505) */
885 		.driver_data = (void *)&chuwi_vi10_data,
886 		.matches = {
887 			DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
888 			DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"),
889 			DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
890 			DMI_MATCH(DMI_PRODUCT_NAME, "S165"),
891 		},
892 	},
893 	{
894 		/* Chuwi Surbook Mini (CWI540) */
895 		.driver_data = (void *)&chuwi_surbook_mini_data,
896 		.matches = {
897 			DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
898 			DMI_MATCH(DMI_PRODUCT_NAME, "C3W6_AP108_4G"),
899 		},
900 	},
901 	{
902 		/* Connect Tablet 9 */
903 		.driver_data = (void *)&connect_tablet9_data,
904 		.matches = {
905 			DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
906 			DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
907 		},
908 	},
909 	{
910 		/* CUBE iwork8 Air */
911 		.driver_data = (void *)&cube_iwork8_air_data,
912 		.matches = {
913 			DMI_MATCH(DMI_SYS_VENDOR, "cube"),
914 			DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"),
915 			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
916 		},
917 	},
918 	{
919 		/* Cube KNote i1101 */
920 		.driver_data = (void *)&cube_knote_i1101_data,
921 		.matches = {
922 			DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
923 			DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"),
924 			DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"),
925 			DMI_MATCH(DMI_PRODUCT_NAME, "i1101"),
926 		},
927 	},
928 	{
929 		/* DEXP Ursus 7W */
930 		.driver_data = (void *)&dexp_ursus_7w_data,
931 		.matches = {
932 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
933 			DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
934 		},
935 	},
936 	{
937 		/* Digma Citi E200 */
938 		.driver_data = (void *)&digma_citi_e200_data,
939 		.matches = {
940 			DMI_MATCH(DMI_SYS_VENDOR, "Digma"),
941 			DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"),
942 			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
943 		},
944 	},
945 	{
946 		/* GP-electronic T701 */
947 		.driver_data = (void *)&gp_electronic_t701_data,
948 		.matches = {
949 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
950 			DMI_MATCH(DMI_PRODUCT_NAME, "T701"),
951 			DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"),
952 		},
953 	},
954 	{
955 		/* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
956 		.driver_data = (void *)&trekstor_surftab_wintron70_data,
957 		.matches = {
958 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
959 			DMI_MATCH(DMI_PRODUCT_NAME, "i71c"),
960 			DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"),
961 		},
962 	},
963 	{
964 		/* Irbis TW90 */
965 		.driver_data = (void *)&irbis_tw90_data,
966 		.matches = {
967 			DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"),
968 			DMI_MATCH(DMI_PRODUCT_NAME, "TW90"),
969 		},
970 	},
971 	{
972 		/* Irbis TW118 */
973 		.driver_data = (void *)&irbis_tw118_data,
974 		.matches = {
975 			DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"),
976 			DMI_MATCH(DMI_PRODUCT_NAME, "TW118"),
977 		},
978 	},
979 	{
980 		/* I.T.Works TW891 */
981 		.driver_data = (void *)&itworks_tw891_data,
982 		.matches = {
983 			DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
984 			DMI_MATCH(DMI_PRODUCT_NAME, "TW891"),
985 		},
986 	},
987 	{
988 		/* Jumper EZpad 6 Pro */
989 		.driver_data = (void *)&jumper_ezpad_6_pro_data,
990 		.matches = {
991 			DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
992 			DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
993 			DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
994 			/* Above matches are too generic, add bios-date match */
995 			DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"),
996 		},
997 	},
998 	{
999 		/* Jumper EZpad 6 Pro B */
1000 		.driver_data = (void *)&jumper_ezpad_6_pro_b_data,
1001 		.matches = {
1002 			DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
1003 			DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
1004 			DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
1005 			/* Above matches are too generic, add bios-date match */
1006 			DMI_MATCH(DMI_BIOS_DATE, "04/24/2018"),
1007 		},
1008 	},
1009 	{
1010 		/* Jumper EZpad 6 m4 */
1011 		.driver_data = (void *)&jumper_ezpad_6_m4_data,
1012 		.matches = {
1013 			DMI_MATCH(DMI_SYS_VENDOR, "jumper"),
1014 			DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
1015 			/* Jumper8.S106x.A00C.1066 with the version dropped */
1016 			DMI_MATCH(DMI_BIOS_VERSION, "Jumper8.S106x"),
1017 		},
1018 	},
1019 	{
1020 		/* Jumper EZpad mini3 */
1021 		.driver_data = (void *)&jumper_ezpad_mini3_data,
1022 		.matches = {
1023 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1024 			/* jumperx.T87.KFBNEEA02 with the version-nr dropped */
1025 			DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
1026 		},
1027 	},
1028 	{
1029 		/* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */
1030 		.driver_data = (void *)&trekstor_primebook_c11_data,
1031 		.matches = {
1032 			DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"),
1033 			DMI_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"),
1034 		},
1035 	},
1036 	{
1037 		/* MP Man Converter 9 */
1038 		.driver_data = (void *)&mpman_converter9_data,
1039 		.matches = {
1040 			DMI_MATCH(DMI_SYS_VENDOR, "MPMAN"),
1041 			DMI_MATCH(DMI_PRODUCT_NAME, "Converter9"),
1042 		},
1043 	},
1044 	{
1045 		/* MP Man MPWIN895CL */
1046 		.driver_data = (void *)&mpman_mpwin895cl_data,
1047 		.matches = {
1048 			DMI_MATCH(DMI_SYS_VENDOR, "MPMAN"),
1049 			DMI_MATCH(DMI_PRODUCT_NAME, "MPWIN8900CL"),
1050 		},
1051 	},
1052 	{
1053 		/* Myria MY8307 */
1054 		.driver_data = (void *)&myria_my8307_data,
1055 		.matches = {
1056 			DMI_MATCH(DMI_SYS_VENDOR, "Complet Electro Serv"),
1057 			DMI_MATCH(DMI_PRODUCT_NAME, "MY8307"),
1058 		},
1059 	},
1060 	{
1061 		/* Onda oBook 20 Plus */
1062 		.driver_data = (void *)&onda_obook_20_plus_data,
1063 		.matches = {
1064 			DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
1065 			DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
1066 		},
1067 	},
1068 	{
1069 		/* ONDA V80 plus v3 (P80PSBG9V3A01501) */
1070 		.driver_data = (void *)&onda_v80_plus_v3_data,
1071 		.matches = {
1072 			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONDA"),
1073 			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V80 PLUS")
1074 		},
1075 	},
1076 	{
1077 		/* ONDA V820w DualOS */
1078 		.driver_data = (void *)&onda_v820w_32g_data,
1079 		.matches = {
1080 			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
1081 			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS")
1082 		},
1083 	},
1084 	{
1085 		/* ONDA V891 v5 */
1086 		.driver_data = (void *)&onda_v891_v5_data,
1087 		.matches = {
1088 			DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
1089 			DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
1090 			DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D869CJABNRBA06"),
1091 		},
1092 	},
1093 	{
1094 		/* ONDA V891w revision P891WBEBV1B00 aka v1 */
1095 		.driver_data = (void *)&onda_v891w_v1_data,
1096 		.matches = {
1097 			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
1098 			DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"),
1099 			DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"),
1100 			/* Exact match, different versions need different fw */
1101 			DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
1102 		},
1103 	},
1104 	{
1105 		/* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
1106 		.driver_data = (void *)&onda_v891w_v3_data,
1107 		.matches = {
1108 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1109 			DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
1110 			DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
1111 		},
1112 	},
1113 	{
1114 		/* Pipo W2S */
1115 		.driver_data = (void *)&pipo_w2s_data,
1116 		.matches = {
1117 			DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
1118 			DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
1119 		},
1120 	},
1121 	{
1122 		/* Pipo W11 */
1123 		.driver_data = (void *)&pipo_w11_data,
1124 		.matches = {
1125 			DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
1126 			DMI_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."),
1127 			/* Above matches are too generic, add bios-ver match */
1128 			DMI_MATCH(DMI_BIOS_VERSION, "JS-BI-10.6-SF133GR300-GA55B-024-F"),
1129 		},
1130 	},
1131 	{
1132 		/* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
1133 		.driver_data = (void *)&trekstor_surftab_wintron70_data,
1134 		.matches = {
1135 			DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"),
1136 			DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"),
1137 			/* Exact match, different versions need different fw */
1138 			DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"),
1139 		},
1140 	},
1141 	{
1142 		/* Point of View mobii wintab p800w (v2.0) */
1143 		.driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
1144 		.matches = {
1145 			DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
1146 			DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
1147 			DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"),
1148 			/* Above matches are too generic, add bios-date match */
1149 			DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
1150 		},
1151 	},
1152 	{
1153 		/* Predia Basic tablet) */
1154 		.driver_data = (void *)&predia_basic_data,
1155 		.matches = {
1156 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1157 			DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
1158 			/* Above matches are too generic, add bios-version match */
1159 			DMI_MATCH(DMI_BIOS_VERSION, "Mx.WT107.KUBNGEA"),
1160 		},
1161 	},
1162 	{
1163 		/* Point of View mobii wintab p800w (v2.1) */
1164 		.driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
1165 		.matches = {
1166 			DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
1167 			DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
1168 			DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"),
1169 			/* Above matches are too generic, add bios-date match */
1170 			DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"),
1171 		},
1172 	},
1173 	{
1174 		/* Point of View mobii wintab p1006w (v1.0) */
1175 		.driver_data = (void *)&pov_mobii_wintab_p1006w_v10_data,
1176 		.matches = {
1177 			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
1178 			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
1179 			/* Note 105b is Foxcon's USB/PCI vendor id */
1180 			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"),
1181 			DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
1182 		},
1183 	},
1184 	{
1185 		/* Schneider SCT101CTM */
1186 		.driver_data = (void *)&schneider_sct101ctm_data,
1187 		.matches = {
1188 			DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
1189 			DMI_MATCH(DMI_PRODUCT_NAME, "SCT101CTM"),
1190 		},
1191 	},
1192 	{
1193 		/* Techbite Arc 11.6 */
1194 		.driver_data = (void *)&techbite_arc_11_6_data,
1195 		.matches = {
1196 			DMI_MATCH(DMI_SYS_VENDOR, "mPTech"),
1197 			DMI_MATCH(DMI_PRODUCT_NAME, "techBite Arc 11.6"),
1198 			DMI_MATCH(DMI_BOARD_NAME, "G8316_272B"),
1199 		},
1200 	},
1201 	{
1202 		/* Teclast X3 Plus */
1203 		.driver_data = (void *)&teclast_x3_plus_data,
1204 		.matches = {
1205 			DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
1206 			DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
1207 			DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
1208 		},
1209 	},
1210 	{
1211 		/* Teclast X98 Plus II */
1212 		.driver_data = (void *)&teclast_x98plus2_data,
1213 		.matches = {
1214 			DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
1215 			DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
1216 		},
1217 	},
1218 	{
1219 		/* Trekstor Primebook C11 */
1220 		.driver_data = (void *)&trekstor_primebook_c11_data,
1221 		.matches = {
1222 			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1223 			DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"),
1224 		},
1225 	},
1226 	{
1227 		/* Trekstor Primebook C11B (same touchscreen as the C11) */
1228 		.driver_data = (void *)&trekstor_primebook_c11_data,
1229 		.matches = {
1230 			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1231 			DMI_MATCH(DMI_PRODUCT_NAME, "PRIMEBOOK C11B"),
1232 		},
1233 	},
1234 	{
1235 		/* Trekstor Primebook C13 */
1236 		.driver_data = (void *)&trekstor_primebook_c13_data,
1237 		.matches = {
1238 			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1239 			DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
1240 		},
1241 	},
1242 	{
1243 		/* Trekstor Primetab T13B */
1244 		.driver_data = (void *)&trekstor_primetab_t13b_data,
1245 		.matches = {
1246 			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1247 			DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"),
1248 		},
1249 	},
1250 	{
1251 		/* TrekStor SurfTab twin 10.1 ST10432-8 */
1252 		.driver_data = (void *)&trekstor_surftab_twin_10_1_data,
1253 		.matches = {
1254 			DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1255 			DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
1256 		},
1257 	},
1258 	{
1259 		/* Trekstor Surftab Wintron 7.0 ST70416-6 */
1260 		.driver_data = (void *)&trekstor_surftab_wintron70_data,
1261 		.matches = {
1262 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1263 			DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"),
1264 			/* Exact match, different versions need different fw */
1265 			DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"),
1266 		},
1267 	},
1268 	{
1269 		/* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
1270 		.driver_data = (void *)&trekstor_surftab_wintron70_data,
1271 		.matches = {
1272 			DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1273 			DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab wintron 7.0 ST70416-6"),
1274 			/* Exact match, different versions need different fw */
1275 			DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
1276 		},
1277 	},
1278 	{
1279 		/* Trekstor Yourbook C11B (same touchscreen as the Primebook C11) */
1280 		.driver_data = (void *)&trekstor_primebook_c11_data,
1281 		.matches = {
1282 			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1283 			DMI_MATCH(DMI_PRODUCT_NAME, "YOURBOOK C11B"),
1284 		},
1285 	},
1286 	{
1287 		/* Vinga Twizzle J116 */
1288 		.driver_data = (void *)&vinga_twizzle_j116_data,
1289 		.matches = {
1290 			DMI_MATCH(DMI_PRODUCT_NAME, "VINGA Twizzle J116"),
1291 		},
1292 	},
1293 	{
1294 		/* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
1295 		.driver_data = (void *)&chuwi_vi8_data,
1296 		.matches = {
1297 			DMI_MATCH(DMI_SYS_VENDOR, "YOURS"),
1298 			DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"),
1299 		},
1300 	},
1301 	{ }
1302 };
1303 
1304 static const struct ts_dmi_data *ts_data;
1305 
1306 static void ts_dmi_add_props(struct i2c_client *client)
1307 {
1308 	struct device *dev = &client->dev;
1309 	int error;
1310 
1311 	if (has_acpi_companion(dev) &&
1312 	    !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
1313 		error = device_add_properties(dev, ts_data->properties);
1314 		if (error)
1315 			dev_err(dev, "failed to add properties: %d\n", error);
1316 	}
1317 }
1318 
1319 static int ts_dmi_notifier_call(struct notifier_block *nb,
1320 				unsigned long action, void *data)
1321 {
1322 	struct device *dev = data;
1323 	struct i2c_client *client;
1324 
1325 	switch (action) {
1326 	case BUS_NOTIFY_ADD_DEVICE:
1327 		client = i2c_verify_client(dev);
1328 		if (client)
1329 			ts_dmi_add_props(client);
1330 		break;
1331 
1332 	default:
1333 		break;
1334 	}
1335 
1336 	return 0;
1337 }
1338 
1339 static struct notifier_block ts_dmi_notifier = {
1340 	.notifier_call = ts_dmi_notifier_call,
1341 };
1342 
1343 static int __init ts_dmi_init(void)
1344 {
1345 	const struct dmi_system_id *dmi_id;
1346 	int error;
1347 
1348 	dmi_id = dmi_first_match(touchscreen_dmi_table);
1349 	if (!dmi_id)
1350 		return 0; /* Not an error */
1351 
1352 	ts_data = dmi_id->driver_data;
1353 	/* Some dmi table entries only provide an efi_embedded_fw_desc */
1354 	if (!ts_data->properties)
1355 		return 0;
1356 
1357 	error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
1358 	if (error)
1359 		pr_err("%s: failed to register i2c bus notifier: %d\n",
1360 			__func__, error);
1361 
1362 	return error;
1363 }
1364 
1365 /*
1366  * We are registering out notifier after i2c core is initialized and i2c bus
1367  * itself is ready (which happens at postcore initcall level), but before
1368  * ACPI starts enumerating devices (at subsys initcall level).
1369  */
1370 arch_initcall(ts_dmi_init);
1371