1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Touchscreen driver DMI based configuration code
5 * Copyright (c) 2017 Red Hat Inc.
8 * Hans de Goede <hdegoede@redhat.com>
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>
20 const char *acpi_name;
21 const struct property_entry *properties;
24 /* NOTE: Please keep all entries sorted alphabetically */
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"),
35 static const struct ts_dmi_data chuwi_hi8_data = {
36 .acpi_name = "MSSL0001:00",
37 .properties = chuwi_hi8_props,
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),
49 static const struct ts_dmi_data chuwi_hi8_air_data = {
50 .acpi_name = "MSSL1680:00",
51 .properties = chuwi_hi8_air_props,
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"),
66 static const struct ts_dmi_data chuwi_hi8_pro_data = {
67 .acpi_name = "MSSL1680:00",
68 .properties = chuwi_hi8_pro_props,
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"),
85 static const struct ts_dmi_data chuwi_hi10_air_data = {
86 .acpi_name = "MSSL1680:00",
87 .properties = chuwi_hi10_air_props,
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"),
101 static const struct ts_dmi_data chuwi_hi10_plus_data = {
102 .acpi_name = "MSSL0017:00",
103 .properties = chuwi_hi10_plus_props,
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"),
118 static const struct ts_dmi_data chuwi_vi8_data = {
119 .acpi_name = "MSSL1680:00",
120 .properties = chuwi_vi8_props,
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"),
134 static const struct ts_dmi_data chuwi_vi10_data = {
135 .acpi_name = "MSSL0002:00",
136 .properties = chuwi_vi10_props,
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),
151 static const struct ts_dmi_data connect_tablet9_data = {
152 .acpi_name = "MSSL1680:00",
153 .properties = connect_tablet9_props,
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),
167 static const struct ts_dmi_data cube_iwork8_air_data = {
168 .acpi_name = "MSSL1680:00",
169 .properties = cube_iwork8_air_props,
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"),
183 static const struct ts_dmi_data cube_knote_i1101_data = {
184 .acpi_name = "MSSL1680:00",
185 .properties = cube_knote_i1101_props,
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"),
197 static const struct ts_dmi_data dexp_ursus_7w_data = {
198 .acpi_name = "MSSL1680:00",
199 .properties = dexp_ursus_7w_props,
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"),
213 static const struct ts_dmi_data digma_citi_e200_data = {
214 .acpi_name = "MSSL1680:00",
215 .properties = digma_citi_e200_props,
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"),
228 static const struct ts_dmi_data gp_electronic_t701_data = {
229 .acpi_name = "MSSL1680:00",
230 .properties = gp_electronic_t701_props,
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),
245 static const struct ts_dmi_data itworks_tw891_data = {
246 .acpi_name = "MSSL1680:00",
247 .properties = itworks_tw891_props,
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"),
259 static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
260 .acpi_name = "MSSL1680:00",
261 .properties = jumper_ezpad_6_pro_props,
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"),
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,
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),
290 static const struct ts_dmi_data jumper_ezpad_mini3_data = {
291 .acpi_name = "MSSL1680:00",
292 .properties = jumper_ezpad_mini3_props,
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"),
307 static const struct ts_dmi_data myria_my8307_data = {
308 .acpi_name = "MSSL1680:00",
309 .properties = myria_my8307_props,
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"),
324 static const struct ts_dmi_data onda_obook_20_plus_data = {
325 .acpi_name = "MSSL1680:00",
326 .properties = onda_obook_20_plus_props,
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"),
342 static const struct ts_dmi_data onda_v80_plus_v3_data = {
343 .acpi_name = "MSSL1680:00",
344 .properties = onda_v80_plus_v3_props,
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"),
358 static const struct ts_dmi_data onda_v820w_32g_data = {
359 .acpi_name = "MSSL1680:00",
360 .properties = onda_v820w_32g_props,
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"),
375 static const struct ts_dmi_data onda_v891w_v1_data = {
376 .acpi_name = "MSSL1680:00",
377 .properties = onda_v891w_v1_props,
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"),
393 static const struct ts_dmi_data onda_v891w_v3_data = {
394 .acpi_name = "MSSL1680:00",
395 .properties = onda_v891w_v3_props,
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"),
408 static const struct ts_dmi_data pipo_w2s_data = {
409 .acpi_name = "MSSL1680:00",
410 .properties = pipo_w2s_props,
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"),
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,
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"),
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,
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"),
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,
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"),
476 static const struct ts_dmi_data teclast_x3_plus_data = {
477 .acpi_name = "MSSL1680:00",
478 .properties = teclast_x3_plus_props,
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),
492 static const struct ts_dmi_data teclast_x98plus2_data = {
493 .acpi_name = "MSSL1680:00",
494 .properties = teclast_x98plus2_props,
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"),
508 static const struct ts_dmi_data trekstor_primebook_c11_data = {
509 .acpi_name = "MSSL1680:00",
510 .properties = trekstor_primebook_c11_props,
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"),
523 static const struct ts_dmi_data trekstor_primebook_c13_data = {
524 .acpi_name = "MSSL1680:00",
525 .properties = trekstor_primebook_c13_props,
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"),
539 static const struct ts_dmi_data trekstor_primetab_t13b_data = {
540 .acpi_name = "MSSL1680:00",
541 .properties = trekstor_primetab_t13b_props,
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),
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,
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"),
571 static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
572 .acpi_name = "MSSL1680:00",
573 .properties = trekstor_surftab_wintron70_props,
576 /* NOTE: Please keep this table sorted alphabetically */
577 static const struct dmi_system_id touchscreen_dmi_table[] = {
580 .driver_data = (void *)&chuwi_hi8_data,
582 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
583 DMI_MATCH(DMI_PRODUCT_NAME, "S806"),
587 /* Chuwi Hi8 (H1D_S806_206) */
588 .driver_data = (void *)&chuwi_hi8_data,
590 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
591 DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
592 DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"),
596 /* Chuwi Hi8 Air (CWI543) */
597 .driver_data = (void *)&chuwi_hi8_air_data,
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"),
605 /* Chuwi Hi8 Pro (CWI513) */
606 .driver_data = (void *)&chuwi_hi8_pro_data,
608 DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
609 DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
614 .driver_data = (void *)&chuwi_hi10_air_data,
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"),
622 /* Chuwi Hi10 Plus (CWI527) */
623 .driver_data = (void *)&chuwi_hi10_plus_data,
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"),
631 /* Chuwi Vi8 (CWI506) */
632 .driver_data = (void *)&chuwi_vi8_data,
634 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
635 DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
636 DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
640 /* Chuwi Vi10 (CWI505) */
641 .driver_data = (void *)&chuwi_vi10_data,
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"),
650 /* Connect Tablet 9 */
651 .driver_data = (void *)&connect_tablet9_data,
653 DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
654 DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
658 /* CUBE iwork8 Air */
659 .driver_data = (void *)&cube_iwork8_air_data,
661 DMI_MATCH(DMI_SYS_VENDOR, "cube"),
662 DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"),
663 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
667 /* Cube KNote i1101 */
668 .driver_data = (void *)&cube_knote_i1101_data,
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"),
678 .driver_data = (void *)&dexp_ursus_7w_data,
680 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
681 DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
685 /* Digma Citi E200 */
686 .driver_data = (void *)&digma_citi_e200_data,
688 DMI_MATCH(DMI_SYS_VENDOR, "Digma"),
689 DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"),
690 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
694 /* GP-electronic T701 */
695 .driver_data = (void *)&gp_electronic_t701_data,
697 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
698 DMI_MATCH(DMI_PRODUCT_NAME, "T701"),
699 DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"),
703 /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
704 .driver_data = (void *)&trekstor_surftab_wintron70_data,
706 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
707 DMI_MATCH(DMI_PRODUCT_NAME, "i71c"),
708 DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"),
712 /* I.T.Works TW891 */
713 .driver_data = (void *)&itworks_tw891_data,
715 DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
716 DMI_MATCH(DMI_PRODUCT_NAME, "TW891"),
720 /* Jumper EZpad 6 Pro */
721 .driver_data = (void *)&jumper_ezpad_6_pro_data,
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"),
731 /* Jumper EZpad 6 Pro B */
732 .driver_data = (void *)&jumper_ezpad_6_pro_b_data,
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"),
742 /* Jumper EZpad mini3 */
743 .driver_data = (void *)&jumper_ezpad_mini3_data,
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"),
751 /* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */
752 .driver_data = (void *)&trekstor_primebook_c11_data,
754 DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"),
755 DMI_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"),
760 .driver_data = (void *)&myria_my8307_data,
762 DMI_MATCH(DMI_SYS_VENDOR, "Complet Electro Serv"),
763 DMI_MATCH(DMI_PRODUCT_NAME, "MY8307"),
767 /* Onda oBook 20 Plus */
768 .driver_data = (void *)&onda_obook_20_plus_data,
770 DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
771 DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
775 /* ONDA V80 plus v3 (P80PSBG9V3A01501) */
776 .driver_data = (void *)&onda_v80_plus_v3_data,
778 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONDA"),
779 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V80 PLUS")
783 /* ONDA V820w DualOS */
784 .driver_data = (void *)&onda_v820w_32g_data,
786 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
787 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS")
791 /* ONDA V891w revision P891WBEBV1B00 aka v1 */
792 .driver_data = (void *)&onda_v891w_v1_data,
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"),
802 /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
803 .driver_data = (void *)&onda_v891w_v3_data,
805 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
806 DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
807 DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
812 .driver_data = (void *)&pipo_w2s_data,
814 DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
815 DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
819 /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
820 .driver_data = (void *)&trekstor_surftab_wintron70_data,
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"),
829 /* Point of View mobii wintab p800w (v2.0) */
830 .driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
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"),
840 /* Point of View mobii wintab p800w (v2.1) */
841 .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
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"),
851 /* Point of View mobii wintab p1006w (v1.0) */
852 .driver_data = (void *)&pov_mobii_wintab_p1006w_v10_data,
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"),
862 /* Teclast X3 Plus */
863 .driver_data = (void *)&teclast_x3_plus_data,
865 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
866 DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
867 DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
871 /* Teclast X98 Plus II */
872 .driver_data = (void *)&teclast_x98plus2_data,
874 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
875 DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
879 /* Trekstor Primebook C11 */
880 .driver_data = (void *)&trekstor_primebook_c11_data,
882 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
883 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"),
887 /* Trekstor Primebook C13 */
888 .driver_data = (void *)&trekstor_primebook_c13_data,
890 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
891 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
895 /* Trekstor Primetab T13B */
896 .driver_data = (void *)&trekstor_primetab_t13b_data,
898 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
899 DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"),
903 /* TrekStor SurfTab twin 10.1 ST10432-8 */
904 .driver_data = (void *)&trekstor_surftab_twin_10_1_data,
906 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
907 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
911 /* Trekstor Surftab Wintron 7.0 ST70416-6 */
912 .driver_data = (void *)&trekstor_surftab_wintron70_data,
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"),
921 /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
922 .driver_data = (void *)&trekstor_surftab_wintron70_data,
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"),
932 /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
933 .driver_data = (void *)&chuwi_vi8_data,
935 DMI_MATCH(DMI_SYS_VENDOR, "YOURS"),
936 DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"),
942 static const struct ts_dmi_data *ts_data;
944 static void ts_dmi_add_props(struct i2c_client *client)
946 struct device *dev = &client->dev;
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);
953 dev_err(dev, "failed to add properties: %d\n", error);
957 static int ts_dmi_notifier_call(struct notifier_block *nb,
958 unsigned long action, void *data)
960 struct device *dev = data;
961 struct i2c_client *client;
964 case BUS_NOTIFY_ADD_DEVICE:
965 client = i2c_verify_client(dev);
967 ts_dmi_add_props(client);
977 static struct notifier_block ts_dmi_notifier = {
978 .notifier_call = ts_dmi_notifier_call,
981 static int __init ts_dmi_init(void)
983 const struct dmi_system_id *dmi_id;
986 dmi_id = dmi_first_match(touchscreen_dmi_table);
988 return 0; /* Not an error */
990 ts_data = dmi_id->driver_data;
992 error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
994 pr_err("%s: failed to register i2c bus notifier: %d\n",
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).
1005 arch_initcall(ts_dmi_init);