Merge tag 'platform-drivers-x86-v5.3-1' of git://git.infradead.org/linux-platform...
[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/i2c.h>
15 #include <linux/notifier.h>
16 #include <linux/property.h>
17 #include <linux/string.h>
18
19 struct ts_dmi_data {
20         const char *acpi_name;
21         const struct property_entry *properties;
22 };
23
24 /* NOTE: Please keep all entries sorted alphabetically */
25
26 static const struct property_entry chuwi_hi8_props[] = {
27         PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
28         PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
29         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
30         PROPERTY_ENTRY_BOOL("silead,home-button"),
31         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi8.fw"),
32         { }
33 };
34
35 static const struct ts_dmi_data chuwi_hi8_data = {
36         .acpi_name      = "MSSL0001:00",
37         .properties     = chuwi_hi8_props,
38 };
39
40 static const struct property_entry chuwi_hi8_air_props[] = {
41         PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
42         PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
43         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
44         PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-hi8-air.fw"),
45         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
46         { }
47 };
48
49 static const struct ts_dmi_data chuwi_hi8_air_data = {
50         .acpi_name      = "MSSL1680:00",
51         .properties     = chuwi_hi8_air_props,
52 };
53
54 static const struct property_entry chuwi_hi8_pro_props[] = {
55         PROPERTY_ENTRY_U32("touchscreen-min-x", 6),
56         PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
57         PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
58         PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
59         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
60         PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-hi8-pro.fw"),
61         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
62         PROPERTY_ENTRY_BOOL("silead,home-button"),
63         { }
64 };
65
66 static const struct ts_dmi_data chuwi_hi8_pro_data = {
67         .acpi_name      = "MSSL1680:00",
68         .properties     = chuwi_hi8_pro_props,
69 };
70
71 static const struct property_entry chuwi_hi10_air_props[] = {
72         PROPERTY_ENTRY_U32("touchscreen-size-x", 1981),
73         PROPERTY_ENTRY_U32("touchscreen-size-y", 1271),
74         PROPERTY_ENTRY_U32("touchscreen-min-x", 99),
75         PROPERTY_ENTRY_U32("touchscreen-min-y", 9),
76         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
77         PROPERTY_ENTRY_U32("touchscreen-fuzz-x", 5),
78         PROPERTY_ENTRY_U32("touchscreen-fuzz-y", 4),
79         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10-air.fw"),
80         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
81         PROPERTY_ENTRY_BOOL("silead,home-button"),
82         { }
83 };
84
85 static const struct ts_dmi_data chuwi_hi10_air_data = {
86         .acpi_name      = "MSSL1680:00",
87         .properties     = chuwi_hi10_air_props,
88 };
89
90 static const struct property_entry chuwi_hi10_plus_props[] = {
91         PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
92         PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
93         PROPERTY_ENTRY_U32("touchscreen-size-x", 1914),
94         PROPERTY_ENTRY_U32("touchscreen-size-y", 1283),
95         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10plus.fw"),
96         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
97         PROPERTY_ENTRY_BOOL("silead,home-button"),
98         { }
99 };
100
101 static const struct ts_dmi_data chuwi_hi10_plus_data = {
102         .acpi_name      = "MSSL0017:00",
103         .properties     = chuwi_hi10_plus_props,
104 };
105
106 static const struct property_entry chuwi_vi8_props[] = {
107         PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
108         PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
109         PROPERTY_ENTRY_U32("touchscreen-size-x", 1724),
110         PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
111         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
112         PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-vi8.fw"),
113         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
114         PROPERTY_ENTRY_BOOL("silead,home-button"),
115         { }
116 };
117
118 static const struct ts_dmi_data chuwi_vi8_data = {
119         .acpi_name      = "MSSL1680:00",
120         .properties     = chuwi_vi8_props,
121 };
122
123 static const struct property_entry chuwi_vi10_props[] = {
124         PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
125         PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
126         PROPERTY_ENTRY_U32("touchscreen-size-x", 1858),
127         PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
128         PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-vi10.fw"),
129         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
130         PROPERTY_ENTRY_BOOL("silead,home-button"),
131         { }
132 };
133
134 static const struct ts_dmi_data chuwi_vi10_data = {
135         .acpi_name      = "MSSL0002:00",
136         .properties     = chuwi_vi10_props,
137 };
138
139 static const struct property_entry connect_tablet9_props[] = {
140         PROPERTY_ENTRY_U32("touchscreen-min-x", 9),
141         PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
142         PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
143         PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
144         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
145         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
146         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-connect-tablet9.fw"),
147         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
148         { }
149 };
150
151 static const struct ts_dmi_data connect_tablet9_data = {
152         .acpi_name      = "MSSL1680:00",
153         .properties     = connect_tablet9_props,
154 };
155
156 static const struct property_entry cube_iwork8_air_props[] = {
157         PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
158         PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
159         PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
160         PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
161         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
162         PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-cube-iwork8-air.fw"),
163         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
164         { }
165 };
166
167 static const struct ts_dmi_data cube_iwork8_air_data = {
168         .acpi_name      = "MSSL1680:00",
169         .properties     = cube_iwork8_air_props,
170 };
171
172 static const struct property_entry cube_knote_i1101_props[] = {
173         PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
174         PROPERTY_ENTRY_U32("touchscreen-min-y",  22),
175         PROPERTY_ENTRY_U32("touchscreen-size-x", 1961),
176         PROPERTY_ENTRY_U32("touchscreen-size-y", 1513),
177         PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-cube-knote-i1101.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 cube_knote_i1101_data = {
184         .acpi_name      = "MSSL1680:00",
185         .properties     = cube_knote_i1101_props,
186 };
187
188 static const struct property_entry dexp_ursus_7w_props[] = {
189         PROPERTY_ENTRY_U32("touchscreen-size-x", 890),
190         PROPERTY_ENTRY_U32("touchscreen-size-y", 630),
191         PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-dexp-ursus-7w.fw"),
192         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
193         PROPERTY_ENTRY_BOOL("silead,home-button"),
194         { }
195 };
196
197 static const struct ts_dmi_data dexp_ursus_7w_data = {
198         .acpi_name      = "MSSL1680:00",
199         .properties     = dexp_ursus_7w_props,
200 };
201
202 static const struct property_entry digma_citi_e200_props[] = {
203         PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
204         PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
205         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
206         PROPERTY_ENTRY_STRING("firmware-name",
207                               "gsl1686-digma_citi_e200.fw"),
208         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
209         PROPERTY_ENTRY_BOOL("silead,home-button"),
210         { }
211 };
212
213 static const struct ts_dmi_data digma_citi_e200_data = {
214         .acpi_name      = "MSSL1680:00",
215         .properties     = digma_citi_e200_props,
216 };
217
218 static const struct property_entry gp_electronic_t701_props[] = {
219         PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
220         PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
221         PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
222         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
223         PROPERTY_ENTRY_STRING("firmware-name",
224                               "gsl1680-gp-electronic-t701.fw"),
225         { }
226 };
227
228 static const struct ts_dmi_data gp_electronic_t701_data = {
229         .acpi_name      = "MSSL1680:00",
230         .properties     = gp_electronic_t701_props,
231 };
232
233 static const struct property_entry itworks_tw891_props[] = {
234         PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
235         PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
236         PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
237         PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
238         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
239         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
240         PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
241         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
242         { }
243 };
244
245 static const struct ts_dmi_data itworks_tw891_data = {
246         .acpi_name      = "MSSL1680:00",
247         .properties     = itworks_tw891_props,
248 };
249
250 static const struct property_entry jumper_ezpad_6_pro_props[] = {
251         PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
252         PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
253         PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"),
254         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
255         PROPERTY_ENTRY_BOOL("silead,home-button"),
256         { }
257 };
258
259 static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
260         .acpi_name      = "MSSL1680:00",
261         .properties     = jumper_ezpad_6_pro_props,
262 };
263
264 static const struct property_entry jumper_ezpad_6_pro_b_props[] = {
265         PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
266         PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
267         PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro-b.fw"),
268         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
269         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
270         PROPERTY_ENTRY_BOOL("silead,home-button"),
271         { }
272 };
273
274 static const struct ts_dmi_data jumper_ezpad_6_pro_b_data = {
275         .acpi_name      = "MSSL1680:00",
276         .properties     = jumper_ezpad_6_pro_b_props,
277 };
278
279 static const struct property_entry jumper_ezpad_mini3_props[] = {
280         PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
281         PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
282         PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
283         PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
284         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
285         PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
286         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
287         { }
288 };
289
290 static const struct ts_dmi_data jumper_ezpad_mini3_data = {
291         .acpi_name      = "MSSL1680:00",
292         .properties     = jumper_ezpad_mini3_props,
293 };
294
295 static const struct property_entry myria_my8307_props[] = {
296         PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
297         PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
298         PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
299         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
300         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
301         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-myria-my8307.fw"),
302         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
303         PROPERTY_ENTRY_BOOL("silead,home-button"),
304         { }
305 };
306
307 static const struct ts_dmi_data myria_my8307_data = {
308         .acpi_name      = "MSSL1680:00",
309         .properties     = myria_my8307_props,
310 };
311
312 static const struct property_entry onda_obook_20_plus_props[] = {
313         PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
314         PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
315         PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
316         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
317         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
318         PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
319         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
320         PROPERTY_ENTRY_BOOL("silead,home-button"),
321         { }
322 };
323
324 static const struct ts_dmi_data onda_obook_20_plus_data = {
325         .acpi_name      = "MSSL1680:00",
326         .properties     = onda_obook_20_plus_props,
327 };
328
329 static const struct property_entry onda_v80_plus_v3_props[] = {
330         PROPERTY_ENTRY_U32("touchscreen-min-x", 22),
331         PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
332         PROPERTY_ENTRY_U32("touchscreen-size-x", 1698),
333         PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
334         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
335         PROPERTY_ENTRY_STRING("firmware-name",
336                               "gsl3676-onda-v80-plus-v3.fw"),
337         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
338         PROPERTY_ENTRY_BOOL("silead,home-button"),
339         { }
340 };
341
342 static const struct ts_dmi_data onda_v80_plus_v3_data = {
343         .acpi_name      = "MSSL1680:00",
344         .properties     = onda_v80_plus_v3_props,
345 };
346
347 static const struct property_entry onda_v820w_32g_props[] = {
348         PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
349         PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
350         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
351         PROPERTY_ENTRY_STRING("firmware-name",
352                               "gsl1680-onda-v820w-32g.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 onda_v820w_32g_data = {
359         .acpi_name      = "MSSL1680:00",
360         .properties     = onda_v820w_32g_props,
361 };
362
363 static const struct property_entry onda_v891w_v1_props[] = {
364         PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
365         PROPERTY_ENTRY_U32("touchscreen-min-y",  8),
366         PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
367         PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
368         PROPERTY_ENTRY_STRING("firmware-name",
369                               "gsl3680-onda-v891w-v1.fw"),
370         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
371         PROPERTY_ENTRY_BOOL("silead,home-button"),
372         { }
373 };
374
375 static const struct ts_dmi_data onda_v891w_v1_data = {
376         .acpi_name      = "MSSL1680:00",
377         .properties     = onda_v891w_v1_props,
378 };
379
380 static const struct property_entry onda_v891w_v3_props[] = {
381         PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
382         PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
383         PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
384         PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
385         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
386         PROPERTY_ENTRY_STRING("firmware-name",
387                               "gsl3676-onda-v891w-v3.fw"),
388         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
389         PROPERTY_ENTRY_BOOL("silead,home-button"),
390         { }
391 };
392
393 static const struct ts_dmi_data onda_v891w_v3_data = {
394         .acpi_name      = "MSSL1680:00",
395         .properties     = onda_v891w_v3_props,
396 };
397
398 static const struct property_entry pipo_w2s_props[] = {
399         PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
400         PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
401         PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
402         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
403         PROPERTY_ENTRY_STRING("firmware-name",
404                               "gsl1680-pipo-w2s.fw"),
405         { }
406 };
407
408 static const struct ts_dmi_data pipo_w2s_data = {
409         .acpi_name      = "MSSL1680:00",
410         .properties     = pipo_w2s_props,
411 };
412
413 static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
414         PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
415         PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
416         PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
417         PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
418         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
419         PROPERTY_ENTRY_STRING("firmware-name",
420                               "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
421         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
422         PROPERTY_ENTRY_BOOL("silead,home-button"),
423         { }
424 };
425
426 static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
427         .acpi_name      = "MSSL1680:00",
428         .properties     = pov_mobii_wintab_p800w_v20_props,
429 };
430
431 static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
432         PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
433         PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
434         PROPERTY_ENTRY_U32("touchscreen-size-x", 1794),
435         PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
436         PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
437         PROPERTY_ENTRY_STRING("firmware-name",
438                               "gsl3692-pov-mobii-wintab-p800w.fw"),
439         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
440         PROPERTY_ENTRY_BOOL("silead,home-button"),
441         { }
442 };
443
444 static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
445         .acpi_name      = "MSSL1680:00",
446         .properties     = pov_mobii_wintab_p800w_v21_props,
447 };
448
449 static const struct property_entry pov_mobii_wintab_p1006w_v10_props[] = {
450         PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
451         PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
452         PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
453         PROPERTY_ENTRY_U32("touchscreen-size-y", 1520),
454         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
455         PROPERTY_ENTRY_STRING("firmware-name",
456                               "gsl3692-pov-mobii-wintab-p1006w-v10.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 pov_mobii_wintab_p1006w_v10_data = {
463         .acpi_name      = "MSSL1680:00",
464         .properties     = pov_mobii_wintab_p1006w_v10_props,
465 };
466
467 static const struct property_entry teclast_x3_plus_props[] = {
468         PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
469         PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
470         PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"),
471         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
472         PROPERTY_ENTRY_BOOL("silead,home-button"),
473         { }
474 };
475
476 static const struct ts_dmi_data teclast_x3_plus_data = {
477         .acpi_name      = "MSSL1680:00",
478         .properties     = teclast_x3_plus_props,
479 };
480
481 static const struct property_entry teclast_x98plus2_props[] = {
482         PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
483         PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
484         PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
485         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
486         PROPERTY_ENTRY_STRING("firmware-name",
487                               "gsl1686-teclast_x98plus2.fw"),
488         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
489         { }
490 };
491
492 static const struct ts_dmi_data teclast_x98plus2_data = {
493         .acpi_name      = "MSSL1680:00",
494         .properties     = teclast_x98plus2_props,
495 };
496
497 static const struct property_entry trekstor_primebook_c11_props[] = {
498         PROPERTY_ENTRY_U32("touchscreen-size-x", 1970),
499         PROPERTY_ENTRY_U32("touchscreen-size-y", 1530),
500         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
501         PROPERTY_ENTRY_STRING("firmware-name",
502                               "gsl1680-trekstor-primebook-c11.fw"),
503         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
504         PROPERTY_ENTRY_BOOL("silead,home-button"),
505         { }
506 };
507
508 static const struct ts_dmi_data trekstor_primebook_c11_data = {
509         .acpi_name      = "MSSL1680:00",
510         .properties     = trekstor_primebook_c11_props,
511 };
512
513 static const struct property_entry trekstor_primebook_c13_props[] = {
514         PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
515         PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
516         PROPERTY_ENTRY_STRING("firmware-name",
517                               "gsl1680-trekstor-primebook-c13.fw"),
518         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
519         PROPERTY_ENTRY_BOOL("silead,home-button"),
520         { }
521 };
522
523 static const struct ts_dmi_data trekstor_primebook_c13_data = {
524         .acpi_name      = "MSSL1680:00",
525         .properties     = trekstor_primebook_c13_props,
526 };
527
528 static const struct property_entry trekstor_primetab_t13b_props[] = {
529         PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
530         PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
531         PROPERTY_ENTRY_STRING("firmware-name",
532                               "gsl1680-trekstor-primetab-t13b.fw"),
533         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
534         PROPERTY_ENTRY_BOOL("silead,home-button"),
535         PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
536         { }
537 };
538
539 static const struct ts_dmi_data trekstor_primetab_t13b_data = {
540         .acpi_name  = "MSSL1680:00",
541         .properties = trekstor_primetab_t13b_props,
542 };
543
544 static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
545         PROPERTY_ENTRY_U32("touchscreen-size-x", 1900),
546         PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
547         PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
548         PROPERTY_ENTRY_STRING("firmware-name",
549                               "gsl3670-surftab-twin-10-1-st10432-8.fw"),
550         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
551         { }
552 };
553
554 static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
555         .acpi_name      = "MSSL1680:00",
556         .properties     = trekstor_surftab_twin_10_1_props,
557 };
558
559 static const struct property_entry trekstor_surftab_wintron70_props[] = {
560         PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
561         PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
562         PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
563         PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
564         PROPERTY_ENTRY_STRING("firmware-name",
565                               "gsl1686-surftab-wintron70-st70416-6.fw"),
566         PROPERTY_ENTRY_U32("silead,max-fingers", 10),
567         PROPERTY_ENTRY_BOOL("silead,home-button"),
568         { }
569 };
570
571 static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
572         .acpi_name      = "MSSL1680:00",
573         .properties     = trekstor_surftab_wintron70_props,
574 };
575
576 /* NOTE: Please keep this table sorted alphabetically */
577 static const struct dmi_system_id touchscreen_dmi_table[] = {
578         {
579                 /* Chuwi Hi8 */
580                 .driver_data = (void *)&chuwi_hi8_data,
581                 .matches = {
582                         DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
583                         DMI_MATCH(DMI_PRODUCT_NAME, "S806"),
584                 },
585         },
586         {
587                 /* Chuwi Hi8 (H1D_S806_206) */
588                 .driver_data = (void *)&chuwi_hi8_data,
589                 .matches = {
590                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
591                         DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
592                         DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"),
593                 },
594         },
595         {
596                 /* Chuwi Hi8 Air (CWI543) */
597                 .driver_data = (void *)&chuwi_hi8_air_data,
598                 .matches = {
599                         DMI_MATCH(DMI_BOARD_VENDOR, "Default string"),
600                         DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
601                         DMI_MATCH(DMI_PRODUCT_NAME, "Hi8 Air"),
602                 },
603         },
604         {
605                 /* Chuwi Hi8 Pro (CWI513) */
606                 .driver_data = (void *)&chuwi_hi8_pro_data,
607                 .matches = {
608                         DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
609                         DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
610                 },
611         },
612         {
613                 /* Chuwi Hi10 Air */
614                 .driver_data = (void *)&chuwi_hi10_air_data,
615                 .matches = {
616                         DMI_MATCH(DMI_SYS_VENDOR, "CHUWI INNOVATION AND TECHNOLOGY(SHENZHEN)CO.LTD"),
617                         DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
618                         DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"),
619                 },
620         },
621         {
622                 /* Chuwi Hi10 Plus (CWI527) */
623                 .driver_data = (void *)&chuwi_hi10_plus_data,
624                 .matches = {
625                         DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
626                         DMI_MATCH(DMI_PRODUCT_NAME, "Hi10 plus tablet"),
627                         DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
628                 },
629         },
630         {
631                 /* Chuwi Vi8 (CWI506) */
632                 .driver_data = (void *)&chuwi_vi8_data,
633                 .matches = {
634                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
635                         DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
636                         DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
637                 },
638         },
639         {
640                 /* Chuwi Vi10 (CWI505) */
641                 .driver_data = (void *)&chuwi_vi10_data,
642                 .matches = {
643                         DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
644                         DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"),
645                         DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
646                         DMI_MATCH(DMI_PRODUCT_NAME, "S165"),
647                 },
648         },
649         {
650                 /* Connect Tablet 9 */
651                 .driver_data = (void *)&connect_tablet9_data,
652                 .matches = {
653                         DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
654                         DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
655                 },
656         },
657         {
658                 /* CUBE iwork8 Air */
659                 .driver_data = (void *)&cube_iwork8_air_data,
660                 .matches = {
661                         DMI_MATCH(DMI_SYS_VENDOR, "cube"),
662                         DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"),
663                         DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
664                 },
665         },
666         {
667                 /* Cube KNote i1101 */
668                 .driver_data = (void *)&cube_knote_i1101_data,
669                 .matches = {
670                         DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
671                         DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"),
672                         DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"),
673                         DMI_MATCH(DMI_PRODUCT_NAME, "i1101"),
674                 },
675         },
676         {
677                 /* DEXP Ursus 7W */
678                 .driver_data = (void *)&dexp_ursus_7w_data,
679                 .matches = {
680                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
681                         DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
682                 },
683         },
684         {
685                 /* Digma Citi E200 */
686                 .driver_data = (void *)&digma_citi_e200_data,
687                 .matches = {
688                         DMI_MATCH(DMI_SYS_VENDOR, "Digma"),
689                         DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"),
690                         DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
691                 },
692         },
693         {
694                 /* GP-electronic T701 */
695                 .driver_data = (void *)&gp_electronic_t701_data,
696                 .matches = {
697                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
698                         DMI_MATCH(DMI_PRODUCT_NAME, "T701"),
699                         DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"),
700                 },
701         },
702         {
703                 /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
704                 .driver_data = (void *)&trekstor_surftab_wintron70_data,
705                 .matches = {
706                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
707                         DMI_MATCH(DMI_PRODUCT_NAME, "i71c"),
708                         DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"),
709                 },
710         },
711         {
712                 /* I.T.Works TW891 */
713                 .driver_data = (void *)&itworks_tw891_data,
714                 .matches = {
715                         DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
716                         DMI_MATCH(DMI_PRODUCT_NAME, "TW891"),
717                 },
718         },
719         {
720                 /* Jumper EZpad 6 Pro */
721                 .driver_data = (void *)&jumper_ezpad_6_pro_data,
722                 .matches = {
723                         DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
724                         DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
725                         DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
726                         /* Above matches are too generic, add bios-date match */
727                         DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"),
728                 },
729         },
730         {
731                 /* Jumper EZpad 6 Pro B */
732                 .driver_data = (void *)&jumper_ezpad_6_pro_b_data,
733                 .matches = {
734                         DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
735                         DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
736                         DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
737                         /* Above matches are too generic, add bios-date match */
738                         DMI_MATCH(DMI_BIOS_DATE, "04/24/2018"),
739                 },
740         },
741         {
742                 /* Jumper EZpad mini3 */
743                 .driver_data = (void *)&jumper_ezpad_mini3_data,
744                 .matches = {
745                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
746                         /* jumperx.T87.KFBNEEA02 with the version-nr dropped */
747                         DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
748                 },
749         },
750         {
751                 /* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */
752                 .driver_data = (void *)&trekstor_primebook_c11_data,
753                 .matches = {
754                         DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"),
755                         DMI_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"),
756                 },
757         },
758         {
759                 /* Myria MY8307 */
760                 .driver_data = (void *)&myria_my8307_data,
761                 .matches = {
762                         DMI_MATCH(DMI_SYS_VENDOR, "Complet Electro Serv"),
763                         DMI_MATCH(DMI_PRODUCT_NAME, "MY8307"),
764                 },
765         },
766         {
767                 /* Onda oBook 20 Plus */
768                 .driver_data = (void *)&onda_obook_20_plus_data,
769                 .matches = {
770                         DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
771                         DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
772                 },
773         },
774         {
775                 /* ONDA V80 plus v3 (P80PSBG9V3A01501) */
776                 .driver_data = (void *)&onda_v80_plus_v3_data,
777                 .matches = {
778                         DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONDA"),
779                         DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V80 PLUS")
780                 },
781         },
782         {
783                 /* ONDA V820w DualOS */
784                 .driver_data = (void *)&onda_v820w_32g_data,
785                 .matches = {
786                         DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
787                         DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS")
788                 },
789         },
790         {
791                 /* ONDA V891w revision P891WBEBV1B00 aka v1 */
792                 .driver_data = (void *)&onda_v891w_v1_data,
793                 .matches = {
794                         DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
795                         DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"),
796                         DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"),
797                         /* Exact match, different versions need different fw */
798                         DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
799                 },
800         },
801         {
802                 /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
803                 .driver_data = (void *)&onda_v891w_v3_data,
804                 .matches = {
805                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
806                         DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
807                         DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
808                 },
809         },
810         {
811                 /* Pipo W2S */
812                 .driver_data = (void *)&pipo_w2s_data,
813                 .matches = {
814                         DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
815                         DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
816                 },
817         },
818         {
819                 /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
820                 .driver_data = (void *)&trekstor_surftab_wintron70_data,
821                 .matches = {
822                         DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"),
823                         DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"),
824                         /* Exact match, different versions need different fw */
825                         DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"),
826                 },
827         },
828         {
829                 /* Point of View mobii wintab p800w (v2.0) */
830                 .driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
831                 .matches = {
832                         DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
833                         DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
834                         DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"),
835                         /* Above matches are too generic, add bios-date match */
836                         DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
837                 },
838         },
839         {
840                 /* Point of View mobii wintab p800w (v2.1) */
841                 .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
842                 .matches = {
843                         DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
844                         DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
845                         DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"),
846                         /* Above matches are too generic, add bios-date match */
847                         DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"),
848                 },
849         },
850         {
851                 /* Point of View mobii wintab p1006w (v1.0) */
852                 .driver_data = (void *)&pov_mobii_wintab_p1006w_v10_data,
853                 .matches = {
854                         DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
855                         DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
856                         /* Note 105b is Foxcon's USB/PCI vendor id */
857                         DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"),
858                         DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
859                 },
860         },
861         {
862                 /* Teclast X3 Plus */
863                 .driver_data = (void *)&teclast_x3_plus_data,
864                 .matches = {
865                         DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
866                         DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
867                         DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
868                 },
869         },
870         {
871                 /* Teclast X98 Plus II */
872                 .driver_data = (void *)&teclast_x98plus2_data,
873                 .matches = {
874                         DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
875                         DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
876                 },
877         },
878         {
879                 /* Trekstor Primebook C11 */
880                 .driver_data = (void *)&trekstor_primebook_c11_data,
881                 .matches = {
882                         DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
883                         DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"),
884                 },
885         },
886         {
887                 /* Trekstor Primebook C13 */
888                 .driver_data = (void *)&trekstor_primebook_c13_data,
889                 .matches = {
890                         DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
891                         DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
892                 },
893         },
894         {
895                 /* Trekstor Primetab T13B */
896                 .driver_data = (void *)&trekstor_primetab_t13b_data,
897                 .matches = {
898                         DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
899                         DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"),
900                 },
901         },
902         {
903                 /* TrekStor SurfTab twin 10.1 ST10432-8 */
904                 .driver_data = (void *)&trekstor_surftab_twin_10_1_data,
905                 .matches = {
906                         DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
907                         DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
908                 },
909         },
910         {
911                 /* Trekstor Surftab Wintron 7.0 ST70416-6 */
912                 .driver_data = (void *)&trekstor_surftab_wintron70_data,
913                 .matches = {
914                         DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
915                         DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"),
916                         /* Exact match, different versions need different fw */
917                         DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"),
918                 },
919         },
920         {
921                 /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
922                 .driver_data = (void *)&trekstor_surftab_wintron70_data,
923                 .matches = {
924                         DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
925                         DMI_MATCH(DMI_PRODUCT_NAME,
926                                              "SurfTab wintron 7.0 ST70416-6"),
927                         /* Exact match, different versions need different fw */
928                         DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
929                 },
930         },
931         {
932                 /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
933                 .driver_data = (void *)&chuwi_vi8_data,
934                 .matches = {
935                         DMI_MATCH(DMI_SYS_VENDOR, "YOURS"),
936                         DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"),
937                 },
938         },
939         { },
940 };
941
942 static const struct ts_dmi_data *ts_data;
943
944 static void ts_dmi_add_props(struct i2c_client *client)
945 {
946         struct device *dev = &client->dev;
947         int error;
948
949         if (has_acpi_companion(dev) &&
950             !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
951                 error = device_add_properties(dev, ts_data->properties);
952                 if (error)
953                         dev_err(dev, "failed to add properties: %d\n", error);
954         }
955 }
956
957 static int ts_dmi_notifier_call(struct notifier_block *nb,
958                                        unsigned long action, void *data)
959 {
960         struct device *dev = data;
961         struct i2c_client *client;
962
963         switch (action) {
964         case BUS_NOTIFY_ADD_DEVICE:
965                 client = i2c_verify_client(dev);
966                 if (client)
967                         ts_dmi_add_props(client);
968                 break;
969
970         default:
971                 break;
972         }
973
974         return 0;
975 }
976
977 static struct notifier_block ts_dmi_notifier = {
978         .notifier_call = ts_dmi_notifier_call,
979 };
980
981 static int __init ts_dmi_init(void)
982 {
983         const struct dmi_system_id *dmi_id;
984         int error;
985
986         dmi_id = dmi_first_match(touchscreen_dmi_table);
987         if (!dmi_id)
988                 return 0; /* Not an error */
989
990         ts_data = dmi_id->driver_data;
991
992         error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
993         if (error)
994                 pr_err("%s: failed to register i2c bus notifier: %d\n",
995                         __func__, error);
996
997         return error;
998 }
999
1000 /*
1001  * We are registering out notifier after i2c core is initialized and i2c bus
1002  * itself is ready (which happens at postcore initcall level), but before
1003  * ACPI starts enumerating devices (at subsys initcall level).
1004  */
1005 arch_initcall(ts_dmi_init);