platform/x86: touchscreen_dmi: Add info for the Chuwi HiBook (CWI514) tablet
[platform/kernel/linux-rpi.git] / drivers / platform / x86 / touchscreen_dmi.c
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_hi10_pro_props[] = {
119         PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
120         PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
121         PROPERTY_ENTRY_U32("touchscreen-size-x", 1912),
122         PROPERTY_ENTRY_U32("touchscreen-size-y", 1272),
123         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
124         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10-pro.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_hi10_pro_data = {
131         .embedded_fw = {
132                 .name   = "silead/gsl1680-chuwi-hi10-pro.fw",
133                 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
134                 .length = 42504,
135                 .sha256 = { 0xdb, 0x92, 0x68, 0xa8, 0xdb, 0x81, 0x31, 0x00,
136                             0x1f, 0x58, 0x89, 0xdb, 0x19, 0x1b, 0x15, 0x8c,
137                             0x05, 0x14, 0xf4, 0x95, 0xba, 0x15, 0x45, 0x98,
138                             0x42, 0xa3, 0xbb, 0x65, 0xe3, 0x30, 0xa5, 0x93 },
139         },
140         .acpi_name      = "MSSL1680:00",
141         .properties     = chuwi_hi10_pro_props,
142 };
143
144 static const struct property_entry chuwi_hibook_props[] = {
145         PROPERTY_ENTRY_U32("touchscreen-min-x", 30),
146         PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
147         PROPERTY_ENTRY_U32("touchscreen-size-x", 1892),
148         PROPERTY_ENTRY_U32("touchscreen-size-y", 1276),
149         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
150         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
151         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hibook.fw"),
152         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
153         PROPERTY_ENTRY_BOOL("silead,home-button"),
154         { }
155 };
156
157 static const struct ts_dmi_data chuwi_hibook_data = {
158         .embedded_fw = {
159                 .name   = "silead/gsl1680-chuwi-hibook.fw",
160                 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
161                 .length = 40392,
162                 .sha256 = { 0xf7, 0xc0, 0xe8, 0x5a, 0x6c, 0xf2, 0xeb, 0x8d,
163                             0x12, 0xc4, 0x45, 0xbf, 0x55, 0x13, 0x4c, 0x1a,
164                             0x13, 0x04, 0x31, 0x08, 0x65, 0x73, 0xf7, 0xa8,
165                             0x1b, 0x7d, 0x59, 0xc9, 0xe6, 0x97, 0xf7, 0x38 },
166         },
167         .acpi_name      = "MSSL0017:00",
168         .properties     = chuwi_hibook_props,
169 };
170
171 static const struct property_entry chuwi_vi8_props[] = {
172         PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
173         PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
174         PROPERTY_ENTRY_U32("touchscreen-size-x", 1724),
175         PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
176         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
177         PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-vi8.fw"),
178         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
179         PROPERTY_ENTRY_BOOL("silead,home-button"),
180         { }
181 };
182
183 static const struct ts_dmi_data chuwi_vi8_data = {
184         .acpi_name      = "MSSL1680:00",
185         .properties     = chuwi_vi8_props,
186 };
187
188 static const struct ts_dmi_data chuwi_vi8_plus_data = {
189         .embedded_fw = {
190                 .name   = "chipone/icn8505-HAMP0002.fw",
191                 .prefix = { 0xb0, 0x07, 0x00, 0x00, 0xe4, 0x07, 0x00, 0x00 },
192                 .length = 35012,
193                 .sha256 = { 0x93, 0xe5, 0x49, 0xe0, 0xb6, 0xa2, 0xb4, 0xb3,
194                             0x88, 0x96, 0x34, 0x97, 0x5e, 0xa8, 0x13, 0x78,
195                             0x72, 0x98, 0xb8, 0x29, 0xeb, 0x5c, 0xa7, 0xf1,
196                             0x25, 0x13, 0x43, 0xf4, 0x30, 0x7c, 0xfc, 0x7c },
197         },
198 };
199
200 static const struct property_entry chuwi_vi10_props[] = {
201         PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
202         PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
203         PROPERTY_ENTRY_U32("touchscreen-size-x", 1858),
204         PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
205         PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-vi10.fw"),
206         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
207         PROPERTY_ENTRY_BOOL("silead,home-button"),
208         { }
209 };
210
211 static const struct ts_dmi_data chuwi_vi10_data = {
212         .acpi_name      = "MSSL0002:00",
213         .properties     = chuwi_vi10_props,
214 };
215
216 static const struct property_entry chuwi_surbook_mini_props[] = {
217         PROPERTY_ENTRY_U32("touchscreen-min-x", 88),
218         PROPERTY_ENTRY_U32("touchscreen-min-y", 13),
219         PROPERTY_ENTRY_U32("touchscreen-size-x", 2040),
220         PROPERTY_ENTRY_U32("touchscreen-size-y", 1524),
221         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-surbook-mini.fw"),
222         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
223         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
224         { }
225 };
226
227 static const struct ts_dmi_data chuwi_surbook_mini_data = {
228         .acpi_name      = "MSSL1680:00",
229         .properties     = chuwi_surbook_mini_props,
230 };
231
232 static const struct property_entry connect_tablet9_props[] = {
233         PROPERTY_ENTRY_U32("touchscreen-min-x", 9),
234         PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
235         PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
236         PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
237         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
238         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
239         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-connect-tablet9.fw"),
240         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
241         { }
242 };
243
244 static const struct ts_dmi_data connect_tablet9_data = {
245         .acpi_name      = "MSSL1680:00",
246         .properties     = connect_tablet9_props,
247 };
248
249 static const struct property_entry cube_iwork8_air_props[] = {
250         PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
251         PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
252         PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
253         PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
254         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
255         PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-cube-iwork8-air.fw"),
256         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
257         { }
258 };
259
260 static const struct ts_dmi_data cube_iwork8_air_data = {
261         .embedded_fw = {
262                 .name   = "silead/gsl3670-cube-iwork8-air.fw",
263                 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
264                 .length = 38808,
265                 .sha256 = { 0xff, 0x62, 0x2d, 0xd1, 0x8a, 0x78, 0x04, 0x7b,
266                             0x33, 0x06, 0xb0, 0x4f, 0x7f, 0x02, 0x08, 0x9c,
267                             0x96, 0xd4, 0x9f, 0x04, 0xe1, 0x47, 0x25, 0x25,
268                             0x60, 0x77, 0x41, 0x33, 0xeb, 0x12, 0x82, 0xfc },
269         },
270         .acpi_name      = "MSSL1680:00",
271         .properties     = cube_iwork8_air_props,
272 };
273
274 static const struct property_entry cube_knote_i1101_props[] = {
275         PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
276         PROPERTY_ENTRY_U32("touchscreen-min-y",  22),
277         PROPERTY_ENTRY_U32("touchscreen-size-x", 1961),
278         PROPERTY_ENTRY_U32("touchscreen-size-y", 1513),
279         PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-cube-knote-i1101.fw"),
280         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
281         PROPERTY_ENTRY_BOOL("silead,home-button"),
282         { }
283 };
284
285 static const struct ts_dmi_data cube_knote_i1101_data = {
286         .acpi_name      = "MSSL1680:00",
287         .properties     = cube_knote_i1101_props,
288 };
289
290 static const struct property_entry dexp_ursus_7w_props[] = {
291         PROPERTY_ENTRY_U32("touchscreen-size-x", 890),
292         PROPERTY_ENTRY_U32("touchscreen-size-y", 630),
293         PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-dexp-ursus-7w.fw"),
294         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
295         PROPERTY_ENTRY_BOOL("silead,home-button"),
296         { }
297 };
298
299 static const struct ts_dmi_data dexp_ursus_7w_data = {
300         .acpi_name      = "MSSL1680:00",
301         .properties     = dexp_ursus_7w_props,
302 };
303
304 static const struct property_entry digma_citi_e200_props[] = {
305         PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
306         PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
307         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
308         PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-digma_citi_e200.fw"),
309         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
310         PROPERTY_ENTRY_BOOL("silead,home-button"),
311         { }
312 };
313
314 static const struct ts_dmi_data digma_citi_e200_data = {
315         .acpi_name      = "MSSL1680:00",
316         .properties     = digma_citi_e200_props,
317 };
318
319 static const struct property_entry estar_beauty_hd_props[] = {
320         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
321         { }
322 };
323
324 static const struct ts_dmi_data estar_beauty_hd_data = {
325         .acpi_name      = "GDIX1001:00",
326         .properties     = estar_beauty_hd_props,
327 };
328
329 /* Generic props + data for upside-down mounted GDIX1001 touchscreens */
330 static const struct property_entry gdix1001_upside_down_props[] = {
331         PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
332         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
333         { }
334 };
335
336 static const struct ts_dmi_data gdix1001_00_upside_down_data = {
337         .acpi_name      = "GDIX1001:00",
338         .properties     = gdix1001_upside_down_props,
339 };
340
341 static const struct ts_dmi_data gdix1001_01_upside_down_data = {
342         .acpi_name      = "GDIX1001:01",
343         .properties     = gdix1001_upside_down_props,
344 };
345
346 static const struct property_entry glavey_tm800a550l_props[] = {
347         PROPERTY_ENTRY_STRING("firmware-name", "gt912-glavey-tm800a550l.fw"),
348         PROPERTY_ENTRY_STRING("goodix,config-name", "gt912-glavey-tm800a550l.cfg"),
349         PROPERTY_ENTRY_U32("goodix,main-clk", 54),
350         { }
351 };
352
353 static const struct ts_dmi_data glavey_tm800a550l_data = {
354         .acpi_name      = "GDIX1001:00",
355         .properties     = glavey_tm800a550l_props,
356 };
357
358 static const struct property_entry gp_electronic_t701_props[] = {
359         PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
360         PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
361         PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
362         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
363         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-gp-electronic-t701.fw"),
364         { }
365 };
366
367 static const struct ts_dmi_data gp_electronic_t701_data = {
368         .acpi_name      = "MSSL1680:00",
369         .properties     = gp_electronic_t701_props,
370 };
371
372 static const struct property_entry irbis_tw90_props[] = {
373         PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
374         PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
375         PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
376         PROPERTY_ENTRY_U32("touchscreen-min-y", 14),
377         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
378         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
379         PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-irbis_tw90.fw"),
380         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
381         PROPERTY_ENTRY_BOOL("silead,home-button"),
382         { }
383 };
384
385 static const struct ts_dmi_data irbis_tw90_data = {
386         .acpi_name      = "MSSL1680:00",
387         .properties     = irbis_tw90_props,
388 };
389
390 static const struct property_entry irbis_tw118_props[] = {
391         PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
392         PROPERTY_ENTRY_U32("touchscreen-min-y", 30),
393         PROPERTY_ENTRY_U32("touchscreen-size-x", 1960),
394         PROPERTY_ENTRY_U32("touchscreen-size-y", 1510),
395         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-irbis-tw118.fw"),
396         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
397         { }
398 };
399
400 static const struct ts_dmi_data irbis_tw118_data = {
401         .acpi_name      = "MSSL1680:00",
402         .properties     = irbis_tw118_props,
403 };
404
405 static const struct property_entry itworks_tw891_props[] = {
406         PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
407         PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
408         PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
409         PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
410         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
411         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
412         PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
413         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
414         { }
415 };
416
417 static const struct ts_dmi_data itworks_tw891_data = {
418         .acpi_name      = "MSSL1680:00",
419         .properties     = itworks_tw891_props,
420 };
421
422 static const struct property_entry jumper_ezpad_6_pro_props[] = {
423         PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
424         PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
425         PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"),
426         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
427         PROPERTY_ENTRY_BOOL("silead,home-button"),
428         { }
429 };
430
431 static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
432         .acpi_name      = "MSSL1680:00",
433         .properties     = jumper_ezpad_6_pro_props,
434 };
435
436 static const struct property_entry jumper_ezpad_6_pro_b_props[] = {
437         PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
438         PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
439         PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro-b.fw"),
440         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
441         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
442         PROPERTY_ENTRY_BOOL("silead,home-button"),
443         { }
444 };
445
446 static const struct ts_dmi_data jumper_ezpad_6_pro_b_data = {
447         .acpi_name      = "MSSL1680:00",
448         .properties     = jumper_ezpad_6_pro_b_props,
449 };
450
451 static const struct property_entry jumper_ezpad_6_m4_props[] = {
452         PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
453         PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
454         PROPERTY_ENTRY_U32("touchscreen-size-x", 1950),
455         PROPERTY_ENTRY_U32("touchscreen-size-y", 1525),
456         PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-m4.fw"),
457         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
458         PROPERTY_ENTRY_BOOL("silead,home-button"),
459         { }
460 };
461
462 static const struct ts_dmi_data jumper_ezpad_6_m4_data = {
463         .acpi_name      = "MSSL1680:00",
464         .properties     = jumper_ezpad_6_m4_props,
465 };
466
467 static const struct property_entry jumper_ezpad_7_props[] = {
468         PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
469         PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
470         PROPERTY_ENTRY_U32("touchscreen-size-x", 2044),
471         PROPERTY_ENTRY_U32("touchscreen-size-y", 1526),
472         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
473         PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-jumper-ezpad-7.fw"),
474         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
475         PROPERTY_ENTRY_BOOL("silead,stuck-controller-bug"),
476         { }
477 };
478
479 static const struct ts_dmi_data jumper_ezpad_7_data = {
480         .acpi_name      = "MSSL1680:00",
481         .properties     = jumper_ezpad_7_props,
482 };
483
484 static const struct property_entry jumper_ezpad_mini3_props[] = {
485         PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
486         PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
487         PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
488         PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
489         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
490         PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
491         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
492         { }
493 };
494
495 static const struct ts_dmi_data jumper_ezpad_mini3_data = {
496         .acpi_name      = "MSSL1680:00",
497         .properties     = jumper_ezpad_mini3_props,
498 };
499
500 static const struct property_entry mpman_converter9_props[] = {
501         PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
502         PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
503         PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
504         PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
505         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
506         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
507         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-mpman-converter9.fw"),
508         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
509         { }
510 };
511
512 static const struct ts_dmi_data mpman_converter9_data = {
513         .acpi_name      = "MSSL1680:00",
514         .properties     = mpman_converter9_props,
515 };
516
517 static const struct property_entry mpman_mpwin895cl_props[] = {
518         PROPERTY_ENTRY_U32("touchscreen-min-x", 3),
519         PROPERTY_ENTRY_U32("touchscreen-min-y", 9),
520         PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
521         PROPERTY_ENTRY_U32("touchscreen-size-y", 1150),
522         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
523         PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-mpman-mpwin895cl.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 mpman_mpwin895cl_data = {
530         .acpi_name      = "MSSL1680:00",
531         .properties     = mpman_mpwin895cl_props,
532 };
533
534 static const struct property_entry myria_my8307_props[] = {
535         PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
536         PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
537         PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
538         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
539         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
540         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-myria-my8307.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 myria_my8307_data = {
547         .acpi_name      = "MSSL1680:00",
548         .properties     = myria_my8307_props,
549 };
550
551 static const struct property_entry onda_obook_20_plus_props[] = {
552         PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
553         PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
554         PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
555         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
556         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
557         PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
558         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
559         PROPERTY_ENTRY_BOOL("silead,home-button"),
560         { }
561 };
562
563 static const struct ts_dmi_data onda_obook_20_plus_data = {
564         .acpi_name      = "MSSL1680:00",
565         .properties     = onda_obook_20_plus_props,
566 };
567
568 static const struct property_entry onda_v80_plus_v3_props[] = {
569         PROPERTY_ENTRY_U32("touchscreen-min-x", 22),
570         PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
571         PROPERTY_ENTRY_U32("touchscreen-size-x", 1698),
572         PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
573         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
574         PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v80-plus-v3.fw"),
575         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
576         PROPERTY_ENTRY_BOOL("silead,home-button"),
577         { }
578 };
579
580 static const struct ts_dmi_data onda_v80_plus_v3_data = {
581         .embedded_fw = {
582                 .name   = "silead/gsl3676-onda-v80-plus-v3.fw",
583                 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
584                 .length = 37224,
585                 .sha256 = { 0x8f, 0xbd, 0x8f, 0x0c, 0x6b, 0xba, 0x5b, 0xf5,
586                             0xa3, 0xc7, 0xa3, 0xc0, 0x4f, 0xcd, 0xdf, 0x32,
587                             0xcc, 0xe4, 0x70, 0xd6, 0x46, 0x9c, 0xd7, 0xa7,
588                             0x4b, 0x82, 0x3f, 0xab, 0xc7, 0x90, 0xea, 0x23 },
589         },
590         .acpi_name      = "MSSL1680:00",
591         .properties     = onda_v80_plus_v3_props,
592 };
593
594 static const struct property_entry onda_v820w_32g_props[] = {
595         PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
596         PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
597         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
598         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-onda-v820w-32g.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 onda_v820w_32g_data = {
605         .acpi_name      = "MSSL1680:00",
606         .properties     = onda_v820w_32g_props,
607 };
608
609 static const struct property_entry onda_v891_v5_props[] = {
610         PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
611         PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
612         PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
613         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
614         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
615         PROPERTY_ENTRY_STRING("firmware-name",
616                               "gsl3676-onda-v891-v5.fw"),
617         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
618         PROPERTY_ENTRY_BOOL("silead,home-button"),
619         { }
620 };
621
622 static const struct ts_dmi_data onda_v891_v5_data = {
623         .acpi_name      = "MSSL1680:00",
624         .properties     = onda_v891_v5_props,
625 };
626
627 static const struct property_entry onda_v891w_v1_props[] = {
628         PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
629         PROPERTY_ENTRY_U32("touchscreen-min-y",  8),
630         PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
631         PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
632         PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-onda-v891w-v1.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 onda_v891w_v1_data = {
639         .acpi_name      = "MSSL1680:00",
640         .properties     = onda_v891w_v1_props,
641 };
642
643 static const struct property_entry onda_v891w_v3_props[] = {
644         PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
645         PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
646         PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
647         PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
648         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
649         PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v891w-v3.fw"),
650         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
651         PROPERTY_ENTRY_BOOL("silead,home-button"),
652         { }
653 };
654
655 static const struct ts_dmi_data onda_v891w_v3_data = {
656         .acpi_name      = "MSSL1680:00",
657         .properties     = onda_v891w_v3_props,
658 };
659
660 static const struct property_entry pipo_w2s_props[] = {
661         PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
662         PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
663         PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
664         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
665         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w2s.fw"),
666         { }
667 };
668
669 static const struct ts_dmi_data pipo_w2s_data = {
670         .embedded_fw = {
671                 .name   = "silead/gsl1680-pipo-w2s.fw",
672                 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
673                 .length = 39072,
674                 .sha256 = { 0xd0, 0x58, 0xc4, 0x7d, 0x55, 0x2d, 0x62, 0x18,
675                             0xd1, 0x6a, 0x71, 0x73, 0x0b, 0x3f, 0xbe, 0x60,
676                             0xbb, 0x45, 0x8c, 0x52, 0x27, 0xb7, 0x18, 0xf4,
677                             0x31, 0x00, 0x6a, 0x49, 0x76, 0xd8, 0x7c, 0xd3 },
678         },
679         .acpi_name      = "MSSL1680:00",
680         .properties     = pipo_w2s_props,
681 };
682
683 static const struct property_entry pipo_w11_props[] = {
684         PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
685         PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
686         PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
687         PROPERTY_ENTRY_U32("touchscreen-size-y", 1532),
688         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w11.fw"),
689         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
690         PROPERTY_ENTRY_BOOL("silead,home-button"),
691         { }
692 };
693
694 static const struct ts_dmi_data pipo_w11_data = {
695         .acpi_name      = "MSSL1680:00",
696         .properties     = pipo_w11_props,
697 };
698
699 static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
700         PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
701         PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
702         PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
703         PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
704         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
705         PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
706         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
707         PROPERTY_ENTRY_BOOL("silead,home-button"),
708         { }
709 };
710
711 static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
712         .acpi_name      = "MSSL1680:00",
713         .properties     = pov_mobii_wintab_p800w_v20_props,
714 };
715
716 static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
717         PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
718         PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
719         PROPERTY_ENTRY_U32("touchscreen-size-x", 1794),
720         PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
721         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
722         PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p800w.fw"),
723         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
724         PROPERTY_ENTRY_BOOL("silead,home-button"),
725         { }
726 };
727
728 static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
729         .acpi_name      = "MSSL1680:00",
730         .properties     = pov_mobii_wintab_p800w_v21_props,
731 };
732
733 static const struct property_entry pov_mobii_wintab_p1006w_v10_props[] = {
734         PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
735         PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
736         PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
737         PROPERTY_ENTRY_U32("touchscreen-size-y", 1520),
738         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
739         PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p1006w-v10.fw"),
740         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
741         PROPERTY_ENTRY_BOOL("silead,home-button"),
742         { }
743 };
744
745 static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = {
746         .acpi_name      = "MSSL1680:00",
747         .properties     = pov_mobii_wintab_p1006w_v10_props,
748 };
749
750 static const struct property_entry predia_basic_props[] = {
751         PROPERTY_ENTRY_U32("touchscreen-min-x", 3),
752         PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
753         PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
754         PROPERTY_ENTRY_U32("touchscreen-size-y", 1144),
755         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
756         PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-predia-basic.fw"),
757         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
758         PROPERTY_ENTRY_BOOL("silead,home-button"),
759         { }
760 };
761
762 static const struct ts_dmi_data predia_basic_data = {
763         .acpi_name      = "MSSL1680:00",
764         .properties     = predia_basic_props,
765 };
766
767 static const struct property_entry schneider_sct101ctm_props[] = {
768         PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
769         PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
770         PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
771         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
772         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
773         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-schneider-sct101ctm.fw"),
774         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
775         PROPERTY_ENTRY_BOOL("silead,home-button"),
776         { }
777 };
778
779 static const struct ts_dmi_data schneider_sct101ctm_data = {
780         .acpi_name      = "MSSL1680:00",
781         .properties     = schneider_sct101ctm_props,
782 };
783
784 static const struct property_entry techbite_arc_11_6_props[] = {
785         PROPERTY_ENTRY_U32("touchscreen-min-x", 5),
786         PROPERTY_ENTRY_U32("touchscreen-min-y", 7),
787         PROPERTY_ENTRY_U32("touchscreen-size-x", 1981),
788         PROPERTY_ENTRY_U32("touchscreen-size-y", 1270),
789         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
790         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-techbite-arc-11-6.fw"),
791         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
792         { }
793 };
794
795 static const struct ts_dmi_data techbite_arc_11_6_data = {
796         .acpi_name      = "MSSL1680:00",
797         .properties     = techbite_arc_11_6_props,
798 };
799
800 static const struct property_entry teclast_tbook11_props[] = {
801         PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
802         PROPERTY_ENTRY_U32("touchscreen-min-y", 14),
803         PROPERTY_ENTRY_U32("touchscreen-size-x", 1916),
804         PROPERTY_ENTRY_U32("touchscreen-size-y", 1264),
805         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
806         PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-teclast-tbook11.fw"),
807         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
808         PROPERTY_ENTRY_BOOL("silead,home-button"),
809         { }
810 };
811
812 static const struct ts_dmi_data teclast_tbook11_data = {
813         .embedded_fw = {
814                 .name   = "silead/gsl3692-teclast-tbook11.fw",
815                 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
816                 .length = 43560,
817                 .sha256 = { 0x9d, 0xb0, 0x3d, 0xf1, 0x00, 0x3c, 0xb5, 0x25,
818                             0x62, 0x8a, 0xa0, 0x93, 0x4b, 0xe0, 0x4e, 0x75,
819                             0xd1, 0x27, 0xb1, 0x65, 0x3c, 0xba, 0xa5, 0x0f,
820                             0xcd, 0xb4, 0xbe, 0x00, 0xbb, 0xf6, 0x43, 0x29 },
821         },
822         .acpi_name      = "MSSL1680:00",
823         .properties     = teclast_tbook11_props,
824 };
825
826 static const struct property_entry teclast_x3_plus_props[] = {
827         PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
828         PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
829         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"),
830         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
831         PROPERTY_ENTRY_BOOL("silead,home-button"),
832         { }
833 };
834
835 static const struct ts_dmi_data teclast_x3_plus_data = {
836         .acpi_name      = "MSSL1680:00",
837         .properties     = teclast_x3_plus_props,
838 };
839
840 static const struct property_entry teclast_x98plus2_props[] = {
841         PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
842         PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
843         PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
844         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
845         PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-teclast_x98plus2.fw"),
846         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
847         { }
848 };
849
850 static const struct ts_dmi_data teclast_x98plus2_data = {
851         .acpi_name      = "MSSL1680:00",
852         .properties     = teclast_x98plus2_props,
853 };
854
855 static const struct property_entry trekstor_primebook_c11_props[] = {
856         PROPERTY_ENTRY_U32("touchscreen-size-x", 1970),
857         PROPERTY_ENTRY_U32("touchscreen-size-y", 1530),
858         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
859         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c11.fw"),
860         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
861         PROPERTY_ENTRY_BOOL("silead,home-button"),
862         { }
863 };
864
865 static const struct ts_dmi_data trekstor_primebook_c11_data = {
866         .acpi_name      = "MSSL1680:00",
867         .properties     = trekstor_primebook_c11_props,
868 };
869
870 static const struct property_entry trekstor_primebook_c13_props[] = {
871         PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
872         PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
873         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c13.fw"),
874         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
875         PROPERTY_ENTRY_BOOL("silead,home-button"),
876         { }
877 };
878
879 static const struct ts_dmi_data trekstor_primebook_c13_data = {
880         .acpi_name      = "MSSL1680:00",
881         .properties     = trekstor_primebook_c13_props,
882 };
883
884 static const struct property_entry trekstor_primetab_t13b_props[] = {
885         PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
886         PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
887         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primetab-t13b.fw"),
888         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
889         PROPERTY_ENTRY_BOOL("silead,home-button"),
890         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
891         { }
892 };
893
894 static const struct ts_dmi_data trekstor_primetab_t13b_data = {
895         .acpi_name  = "MSSL1680:00",
896         .properties = trekstor_primetab_t13b_props,
897 };
898
899 static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
900         PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
901         PROPERTY_ENTRY_U32("touchscreen-min-y", 0),
902         PROPERTY_ENTRY_U32("touchscreen-size-x", 1890),
903         PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
904         PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
905         PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-surftab-twin-10-1-st10432-8.fw"),
906         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
907         PROPERTY_ENTRY_BOOL("silead,home-button"),
908         { }
909 };
910
911 static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
912         .acpi_name      = "MSSL1680:00",
913         .properties     = trekstor_surftab_twin_10_1_props,
914 };
915
916 static const struct property_entry trekstor_surftab_wintron70_props[] = {
917         PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
918         PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
919         PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
920         PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
921         PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-surftab-wintron70-st70416-6.fw"),
922         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
923         PROPERTY_ENTRY_BOOL("silead,home-button"),
924         { }
925 };
926
927 static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
928         .acpi_name      = "MSSL1680:00",
929         .properties     = trekstor_surftab_wintron70_props,
930 };
931
932 static const struct property_entry vinga_twizzle_j116_props[] = {
933         PROPERTY_ENTRY_U32("touchscreen-size-x", 1920),
934         PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
935         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-vinga-twizzle_j116.fw"),
936         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
937         PROPERTY_ENTRY_BOOL("silead,home-button"),
938         { }
939 };
940
941 static const struct ts_dmi_data vinga_twizzle_j116_data = {
942         .acpi_name      = "MSSL1680:00",
943         .properties     = vinga_twizzle_j116_props,
944 };
945
946 /* NOTE: Please keep this table sorted alphabetically */
947 const struct dmi_system_id touchscreen_dmi_table[] = {
948         {
949                 /* Chuwi Hi8 */
950                 .driver_data = (void *)&chuwi_hi8_data,
951                 .matches = {
952                         DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
953                         DMI_MATCH(DMI_PRODUCT_NAME, "S806"),
954                 },
955         },
956         {
957                 /* Chuwi Hi8 (H1D_S806_206) */
958                 .driver_data = (void *)&chuwi_hi8_data,
959                 .matches = {
960                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
961                         DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
962                         DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"),
963                 },
964         },
965         {
966                 /* Chuwi Hi8 Air (CWI543) */
967                 .driver_data = (void *)&chuwi_hi8_air_data,
968                 .matches = {
969                         DMI_MATCH(DMI_BOARD_VENDOR, "Default string"),
970                         DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
971                         DMI_MATCH(DMI_PRODUCT_NAME, "Hi8 Air"),
972                 },
973         },
974         {
975                 /* Chuwi Hi8 Pro (CWI513) */
976                 .driver_data = (void *)&chuwi_hi8_pro_data,
977                 .matches = {
978                         DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
979                         DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
980                 },
981         },
982         {
983                 /* Chuwi Hi10 Air */
984                 .driver_data = (void *)&chuwi_hi10_air_data,
985                 .matches = {
986                         DMI_MATCH(DMI_SYS_VENDOR, "CHUWI INNOVATION AND TECHNOLOGY(SHENZHEN)CO.LTD"),
987                         DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
988                         DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"),
989                 },
990         },
991         {
992                 /* Chuwi Hi10 Plus (CWI527) */
993                 .driver_data = (void *)&chuwi_hi10_plus_data,
994                 .matches = {
995                         DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
996                         DMI_MATCH(DMI_PRODUCT_NAME, "Hi10 plus tablet"),
997                         DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
998                 },
999         },
1000         {
1001                 /* Chuwi Hi10 Pro (CWI529) */
1002                 .driver_data = (void *)&chuwi_hi10_pro_data,
1003                 .matches = {
1004                         DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
1005                         DMI_MATCH(DMI_PRODUCT_NAME, "Hi10 pro tablet"),
1006                         DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
1007                 },
1008         },
1009         {
1010                 /* Chuwi HiBook (CWI514) */
1011                 .driver_data = (void *)&chuwi_hibook_data,
1012                 .matches = {
1013                         DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
1014                         DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
1015                         /* Above matches are too generic, add bios-date match */
1016                         DMI_MATCH(DMI_BIOS_DATE, "05/07/2016"),
1017                 },
1018         },
1019         {
1020                 /* Chuwi Vi8 (CWI506) */
1021                 .driver_data = (void *)&chuwi_vi8_data,
1022                 .matches = {
1023                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1024                         DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
1025                         DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
1026                 },
1027         },
1028         {
1029                 /* Chuwi Vi8 Plus (CWI519) */
1030                 .driver_data = (void *)&chuwi_vi8_plus_data,
1031                 .matches = {
1032                         DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
1033                         DMI_MATCH(DMI_PRODUCT_NAME, "D2D3_Vi8A1"),
1034                         DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
1035                 },
1036         },
1037         {
1038                 /* Chuwi Vi10 (CWI505) */
1039                 .driver_data = (void *)&chuwi_vi10_data,
1040                 .matches = {
1041                         DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
1042                         DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"),
1043                         DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
1044                         DMI_MATCH(DMI_PRODUCT_NAME, "S165"),
1045                 },
1046         },
1047         {
1048                 /* Chuwi Surbook Mini (CWI540) */
1049                 .driver_data = (void *)&chuwi_surbook_mini_data,
1050                 .matches = {
1051                         DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
1052                         DMI_MATCH(DMI_PRODUCT_NAME, "C3W6_AP108_4G"),
1053                 },
1054         },
1055         {
1056                 /* Connect Tablet 9 */
1057                 .driver_data = (void *)&connect_tablet9_data,
1058                 .matches = {
1059                         DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
1060                         DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
1061                 },
1062         },
1063         {
1064                 /* CUBE iwork8 Air */
1065                 .driver_data = (void *)&cube_iwork8_air_data,
1066                 .matches = {
1067                         DMI_MATCH(DMI_SYS_VENDOR, "cube"),
1068                         DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"),
1069                         DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
1070                 },
1071         },
1072         {
1073                 /* Cube KNote i1101 */
1074                 .driver_data = (void *)&cube_knote_i1101_data,
1075                 .matches = {
1076                         DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
1077                         DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"),
1078                         DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"),
1079                         DMI_MATCH(DMI_PRODUCT_NAME, "i1101"),
1080                 },
1081         },
1082         {
1083                 /* DEXP Ursus 7W */
1084                 .driver_data = (void *)&dexp_ursus_7w_data,
1085                 .matches = {
1086                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1087                         DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
1088                 },
1089         },
1090         {
1091                 /* Digma Citi E200 */
1092                 .driver_data = (void *)&digma_citi_e200_data,
1093                 .matches = {
1094                         DMI_MATCH(DMI_SYS_VENDOR, "Digma"),
1095                         DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"),
1096                         DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
1097                 },
1098         },
1099         {
1100                 /* Estar Beauty HD (MID 7316R) */
1101                 .driver_data = (void *)&estar_beauty_hd_data,
1102                 .matches = {
1103                         DMI_MATCH(DMI_SYS_VENDOR, "Estar"),
1104                         DMI_MATCH(DMI_PRODUCT_NAME, "eSTAR BEAUTY HD Intel Quad core"),
1105                 },
1106         },
1107         {       /* Glavey TM800A550L */
1108                 .driver_data = (void *)&glavey_tm800a550l_data,
1109                 .matches = {
1110                         DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
1111                         DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
1112                         /* Above strings are too generic, also match on BIOS version */
1113                         DMI_MATCH(DMI_BIOS_VERSION, "ZY-8-BI-PX4S70VTR400-X423B-005-D"),
1114                 },
1115         },
1116         {
1117                 /* GP-electronic T701 */
1118                 .driver_data = (void *)&gp_electronic_t701_data,
1119                 .matches = {
1120                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1121                         DMI_MATCH(DMI_PRODUCT_NAME, "T701"),
1122                         DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"),
1123                 },
1124         },
1125         {
1126                 /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
1127                 .driver_data = (void *)&trekstor_surftab_wintron70_data,
1128                 .matches = {
1129                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1130                         DMI_MATCH(DMI_PRODUCT_NAME, "i71c"),
1131                         DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"),
1132                 },
1133         },
1134         {
1135                 /* Irbis TW90 */
1136                 .driver_data = (void *)&irbis_tw90_data,
1137                 .matches = {
1138                         DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"),
1139                         DMI_MATCH(DMI_PRODUCT_NAME, "TW90"),
1140                 },
1141         },
1142         {
1143                 /* Irbis TW118 */
1144                 .driver_data = (void *)&irbis_tw118_data,
1145                 .matches = {
1146                         DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"),
1147                         DMI_MATCH(DMI_PRODUCT_NAME, "TW118"),
1148                 },
1149         },
1150         {
1151                 /* I.T.Works TW891 */
1152                 .driver_data = (void *)&itworks_tw891_data,
1153                 .matches = {
1154                         DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
1155                         DMI_MATCH(DMI_PRODUCT_NAME, "TW891"),
1156                 },
1157         },
1158         {
1159                 /* Jumper EZpad 6 Pro */
1160                 .driver_data = (void *)&jumper_ezpad_6_pro_data,
1161                 .matches = {
1162                         DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
1163                         DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
1164                         DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
1165                         /* Above matches are too generic, add bios-date match */
1166                         DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"),
1167                 },
1168         },
1169         {
1170                 /* Jumper EZpad 6 Pro B */
1171                 .driver_data = (void *)&jumper_ezpad_6_pro_b_data,
1172                 .matches = {
1173                         DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
1174                         DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
1175                         DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
1176                         /* Above matches are too generic, add bios-date match */
1177                         DMI_MATCH(DMI_BIOS_DATE, "04/24/2018"),
1178                 },
1179         },
1180         {
1181                 /* Jumper EZpad 6 m4 */
1182                 .driver_data = (void *)&jumper_ezpad_6_m4_data,
1183                 .matches = {
1184                         DMI_MATCH(DMI_SYS_VENDOR, "jumper"),
1185                         DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
1186                         /* Jumper8.S106x.A00C.1066 with the version dropped */
1187                         DMI_MATCH(DMI_BIOS_VERSION, "Jumper8.S106x"),
1188                 },
1189         },
1190         {
1191                 /* Jumper EZpad 7 */
1192                 .driver_data = (void *)&jumper_ezpad_7_data,
1193                 .matches = {
1194                         DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
1195                         DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
1196                         /* Jumper12x.WJ2012.bsBKRCP05 with the version dropped */
1197                         DMI_MATCH(DMI_BIOS_VERSION, "Jumper12x.WJ2012.bsBKRCP"),
1198                 },
1199         },
1200         {
1201                 /* Jumper EZpad mini3 */
1202                 .driver_data = (void *)&jumper_ezpad_mini3_data,
1203                 .matches = {
1204                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1205                         /* jumperx.T87.KFBNEEA02 with the version-nr dropped */
1206                         DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
1207                 },
1208         },
1209         {
1210                 /* Mediacom WinPad 7.0 W700 (same hw as Wintron surftab 7") */
1211                 .driver_data = (void *)&trekstor_surftab_wintron70_data,
1212                 .matches = {
1213                         DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"),
1214                         DMI_MATCH(DMI_PRODUCT_NAME, "WinPad 7 W10 - WPW700"),
1215                 },
1216         },
1217         {
1218                 /* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */
1219                 .driver_data = (void *)&trekstor_primebook_c11_data,
1220                 .matches = {
1221                         DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"),
1222                         DMI_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"),
1223                 },
1224         },
1225         {
1226                 /* MP Man Converter 9 */
1227                 .driver_data = (void *)&mpman_converter9_data,
1228                 .matches = {
1229                         DMI_MATCH(DMI_SYS_VENDOR, "MPMAN"),
1230                         DMI_MATCH(DMI_PRODUCT_NAME, "Converter9"),
1231                 },
1232         },
1233         {
1234                 /* MP Man MPWIN895CL */
1235                 .driver_data = (void *)&mpman_mpwin895cl_data,
1236                 .matches = {
1237                         DMI_MATCH(DMI_SYS_VENDOR, "MPMAN"),
1238                         DMI_MATCH(DMI_PRODUCT_NAME, "MPWIN8900CL"),
1239                 },
1240         },
1241         {
1242                 /* Myria MY8307 */
1243                 .driver_data = (void *)&myria_my8307_data,
1244                 .matches = {
1245                         DMI_MATCH(DMI_SYS_VENDOR, "Complet Electro Serv"),
1246                         DMI_MATCH(DMI_PRODUCT_NAME, "MY8307"),
1247                 },
1248         },
1249         {
1250                 /* Onda oBook 20 Plus */
1251                 .driver_data = (void *)&onda_obook_20_plus_data,
1252                 .matches = {
1253                         DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
1254                         DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
1255                 },
1256         },
1257         {
1258                 /* ONDA V80 plus v3 (P80PSBG9V3A01501) */
1259                 .driver_data = (void *)&onda_v80_plus_v3_data,
1260                 .matches = {
1261                         DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONDA"),
1262                         DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V80 PLUS")
1263                 },
1264         },
1265         {
1266                 /* ONDA V820w DualOS */
1267                 .driver_data = (void *)&onda_v820w_32g_data,
1268                 .matches = {
1269                         DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
1270                         DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS")
1271                 },
1272         },
1273         {
1274                 /* ONDA V891 v5 */
1275                 .driver_data = (void *)&onda_v891_v5_data,
1276                 .matches = {
1277                         DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
1278                         DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
1279                         DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D869CJABNRBA06"),
1280                 },
1281         },
1282         {
1283                 /* ONDA V891w revision P891WBEBV1B00 aka v1 */
1284                 .driver_data = (void *)&onda_v891w_v1_data,
1285                 .matches = {
1286                         DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
1287                         DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"),
1288                         DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"),
1289                         /* Exact match, different versions need different fw */
1290                         DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
1291                 },
1292         },
1293         {
1294                 /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
1295                 .driver_data = (void *)&onda_v891w_v3_data,
1296                 .matches = {
1297                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1298                         DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
1299                         DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
1300                 },
1301         },
1302         {
1303                 /* Pipo W2S */
1304                 .driver_data = (void *)&pipo_w2s_data,
1305                 .matches = {
1306                         DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
1307                         DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
1308                 },
1309         },
1310         {
1311                 /* Pipo W11 */
1312                 .driver_data = (void *)&pipo_w11_data,
1313                 .matches = {
1314                         DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
1315                         DMI_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."),
1316                         /* Above matches are too generic, add bios-ver match */
1317                         DMI_MATCH(DMI_BIOS_VERSION, "JS-BI-10.6-SF133GR300-GA55B-024-F"),
1318                 },
1319         },
1320         {
1321                 /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
1322                 .driver_data = (void *)&trekstor_surftab_wintron70_data,
1323                 .matches = {
1324                         DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"),
1325                         DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"),
1326                         /* Exact match, different versions need different fw */
1327                         DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"),
1328                 },
1329         },
1330         {
1331                 /* Point of View mobii wintab p800w (v2.0) */
1332                 .driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
1333                 .matches = {
1334                         DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
1335                         DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
1336                         DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"),
1337                         /* Above matches are too generic, add bios-date match */
1338                         DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
1339                 },
1340         },
1341         {
1342                 /* Predia Basic tablet) */
1343                 .driver_data = (void *)&predia_basic_data,
1344                 .matches = {
1345                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1346                         DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
1347                         /* Above matches are too generic, add bios-version match */
1348                         DMI_MATCH(DMI_BIOS_VERSION, "Mx.WT107.KUBNGEA"),
1349                 },
1350         },
1351         {
1352                 /* Point of View mobii wintab p800w (v2.1) */
1353                 .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
1354                 .matches = {
1355                         DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
1356                         DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
1357                         DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"),
1358                         /* Above matches are too generic, add bios-date match */
1359                         DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"),
1360                 },
1361         },
1362         {
1363                 /* Point of View mobii wintab p1006w (v1.0) */
1364                 .driver_data = (void *)&pov_mobii_wintab_p1006w_v10_data,
1365                 .matches = {
1366                         DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
1367                         DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
1368                         /* Note 105b is Foxcon's USB/PCI vendor id */
1369                         DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"),
1370                         DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
1371                 },
1372         },
1373         {
1374                 /* Schneider SCT101CTM */
1375                 .driver_data = (void *)&schneider_sct101ctm_data,
1376                 .matches = {
1377                         DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
1378                         DMI_MATCH(DMI_PRODUCT_NAME, "SCT101CTM"),
1379                 },
1380         },
1381         {
1382                 /* Techbite Arc 11.6 */
1383                 .driver_data = (void *)&techbite_arc_11_6_data,
1384                 .matches = {
1385                         DMI_MATCH(DMI_SYS_VENDOR, "mPTech"),
1386                         DMI_MATCH(DMI_PRODUCT_NAME, "techBite Arc 11.6"),
1387                         DMI_MATCH(DMI_BOARD_NAME, "G8316_272B"),
1388                 },
1389         },
1390         {
1391                 /* Teclast Tbook 11 */
1392                 .driver_data = (void *)&teclast_tbook11_data,
1393                 .matches = {
1394                         DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
1395                         DMI_MATCH(DMI_PRODUCT_NAME, "TbooK 11"),
1396                         DMI_MATCH(DMI_PRODUCT_SKU, "E5A6_A1"),
1397                 },
1398         },
1399         {
1400                 /* Teclast X3 Plus */
1401                 .driver_data = (void *)&teclast_x3_plus_data,
1402                 .matches = {
1403                         DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
1404                         DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
1405                         DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
1406                 },
1407         },
1408         {
1409                 /* Teclast X89 (Android version / BIOS) */
1410                 .driver_data = (void *)&gdix1001_00_upside_down_data,
1411                 .matches = {
1412                         DMI_MATCH(DMI_BOARD_VENDOR, "WISKY"),
1413                         DMI_MATCH(DMI_BOARD_NAME, "3G062i"),
1414                 },
1415         },
1416         {
1417                 /* Teclast X89 (Windows version / BIOS) */
1418                 .driver_data = (void *)&gdix1001_01_upside_down_data,
1419                 .matches = {
1420                         /* tPAD is too generic, also match on bios date */
1421                         DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
1422                         DMI_MATCH(DMI_BOARD_NAME, "tPAD"),
1423                         DMI_MATCH(DMI_BIOS_DATE, "12/19/2014"),
1424                 },
1425         },
1426         {
1427                 /* Teclast X98 Plus II */
1428                 .driver_data = (void *)&teclast_x98plus2_data,
1429                 .matches = {
1430                         DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
1431                         DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
1432                 },
1433         },
1434         {
1435                 /* Teclast X98 Pro */
1436                 .driver_data = (void *)&gdix1001_00_upside_down_data,
1437                 .matches = {
1438                         /*
1439                          * Only match BIOS date, because the manufacturers
1440                          * BIOS does not report the board name at all
1441                          * (sometimes)...
1442                          */
1443                         DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
1444                         DMI_MATCH(DMI_BIOS_DATE, "10/28/2015"),
1445                 },
1446         },
1447         {
1448                 /* Trekstor Primebook C11 */
1449                 .driver_data = (void *)&trekstor_primebook_c11_data,
1450                 .matches = {
1451                         DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1452                         DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"),
1453                 },
1454         },
1455         {
1456                 /* Trekstor Primebook C11B (same touchscreen as the C11) */
1457                 .driver_data = (void *)&trekstor_primebook_c11_data,
1458                 .matches = {
1459                         DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1460                         DMI_MATCH(DMI_PRODUCT_NAME, "PRIMEBOOK C11B"),
1461                 },
1462         },
1463         {
1464                 /* Trekstor Primebook C13 */
1465                 .driver_data = (void *)&trekstor_primebook_c13_data,
1466                 .matches = {
1467                         DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1468                         DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
1469                 },
1470         },
1471         {
1472                 /* Trekstor Primetab T13B */
1473                 .driver_data = (void *)&trekstor_primetab_t13b_data,
1474                 .matches = {
1475                         DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1476                         DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"),
1477                 },
1478         },
1479         {
1480                 /* TrekStor SurfTab twin 10.1 ST10432-8 */
1481                 .driver_data = (void *)&trekstor_surftab_twin_10_1_data,
1482                 .matches = {
1483                         DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1484                         DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
1485                 },
1486         },
1487         {
1488                 /* Trekstor Surftab Wintron 7.0 ST70416-6 */
1489                 .driver_data = (void *)&trekstor_surftab_wintron70_data,
1490                 .matches = {
1491                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1492                         DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"),
1493                         /* Exact match, different versions need different fw */
1494                         DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"),
1495                 },
1496         },
1497         {
1498                 /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
1499                 .driver_data = (void *)&trekstor_surftab_wintron70_data,
1500                 .matches = {
1501                         DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1502                         DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab wintron 7.0 ST70416-6"),
1503                         /* Exact match, different versions need different fw */
1504                         DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
1505                 },
1506         },
1507         {
1508                 /* Trekstor Yourbook C11B (same touchscreen as the Primebook C11) */
1509                 .driver_data = (void *)&trekstor_primebook_c11_data,
1510                 .matches = {
1511                         DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1512                         DMI_MATCH(DMI_PRODUCT_NAME, "YOURBOOK C11B"),
1513                 },
1514         },
1515         {
1516                 /* Vinga Twizzle J116 */
1517                 .driver_data = (void *)&vinga_twizzle_j116_data,
1518                 .matches = {
1519                         DMI_MATCH(DMI_PRODUCT_NAME, "VINGA Twizzle J116"),
1520                 },
1521         },
1522         {
1523                 /* "WinBook TW100" */
1524                 .driver_data = (void *)&gdix1001_00_upside_down_data,
1525                 .matches = {
1526                         DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
1527                         DMI_MATCH(DMI_PRODUCT_NAME, "TW100")
1528                 }
1529         },
1530         {
1531                 /* WinBook TW700 */
1532                 .driver_data = (void *)&gdix1001_00_upside_down_data,
1533                 .matches = {
1534                         DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
1535                         DMI_MATCH(DMI_PRODUCT_NAME, "TW700")
1536                 },
1537         },
1538         {
1539                 /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
1540                 .driver_data = (void *)&chuwi_vi8_data,
1541                 .matches = {
1542                         DMI_MATCH(DMI_SYS_VENDOR, "YOURS"),
1543                         DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"),
1544                 },
1545         },
1546         { }
1547 };
1548
1549 static const struct ts_dmi_data *ts_data;
1550
1551 static void ts_dmi_add_props(struct i2c_client *client)
1552 {
1553         struct device *dev = &client->dev;
1554         int error;
1555
1556         if (has_acpi_companion(dev) &&
1557             !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
1558                 error = device_create_managed_software_node(dev, ts_data->properties, NULL);
1559                 if (error)
1560                         dev_err(dev, "failed to add properties: %d\n", error);
1561         }
1562 }
1563
1564 static int ts_dmi_notifier_call(struct notifier_block *nb,
1565                                 unsigned long action, void *data)
1566 {
1567         struct device *dev = data;
1568         struct i2c_client *client;
1569
1570         switch (action) {
1571         case BUS_NOTIFY_ADD_DEVICE:
1572                 client = i2c_verify_client(dev);
1573                 if (client)
1574                         ts_dmi_add_props(client);
1575                 break;
1576
1577         default:
1578                 break;
1579         }
1580
1581         return 0;
1582 }
1583
1584 static struct notifier_block ts_dmi_notifier = {
1585         .notifier_call = ts_dmi_notifier_call,
1586 };
1587
1588 static int __init ts_dmi_init(void)
1589 {
1590         const struct dmi_system_id *dmi_id;
1591         int error;
1592
1593         dmi_id = dmi_first_match(touchscreen_dmi_table);
1594         if (!dmi_id)
1595                 return 0; /* Not an error */
1596
1597         ts_data = dmi_id->driver_data;
1598         /* Some dmi table entries only provide an efi_embedded_fw_desc */
1599         if (!ts_data->properties)
1600                 return 0;
1601
1602         error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
1603         if (error)
1604                 pr_err("%s: failed to register i2c bus notifier: %d\n",
1605                         __func__, error);
1606
1607         return error;
1608 }
1609
1610 /*
1611  * We are registering out notifier after i2c core is initialized and i2c bus
1612  * itself is ready (which happens at postcore initcall level), but before
1613  * ACPI starts enumerating devices (at subsys initcall level).
1614  */
1615 arch_initcall(ts_dmi_init);