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