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 itworks_tw891_props[] = {
299 	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
300 	PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
301 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
302 	PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
303 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
304 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
305 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
306 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
307 	{ }
308 };
309 
310 static const struct ts_dmi_data itworks_tw891_data = {
311 	.acpi_name	= "MSSL1680:00",
312 	.properties	= itworks_tw891_props,
313 };
314 
315 static const struct property_entry jumper_ezpad_6_pro_props[] = {
316 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
317 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
318 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"),
319 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
320 	PROPERTY_ENTRY_BOOL("silead,home-button"),
321 	{ }
322 };
323 
324 static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
325 	.acpi_name	= "MSSL1680:00",
326 	.properties	= jumper_ezpad_6_pro_props,
327 };
328 
329 static const struct property_entry jumper_ezpad_6_pro_b_props[] = {
330 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
331 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
332 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro-b.fw"),
333 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
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_b_data = {
340 	.acpi_name      = "MSSL1680:00",
341 	.properties     = jumper_ezpad_6_pro_b_props,
342 };
343 
344 static const struct property_entry jumper_ezpad_6_m4_props[] = {
345 	PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
346 	PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
347 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1950),
348 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1525),
349 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-m4.fw"),
350 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
351 	PROPERTY_ENTRY_BOOL("silead,home-button"),
352 	{ }
353 };
354 
355 static const struct ts_dmi_data jumper_ezpad_6_m4_data = {
356 	.acpi_name	= "MSSL1680:00",
357 	.properties	= jumper_ezpad_6_m4_props,
358 };
359 
360 static const struct property_entry jumper_ezpad_mini3_props[] = {
361 	PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
362 	PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
363 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
364 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
365 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
366 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
367 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
368 	{ }
369 };
370 
371 static const struct ts_dmi_data jumper_ezpad_mini3_data = {
372 	.acpi_name	= "MSSL1680:00",
373 	.properties	= jumper_ezpad_mini3_props,
374 };
375 
376 static const struct property_entry mpman_converter9_props[] = {
377 	PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
378 	PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
379 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
380 	PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
381 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
382 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
383 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-mpman-converter9.fw"),
384 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
385 	{ }
386 };
387 
388 static const struct ts_dmi_data mpman_converter9_data = {
389 	.acpi_name	= "MSSL1680:00",
390 	.properties	= mpman_converter9_props,
391 };
392 
393 static const struct property_entry mpman_mpwin895cl_props[] = {
394 	PROPERTY_ENTRY_U32("touchscreen-min-x", 3),
395 	PROPERTY_ENTRY_U32("touchscreen-min-y", 9),
396 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
397 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1150),
398 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
399 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-mpman-mpwin895cl.fw"),
400 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
401 	PROPERTY_ENTRY_BOOL("silead,home-button"),
402 	{ }
403 };
404 
405 static const struct ts_dmi_data mpman_mpwin895cl_data = {
406 	.acpi_name	= "MSSL1680:00",
407 	.properties	= mpman_mpwin895cl_props,
408 };
409 
410 static const struct property_entry myria_my8307_props[] = {
411 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
412 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
413 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
414 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
415 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
416 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-myria-my8307.fw"),
417 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
418 	PROPERTY_ENTRY_BOOL("silead,home-button"),
419 	{ }
420 };
421 
422 static const struct ts_dmi_data myria_my8307_data = {
423 	.acpi_name	= "MSSL1680:00",
424 	.properties	= myria_my8307_props,
425 };
426 
427 static const struct property_entry onda_obook_20_plus_props[] = {
428 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
429 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
430 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
431 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
432 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
433 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
434 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
435 	PROPERTY_ENTRY_BOOL("silead,home-button"),
436 	{ }
437 };
438 
439 static const struct ts_dmi_data onda_obook_20_plus_data = {
440 	.acpi_name	= "MSSL1680:00",
441 	.properties	= onda_obook_20_plus_props,
442 };
443 
444 static const struct property_entry onda_v80_plus_v3_props[] = {
445 	PROPERTY_ENTRY_U32("touchscreen-min-x", 22),
446 	PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
447 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1698),
448 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
449 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
450 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v80-plus-v3.fw"),
451 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
452 	PROPERTY_ENTRY_BOOL("silead,home-button"),
453 	{ }
454 };
455 
456 static const struct ts_dmi_data onda_v80_plus_v3_data = {
457 	.embedded_fw = {
458 		.name	= "silead/gsl3676-onda-v80-plus-v3.fw",
459 		.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
460 		.length	= 37224,
461 		.sha256	= { 0x8f, 0xbd, 0x8f, 0x0c, 0x6b, 0xba, 0x5b, 0xf5,
462 			    0xa3, 0xc7, 0xa3, 0xc0, 0x4f, 0xcd, 0xdf, 0x32,
463 			    0xcc, 0xe4, 0x70, 0xd6, 0x46, 0x9c, 0xd7, 0xa7,
464 			    0x4b, 0x82, 0x3f, 0xab, 0xc7, 0x90, 0xea, 0x23 },
465 	},
466 	.acpi_name	= "MSSL1680:00",
467 	.properties	= onda_v80_plus_v3_props,
468 };
469 
470 static const struct property_entry onda_v820w_32g_props[] = {
471 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
472 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
473 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
474 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-onda-v820w-32g.fw"),
475 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
476 	PROPERTY_ENTRY_BOOL("silead,home-button"),
477 	{ }
478 };
479 
480 static const struct ts_dmi_data onda_v820w_32g_data = {
481 	.acpi_name	= "MSSL1680:00",
482 	.properties	= onda_v820w_32g_props,
483 };
484 
485 static const struct property_entry onda_v891_v5_props[] = {
486 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
487 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
488 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
489 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
490 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
491 	PROPERTY_ENTRY_STRING("firmware-name",
492 			      "gsl3676-onda-v891-v5.fw"),
493 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
494 	PROPERTY_ENTRY_BOOL("silead,home-button"),
495 	{ }
496 };
497 
498 static const struct ts_dmi_data onda_v891_v5_data = {
499 	.acpi_name	= "MSSL1680:00",
500 	.properties	= onda_v891_v5_props,
501 };
502 
503 static const struct property_entry onda_v891w_v1_props[] = {
504 	PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
505 	PROPERTY_ENTRY_U32("touchscreen-min-y",  8),
506 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
507 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
508 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-onda-v891w-v1.fw"),
509 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
510 	PROPERTY_ENTRY_BOOL("silead,home-button"),
511 	{ }
512 };
513 
514 static const struct ts_dmi_data onda_v891w_v1_data = {
515 	.acpi_name	= "MSSL1680:00",
516 	.properties	= onda_v891w_v1_props,
517 };
518 
519 static const struct property_entry onda_v891w_v3_props[] = {
520 	PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
521 	PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
522 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
523 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
524 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
525 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v891w-v3.fw"),
526 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
527 	PROPERTY_ENTRY_BOOL("silead,home-button"),
528 	{ }
529 };
530 
531 static const struct ts_dmi_data onda_v891w_v3_data = {
532 	.acpi_name	= "MSSL1680:00",
533 	.properties	= onda_v891w_v3_props,
534 };
535 
536 static const struct property_entry pipo_w2s_props[] = {
537 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
538 	PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
539 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
540 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
541 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w2s.fw"),
542 	{ }
543 };
544 
545 static const struct ts_dmi_data pipo_w2s_data = {
546 	.embedded_fw = {
547 		.name	= "silead/gsl1680-pipo-w2s.fw",
548 		.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
549 		.length	= 39072,
550 		.sha256	= { 0xd0, 0x58, 0xc4, 0x7d, 0x55, 0x2d, 0x62, 0x18,
551 			    0xd1, 0x6a, 0x71, 0x73, 0x0b, 0x3f, 0xbe, 0x60,
552 			    0xbb, 0x45, 0x8c, 0x52, 0x27, 0xb7, 0x18, 0xf4,
553 			    0x31, 0x00, 0x6a, 0x49, 0x76, 0xd8, 0x7c, 0xd3 },
554 	},
555 	.acpi_name	= "MSSL1680:00",
556 	.properties	= pipo_w2s_props,
557 };
558 
559 static const struct property_entry pipo_w11_props[] = {
560 	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
561 	PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
562 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
563 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1532),
564 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w11.fw"),
565 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
566 	PROPERTY_ENTRY_BOOL("silead,home-button"),
567 	{ }
568 };
569 
570 static const struct ts_dmi_data pipo_w11_data = {
571 	.acpi_name	= "MSSL1680:00",
572 	.properties	= pipo_w11_props,
573 };
574 
575 static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
576 	PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
577 	PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
578 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
579 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
580 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
581 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
582 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
583 	PROPERTY_ENTRY_BOOL("silead,home-button"),
584 	{ }
585 };
586 
587 static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
588 	.acpi_name	= "MSSL1680:00",
589 	.properties	= pov_mobii_wintab_p800w_v20_props,
590 };
591 
592 static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
593 	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
594 	PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
595 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1794),
596 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
597 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
598 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p800w.fw"),
599 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
600 	PROPERTY_ENTRY_BOOL("silead,home-button"),
601 	{ }
602 };
603 
604 static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
605 	.acpi_name	= "MSSL1680:00",
606 	.properties	= pov_mobii_wintab_p800w_v21_props,
607 };
608 
609 static const struct property_entry pov_mobii_wintab_p1006w_v10_props[] = {
610 	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
611 	PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
612 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
613 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1520),
614 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
615 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p1006w-v10.fw"),
616 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
617 	PROPERTY_ENTRY_BOOL("silead,home-button"),
618 	{ }
619 };
620 
621 static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = {
622 	.acpi_name	= "MSSL1680:00",
623 	.properties	= pov_mobii_wintab_p1006w_v10_props,
624 };
625 
626 static const struct property_entry schneider_sct101ctm_props[] = {
627 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
628 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
629 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
630 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
631 	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
632 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-schneider-sct101ctm.fw"),
633 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
634 	PROPERTY_ENTRY_BOOL("silead,home-button"),
635 	{ }
636 };
637 
638 static const struct ts_dmi_data schneider_sct101ctm_data = {
639 	.acpi_name	= "MSSL1680:00",
640 	.properties	= schneider_sct101ctm_props,
641 };
642 
643 static const struct property_entry techbite_arc_11_6_props[] = {
644 	PROPERTY_ENTRY_U32("touchscreen-min-x", 5),
645 	PROPERTY_ENTRY_U32("touchscreen-min-y", 7),
646 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1981),
647 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1270),
648 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
649 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-techbite-arc-11-6.fw"),
650 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
651 	{ }
652 };
653 
654 static const struct ts_dmi_data techbite_arc_11_6_data = {
655 	.acpi_name	= "MSSL1680:00",
656 	.properties	= techbite_arc_11_6_props,
657 };
658 
659 static const struct property_entry teclast_x3_plus_props[] = {
660 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
661 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
662 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"),
663 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
664 	PROPERTY_ENTRY_BOOL("silead,home-button"),
665 	{ }
666 };
667 
668 static const struct ts_dmi_data teclast_x3_plus_data = {
669 	.acpi_name	= "MSSL1680:00",
670 	.properties	= teclast_x3_plus_props,
671 };
672 
673 static const struct property_entry teclast_x98plus2_props[] = {
674 	PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
675 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
676 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
677 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
678 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-teclast_x98plus2.fw"),
679 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
680 	{ }
681 };
682 
683 static const struct ts_dmi_data teclast_x98plus2_data = {
684 	.acpi_name	= "MSSL1680:00",
685 	.properties	= teclast_x98plus2_props,
686 };
687 
688 static const struct property_entry trekstor_primebook_c11_props[] = {
689 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1970),
690 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1530),
691 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
692 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c11.fw"),
693 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
694 	PROPERTY_ENTRY_BOOL("silead,home-button"),
695 	{ }
696 };
697 
698 static const struct ts_dmi_data trekstor_primebook_c11_data = {
699 	.acpi_name	= "MSSL1680:00",
700 	.properties	= trekstor_primebook_c11_props,
701 };
702 
703 static const struct property_entry trekstor_primebook_c13_props[] = {
704 	PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
705 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
706 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c13.fw"),
707 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
708 	PROPERTY_ENTRY_BOOL("silead,home-button"),
709 	{ }
710 };
711 
712 static const struct ts_dmi_data trekstor_primebook_c13_data = {
713 	.acpi_name	= "MSSL1680:00",
714 	.properties	= trekstor_primebook_c13_props,
715 };
716 
717 static const struct property_entry trekstor_primetab_t13b_props[] = {
718 	PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
719 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
720 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primetab-t13b.fw"),
721 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
722 	PROPERTY_ENTRY_BOOL("silead,home-button"),
723 	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
724 	{ }
725 };
726 
727 static const struct ts_dmi_data trekstor_primetab_t13b_data = {
728 	.acpi_name  = "MSSL1680:00",
729 	.properties = trekstor_primetab_t13b_props,
730 };
731 
732 static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
733 	PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
734 	PROPERTY_ENTRY_U32("touchscreen-min-y", 0),
735 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1890),
736 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
737 	PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
738 	PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-surftab-twin-10-1-st10432-8.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_surftab_twin_10_1_data = {
745 	.acpi_name	= "MSSL1680:00",
746 	.properties	= trekstor_surftab_twin_10_1_props,
747 };
748 
749 static const struct property_entry trekstor_surftab_wintron70_props[] = {
750 	PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
751 	PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
752 	PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
753 	PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
754 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-surftab-wintron70-st70416-6.fw"),
755 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
756 	PROPERTY_ENTRY_BOOL("silead,home-button"),
757 	{ }
758 };
759 
760 static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
761 	.acpi_name	= "MSSL1680:00",
762 	.properties	= trekstor_surftab_wintron70_props,
763 };
764 
765 static const struct property_entry vinga_twizzle_j116_props[] = {
766 	PROPERTY_ENTRY_U32("touchscreen-size-x", 1920),
767 	PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
768 	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-vinga-twizzle_j116.fw"),
769 	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
770 	PROPERTY_ENTRY_BOOL("silead,home-button"),
771 	{ }
772 };
773 
774 static const struct ts_dmi_data vinga_twizzle_j116_data = {
775 	.acpi_name	= "MSSL1680:00",
776 	.properties	= vinga_twizzle_j116_props,
777 };
778 
779 /* NOTE: Please keep this table sorted alphabetically */
780 const struct dmi_system_id touchscreen_dmi_table[] = {
781 	{
782 		/* Chuwi Hi8 */
783 		.driver_data = (void *)&chuwi_hi8_data,
784 		.matches = {
785 			DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
786 			DMI_MATCH(DMI_PRODUCT_NAME, "S806"),
787 		},
788 	},
789 	{
790 		/* Chuwi Hi8 (H1D_S806_206) */
791 		.driver_data = (void *)&chuwi_hi8_data,
792 		.matches = {
793 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
794 			DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
795 			DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"),
796 		},
797 	},
798 	{
799 		/* Chuwi Hi8 Air (CWI543) */
800 		.driver_data = (void *)&chuwi_hi8_air_data,
801 		.matches = {
802 			DMI_MATCH(DMI_BOARD_VENDOR, "Default string"),
803 			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
804 			DMI_MATCH(DMI_PRODUCT_NAME, "Hi8 Air"),
805 		},
806 	},
807 	{
808 		/* Chuwi Hi8 Pro (CWI513) */
809 		.driver_data = (void *)&chuwi_hi8_pro_data,
810 		.matches = {
811 			DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
812 			DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
813 		},
814 	},
815 	{
816 		/* Chuwi Hi10 Air */
817 		.driver_data = (void *)&chuwi_hi10_air_data,
818 		.matches = {
819 			DMI_MATCH(DMI_SYS_VENDOR, "CHUWI INNOVATION AND TECHNOLOGY(SHENZHEN)CO.LTD"),
820 			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
821 			DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"),
822 		},
823 	},
824 	{
825 		/* Chuwi Hi10 Plus (CWI527) */
826 		.driver_data = (void *)&chuwi_hi10_plus_data,
827 		.matches = {
828 			DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
829 			DMI_MATCH(DMI_PRODUCT_NAME, "Hi10 plus tablet"),
830 			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
831 		},
832 	},
833 	{
834 		/* Chuwi Vi8 (CWI506) */
835 		.driver_data = (void *)&chuwi_vi8_data,
836 		.matches = {
837 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
838 			DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
839 			DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
840 		},
841 	},
842 	{
843 		/* Chuwi Vi8 Plus (CWI519) */
844 		.driver_data = (void *)&chuwi_vi8_plus_data,
845 		.matches = {
846 			DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
847 			DMI_MATCH(DMI_PRODUCT_NAME, "D2D3_Vi8A1"),
848 			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
849 		},
850 	},
851 	{
852 		/* Chuwi Vi10 (CWI505) */
853 		.driver_data = (void *)&chuwi_vi10_data,
854 		.matches = {
855 			DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
856 			DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"),
857 			DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
858 			DMI_MATCH(DMI_PRODUCT_NAME, "S165"),
859 		},
860 	},
861 	{
862 		/* Chuwi Surbook Mini (CWI540) */
863 		.driver_data = (void *)&chuwi_surbook_mini_data,
864 		.matches = {
865 			DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
866 			DMI_MATCH(DMI_PRODUCT_NAME, "C3W6_AP108_4G"),
867 		},
868 	},
869 	{
870 		/* Connect Tablet 9 */
871 		.driver_data = (void *)&connect_tablet9_data,
872 		.matches = {
873 			DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
874 			DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
875 		},
876 	},
877 	{
878 		/* CUBE iwork8 Air */
879 		.driver_data = (void *)&cube_iwork8_air_data,
880 		.matches = {
881 			DMI_MATCH(DMI_SYS_VENDOR, "cube"),
882 			DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"),
883 			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
884 		},
885 	},
886 	{
887 		/* Cube KNote i1101 */
888 		.driver_data = (void *)&cube_knote_i1101_data,
889 		.matches = {
890 			DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
891 			DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"),
892 			DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"),
893 			DMI_MATCH(DMI_PRODUCT_NAME, "i1101"),
894 		},
895 	},
896 	{
897 		/* DEXP Ursus 7W */
898 		.driver_data = (void *)&dexp_ursus_7w_data,
899 		.matches = {
900 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
901 			DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
902 		},
903 	},
904 	{
905 		/* Digma Citi E200 */
906 		.driver_data = (void *)&digma_citi_e200_data,
907 		.matches = {
908 			DMI_MATCH(DMI_SYS_VENDOR, "Digma"),
909 			DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"),
910 			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
911 		},
912 	},
913 	{
914 		/* GP-electronic T701 */
915 		.driver_data = (void *)&gp_electronic_t701_data,
916 		.matches = {
917 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
918 			DMI_MATCH(DMI_PRODUCT_NAME, "T701"),
919 			DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"),
920 		},
921 	},
922 	{
923 		/* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
924 		.driver_data = (void *)&trekstor_surftab_wintron70_data,
925 		.matches = {
926 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
927 			DMI_MATCH(DMI_PRODUCT_NAME, "i71c"),
928 			DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"),
929 		},
930 	},
931 	{
932 		/* Irbis TW90 */
933 		.driver_data = (void *)&irbis_tw90_data,
934 		.matches = {
935 			DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"),
936 			DMI_MATCH(DMI_PRODUCT_NAME, "TW90"),
937 		},
938 	},
939 	{
940 		/* I.T.Works TW891 */
941 		.driver_data = (void *)&itworks_tw891_data,
942 		.matches = {
943 			DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
944 			DMI_MATCH(DMI_PRODUCT_NAME, "TW891"),
945 		},
946 	},
947 	{
948 		/* Jumper EZpad 6 Pro */
949 		.driver_data = (void *)&jumper_ezpad_6_pro_data,
950 		.matches = {
951 			DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
952 			DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
953 			DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
954 			/* Above matches are too generic, add bios-date match */
955 			DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"),
956 		},
957 	},
958 	{
959 		/* Jumper EZpad 6 Pro B */
960 		.driver_data = (void *)&jumper_ezpad_6_pro_b_data,
961 		.matches = {
962 			DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
963 			DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
964 			DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
965 			/* Above matches are too generic, add bios-date match */
966 			DMI_MATCH(DMI_BIOS_DATE, "04/24/2018"),
967 		},
968 	},
969 	{
970 		/* Jumper EZpad 6 m4 */
971 		.driver_data = (void *)&jumper_ezpad_6_m4_data,
972 		.matches = {
973 			DMI_MATCH(DMI_SYS_VENDOR, "jumper"),
974 			DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
975 			/* Jumper8.S106x.A00C.1066 with the version dropped */
976 			DMI_MATCH(DMI_BIOS_VERSION, "Jumper8.S106x"),
977 		},
978 	},
979 	{
980 		/* Jumper EZpad mini3 */
981 		.driver_data = (void *)&jumper_ezpad_mini3_data,
982 		.matches = {
983 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
984 			/* jumperx.T87.KFBNEEA02 with the version-nr dropped */
985 			DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
986 		},
987 	},
988 	{
989 		/* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */
990 		.driver_data = (void *)&trekstor_primebook_c11_data,
991 		.matches = {
992 			DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"),
993 			DMI_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"),
994 		},
995 	},
996 	{
997 		/* MP Man Converter 9 */
998 		.driver_data = (void *)&mpman_converter9_data,
999 		.matches = {
1000 			DMI_MATCH(DMI_SYS_VENDOR, "MPMAN"),
1001 			DMI_MATCH(DMI_PRODUCT_NAME, "Converter9"),
1002 		},
1003 	},
1004 	{
1005 		/* MP Man MPWIN895CL */
1006 		.driver_data = (void *)&mpman_mpwin895cl_data,
1007 		.matches = {
1008 			DMI_MATCH(DMI_SYS_VENDOR, "MPMAN"),
1009 			DMI_MATCH(DMI_PRODUCT_NAME, "MPWIN8900CL"),
1010 		},
1011 	},
1012 	{
1013 		/* Myria MY8307 */
1014 		.driver_data = (void *)&myria_my8307_data,
1015 		.matches = {
1016 			DMI_MATCH(DMI_SYS_VENDOR, "Complet Electro Serv"),
1017 			DMI_MATCH(DMI_PRODUCT_NAME, "MY8307"),
1018 		},
1019 	},
1020 	{
1021 		/* Onda oBook 20 Plus */
1022 		.driver_data = (void *)&onda_obook_20_plus_data,
1023 		.matches = {
1024 			DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
1025 			DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
1026 		},
1027 	},
1028 	{
1029 		/* ONDA V80 plus v3 (P80PSBG9V3A01501) */
1030 		.driver_data = (void *)&onda_v80_plus_v3_data,
1031 		.matches = {
1032 			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONDA"),
1033 			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V80 PLUS")
1034 		},
1035 	},
1036 	{
1037 		/* ONDA V820w DualOS */
1038 		.driver_data = (void *)&onda_v820w_32g_data,
1039 		.matches = {
1040 			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
1041 			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS")
1042 		},
1043 	},
1044 	{
1045 		/* ONDA V891 v5 */
1046 		.driver_data = (void *)&onda_v891_v5_data,
1047 		.matches = {
1048 			DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
1049 			DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
1050 			DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D869CJABNRBA06"),
1051 		},
1052 	},
1053 	{
1054 		/* ONDA V891w revision P891WBEBV1B00 aka v1 */
1055 		.driver_data = (void *)&onda_v891w_v1_data,
1056 		.matches = {
1057 			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
1058 			DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"),
1059 			DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"),
1060 			/* Exact match, different versions need different fw */
1061 			DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
1062 		},
1063 	},
1064 	{
1065 		/* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
1066 		.driver_data = (void *)&onda_v891w_v3_data,
1067 		.matches = {
1068 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1069 			DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
1070 			DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
1071 		},
1072 	},
1073 	{
1074 		/* Pipo W2S */
1075 		.driver_data = (void *)&pipo_w2s_data,
1076 		.matches = {
1077 			DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
1078 			DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
1079 		},
1080 	},
1081 	{
1082 		/* Pipo W11 */
1083 		.driver_data = (void *)&pipo_w11_data,
1084 		.matches = {
1085 			DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
1086 			DMI_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."),
1087 			/* Above matches are too generic, add bios-ver match */
1088 			DMI_MATCH(DMI_BIOS_VERSION, "JS-BI-10.6-SF133GR300-GA55B-024-F"),
1089 		},
1090 	},
1091 	{
1092 		/* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
1093 		.driver_data = (void *)&trekstor_surftab_wintron70_data,
1094 		.matches = {
1095 			DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"),
1096 			DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"),
1097 			/* Exact match, different versions need different fw */
1098 			DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"),
1099 		},
1100 	},
1101 	{
1102 		/* Point of View mobii wintab p800w (v2.0) */
1103 		.driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
1104 		.matches = {
1105 			DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
1106 			DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
1107 			DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"),
1108 			/* Above matches are too generic, add bios-date match */
1109 			DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
1110 		},
1111 	},
1112 	{
1113 		/* Point of View mobii wintab p800w (v2.1) */
1114 		.driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
1115 		.matches = {
1116 			DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
1117 			DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
1118 			DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"),
1119 			/* Above matches are too generic, add bios-date match */
1120 			DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"),
1121 		},
1122 	},
1123 	{
1124 		/* Point of View mobii wintab p1006w (v1.0) */
1125 		.driver_data = (void *)&pov_mobii_wintab_p1006w_v10_data,
1126 		.matches = {
1127 			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
1128 			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
1129 			/* Note 105b is Foxcon's USB/PCI vendor id */
1130 			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"),
1131 			DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
1132 		},
1133 	},
1134 	{
1135 		/* Schneider SCT101CTM */
1136 		.driver_data = (void *)&schneider_sct101ctm_data,
1137 		.matches = {
1138 			DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
1139 			DMI_MATCH(DMI_PRODUCT_NAME, "SCT101CTM"),
1140 		},
1141 	},
1142 	{
1143 		/* Techbite Arc 11.6 */
1144 		.driver_data = (void *)&techbite_arc_11_6_data,
1145 		.matches = {
1146 			DMI_MATCH(DMI_SYS_VENDOR, "mPTech"),
1147 			DMI_MATCH(DMI_PRODUCT_NAME, "techBite Arc 11.6"),
1148 			DMI_MATCH(DMI_BOARD_NAME, "G8316_272B"),
1149 		},
1150 	},
1151 	{
1152 		/* Teclast X3 Plus */
1153 		.driver_data = (void *)&teclast_x3_plus_data,
1154 		.matches = {
1155 			DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
1156 			DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
1157 			DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
1158 		},
1159 	},
1160 	{
1161 		/* Teclast X98 Plus II */
1162 		.driver_data = (void *)&teclast_x98plus2_data,
1163 		.matches = {
1164 			DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
1165 			DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
1166 		},
1167 	},
1168 	{
1169 		/* Trekstor Primebook C11 */
1170 		.driver_data = (void *)&trekstor_primebook_c11_data,
1171 		.matches = {
1172 			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1173 			DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"),
1174 		},
1175 	},
1176 	{
1177 		/* Trekstor Primebook C11B (same touchscreen as the C11) */
1178 		.driver_data = (void *)&trekstor_primebook_c11_data,
1179 		.matches = {
1180 			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1181 			DMI_MATCH(DMI_PRODUCT_NAME, "PRIMEBOOK C11B"),
1182 		},
1183 	},
1184 	{
1185 		/* Trekstor Primebook C13 */
1186 		.driver_data = (void *)&trekstor_primebook_c13_data,
1187 		.matches = {
1188 			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1189 			DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
1190 		},
1191 	},
1192 	{
1193 		/* Trekstor Primetab T13B */
1194 		.driver_data = (void *)&trekstor_primetab_t13b_data,
1195 		.matches = {
1196 			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1197 			DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"),
1198 		},
1199 	},
1200 	{
1201 		/* TrekStor SurfTab twin 10.1 ST10432-8 */
1202 		.driver_data = (void *)&trekstor_surftab_twin_10_1_data,
1203 		.matches = {
1204 			DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1205 			DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
1206 		},
1207 	},
1208 	{
1209 		/* Trekstor Surftab Wintron 7.0 ST70416-6 */
1210 		.driver_data = (void *)&trekstor_surftab_wintron70_data,
1211 		.matches = {
1212 			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1213 			DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"),
1214 			/* Exact match, different versions need different fw */
1215 			DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"),
1216 		},
1217 	},
1218 	{
1219 		/* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
1220 		.driver_data = (void *)&trekstor_surftab_wintron70_data,
1221 		.matches = {
1222 			DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1223 			DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab wintron 7.0 ST70416-6"),
1224 			/* Exact match, different versions need different fw */
1225 			DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
1226 		},
1227 	},
1228 	{
1229 		/* Trekstor Yourbook C11B (same touchscreen as the Primebook C11) */
1230 		.driver_data = (void *)&trekstor_primebook_c11_data,
1231 		.matches = {
1232 			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1233 			DMI_MATCH(DMI_PRODUCT_NAME, "YOURBOOK C11B"),
1234 		},
1235 	},
1236 	{
1237 		/* Vinga Twizzle J116 */
1238 		.driver_data = (void *)&vinga_twizzle_j116_data,
1239 		.matches = {
1240 			DMI_MATCH(DMI_PRODUCT_NAME, "VINGA Twizzle J116"),
1241 		},
1242 	},
1243 	{
1244 		/* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
1245 		.driver_data = (void *)&chuwi_vi8_data,
1246 		.matches = {
1247 			DMI_MATCH(DMI_SYS_VENDOR, "YOURS"),
1248 			DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"),
1249 		},
1250 	},
1251 	{ }
1252 };
1253 
1254 static const struct ts_dmi_data *ts_data;
1255 
1256 static void ts_dmi_add_props(struct i2c_client *client)
1257 {
1258 	struct device *dev = &client->dev;
1259 	int error;
1260 
1261 	if (has_acpi_companion(dev) &&
1262 	    !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
1263 		error = device_add_properties(dev, ts_data->properties);
1264 		if (error)
1265 			dev_err(dev, "failed to add properties: %d\n", error);
1266 	}
1267 }
1268 
1269 static int ts_dmi_notifier_call(struct notifier_block *nb,
1270 				unsigned long action, void *data)
1271 {
1272 	struct device *dev = data;
1273 	struct i2c_client *client;
1274 
1275 	switch (action) {
1276 	case BUS_NOTIFY_ADD_DEVICE:
1277 		client = i2c_verify_client(dev);
1278 		if (client)
1279 			ts_dmi_add_props(client);
1280 		break;
1281 
1282 	default:
1283 		break;
1284 	}
1285 
1286 	return 0;
1287 }
1288 
1289 static struct notifier_block ts_dmi_notifier = {
1290 	.notifier_call = ts_dmi_notifier_call,
1291 };
1292 
1293 static int __init ts_dmi_init(void)
1294 {
1295 	const struct dmi_system_id *dmi_id;
1296 	int error;
1297 
1298 	dmi_id = dmi_first_match(touchscreen_dmi_table);
1299 	if (!dmi_id)
1300 		return 0; /* Not an error */
1301 
1302 	ts_data = dmi_id->driver_data;
1303 	/* Some dmi table entries only provide an efi_embedded_fw_desc */
1304 	if (!ts_data->properties)
1305 		return 0;
1306 
1307 	error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
1308 	if (error)
1309 		pr_err("%s: failed to register i2c bus notifier: %d\n",
1310 			__func__, error);
1311 
1312 	return error;
1313 }
1314 
1315 /*
1316  * We are registering out notifier after i2c core is initialized and i2c bus
1317  * itself is ready (which happens at postcore initcall level), but before
1318  * ACPI starts enumerating devices (at subsys initcall level).
1319  */
1320 arch_initcall(ts_dmi_init);
1321