1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Touchscreen driver DMI based configuration code
5 * Copyright (c) 2017 Red Hat Inc.
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_vi8_props[] = {
91 PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
92 PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
93 PROPERTY_ENTRY_U32("touchscreen-size-x", 1724),
94 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
95 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
96 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-vi8.fw"),
97 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
98 PROPERTY_ENTRY_BOOL("silead,home-button"),
102 static const struct ts_dmi_data chuwi_vi8_data = {
103 .acpi_name = "MSSL1680:00",
104 .properties = chuwi_vi8_props,
107 static const struct property_entry chuwi_vi10_props[] = {
108 PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
109 PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
110 PROPERTY_ENTRY_U32("touchscreen-size-x", 1858),
111 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
112 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-vi10.fw"),
113 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
114 PROPERTY_ENTRY_BOOL("silead,home-button"),
118 static const struct ts_dmi_data chuwi_vi10_data = {
119 .acpi_name = "MSSL0002:00",
120 .properties = chuwi_vi10_props,
123 static const struct property_entry connect_tablet9_props[] = {
124 PROPERTY_ENTRY_U32("touchscreen-min-x", 9),
125 PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
126 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
127 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
128 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
129 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
130 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-connect-tablet9.fw"),
131 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
135 static const struct ts_dmi_data connect_tablet9_data = {
136 .acpi_name = "MSSL1680:00",
137 .properties = connect_tablet9_props,
140 static const struct property_entry cube_iwork8_air_props[] = {
141 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
142 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
143 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
144 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
145 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
146 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-cube-iwork8-air.fw"),
147 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
151 static const struct ts_dmi_data cube_iwork8_air_data = {
152 .acpi_name = "MSSL1680:00",
153 .properties = cube_iwork8_air_props,
156 static const struct property_entry cube_knote_i1101_props[] = {
157 PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
158 PROPERTY_ENTRY_U32("touchscreen-min-y", 22),
159 PROPERTY_ENTRY_U32("touchscreen-size-x", 1961),
160 PROPERTY_ENTRY_U32("touchscreen-size-y", 1513),
161 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-cube-knote-i1101.fw"),
162 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
163 PROPERTY_ENTRY_BOOL("silead,home-button"),
167 static const struct ts_dmi_data cube_knote_i1101_data = {
168 .acpi_name = "MSSL1680:00",
169 .properties = cube_knote_i1101_props,
172 static const struct property_entry dexp_ursus_7w_props[] = {
173 PROPERTY_ENTRY_U32("touchscreen-size-x", 890),
174 PROPERTY_ENTRY_U32("touchscreen-size-y", 630),
175 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-dexp-ursus-7w.fw"),
176 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
177 PROPERTY_ENTRY_BOOL("silead,home-button"),
181 static const struct ts_dmi_data dexp_ursus_7w_data = {
182 .acpi_name = "MSSL1680:00",
183 .properties = dexp_ursus_7w_props,
186 static const struct property_entry digma_citi_e200_props[] = {
187 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
188 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
189 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
190 PROPERTY_ENTRY_STRING("firmware-name",
191 "gsl1686-digma_citi_e200.fw"),
192 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
193 PROPERTY_ENTRY_BOOL("silead,home-button"),
197 static const struct ts_dmi_data digma_citi_e200_data = {
198 .acpi_name = "MSSL1680:00",
199 .properties = digma_citi_e200_props,
202 static const struct property_entry gp_electronic_t701_props[] = {
203 PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
204 PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
205 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
206 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
207 PROPERTY_ENTRY_STRING("firmware-name",
208 "gsl1680-gp-electronic-t701.fw"),
212 static const struct ts_dmi_data gp_electronic_t701_data = {
213 .acpi_name = "MSSL1680:00",
214 .properties = gp_electronic_t701_props,
217 static const struct property_entry itworks_tw891_props[] = {
218 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
219 PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
220 PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
221 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
222 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
223 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
224 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
225 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
229 static const struct ts_dmi_data itworks_tw891_data = {
230 .acpi_name = "MSSL1680:00",
231 .properties = itworks_tw891_props,
234 static const struct property_entry jumper_ezpad_6_pro_props[] = {
235 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
236 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
237 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"),
238 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
239 PROPERTY_ENTRY_BOOL("silead,home-button"),
243 static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
244 .acpi_name = "MSSL1680:00",
245 .properties = jumper_ezpad_6_pro_props,
248 static const struct property_entry jumper_ezpad_6_pro_b_props[] = {
249 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
250 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
251 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro-b.fw"),
252 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
253 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
254 PROPERTY_ENTRY_BOOL("silead,home-button"),
258 static const struct ts_dmi_data jumper_ezpad_6_pro_b_data = {
259 .acpi_name = "MSSL1680:00",
260 .properties = jumper_ezpad_6_pro_b_props,
263 static const struct property_entry jumper_ezpad_mini3_props[] = {
264 PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
265 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
266 PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
267 PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
268 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
269 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
270 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
274 static const struct ts_dmi_data jumper_ezpad_mini3_data = {
275 .acpi_name = "MSSL1680:00",
276 .properties = jumper_ezpad_mini3_props,
279 static const struct property_entry myria_my8307_props[] = {
280 PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
281 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
282 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
283 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
284 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
285 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-myria-my8307.fw"),
286 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
287 PROPERTY_ENTRY_BOOL("silead,home-button"),
291 static const struct ts_dmi_data myria_my8307_data = {
292 .acpi_name = "MSSL1680:00",
293 .properties = myria_my8307_props,
296 static const struct property_entry onda_obook_20_plus_props[] = {
297 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
298 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
299 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
300 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
301 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
302 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
303 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
304 PROPERTY_ENTRY_BOOL("silead,home-button"),
308 static const struct ts_dmi_data onda_obook_20_plus_data = {
309 .acpi_name = "MSSL1680:00",
310 .properties = onda_obook_20_plus_props,
313 static const struct property_entry onda_v80_plus_v3_props[] = {
314 PROPERTY_ENTRY_U32("touchscreen-min-x", 22),
315 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
316 PROPERTY_ENTRY_U32("touchscreen-size-x", 1698),
317 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
318 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
319 PROPERTY_ENTRY_STRING("firmware-name",
320 "gsl3676-onda-v80-plus-v3.fw"),
321 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
322 PROPERTY_ENTRY_BOOL("silead,home-button"),
326 static const struct ts_dmi_data onda_v80_plus_v3_data = {
327 .acpi_name = "MSSL1680:00",
328 .properties = onda_v80_plus_v3_props,
331 static const struct property_entry onda_v820w_32g_props[] = {
332 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
333 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
334 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
335 PROPERTY_ENTRY_STRING("firmware-name",
336 "gsl1680-onda-v820w-32g.fw"),
337 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
338 PROPERTY_ENTRY_BOOL("silead,home-button"),
342 static const struct ts_dmi_data onda_v820w_32g_data = {
343 .acpi_name = "MSSL1680:00",
344 .properties = onda_v820w_32g_props,
347 static const struct property_entry onda_v891w_v1_props[] = {
348 PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
349 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
350 PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
351 PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
352 PROPERTY_ENTRY_STRING("firmware-name",
353 "gsl3680-onda-v891w-v1.fw"),
354 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
355 PROPERTY_ENTRY_BOOL("silead,home-button"),
359 static const struct ts_dmi_data onda_v891w_v1_data = {
360 .acpi_name = "MSSL1680:00",
361 .properties = onda_v891w_v1_props,
364 static const struct property_entry onda_v891w_v3_props[] = {
365 PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
366 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
367 PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
368 PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
369 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
370 PROPERTY_ENTRY_STRING("firmware-name",
371 "gsl3676-onda-v891w-v3.fw"),
372 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
373 PROPERTY_ENTRY_BOOL("silead,home-button"),
377 static const struct ts_dmi_data onda_v891w_v3_data = {
378 .acpi_name = "MSSL1680:00",
379 .properties = onda_v891w_v3_props,
382 static const struct property_entry pipo_w2s_props[] = {
383 PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
384 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
385 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
386 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
387 PROPERTY_ENTRY_STRING("firmware-name",
388 "gsl1680-pipo-w2s.fw"),
392 static const struct ts_dmi_data pipo_w2s_data = {
393 .acpi_name = "MSSL1680:00",
394 .properties = pipo_w2s_props,
397 static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
398 PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
399 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
400 PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
401 PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
402 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
403 PROPERTY_ENTRY_STRING("firmware-name",
404 "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
405 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
406 PROPERTY_ENTRY_BOOL("silead,home-button"),
410 static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
411 .acpi_name = "MSSL1680:00",
412 .properties = pov_mobii_wintab_p800w_v20_props,
415 static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
416 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
417 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
418 PROPERTY_ENTRY_U32("touchscreen-size-x", 1794),
419 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
420 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
421 PROPERTY_ENTRY_STRING("firmware-name",
422 "gsl3692-pov-mobii-wintab-p800w.fw"),
423 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
424 PROPERTY_ENTRY_BOOL("silead,home-button"),
428 static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
429 .acpi_name = "MSSL1680:00",
430 .properties = pov_mobii_wintab_p800w_v21_props,
433 static const struct property_entry pov_mobii_wintab_p1006w_v10_props[] = {
434 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
435 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
436 PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
437 PROPERTY_ENTRY_U32("touchscreen-size-y", 1520),
438 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
439 PROPERTY_ENTRY_STRING("firmware-name",
440 "gsl3692-pov-mobii-wintab-p1006w-v10.fw"),
441 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
442 PROPERTY_ENTRY_BOOL("silead,home-button"),
446 static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = {
447 .acpi_name = "MSSL1680:00",
448 .properties = pov_mobii_wintab_p1006w_v10_props,
451 static const struct property_entry teclast_x3_plus_props[] = {
452 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
453 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
454 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"),
455 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
456 PROPERTY_ENTRY_BOOL("silead,home-button"),
460 static const struct ts_dmi_data teclast_x3_plus_data = {
461 .acpi_name = "MSSL1680:00",
462 .properties = teclast_x3_plus_props,
465 static const struct property_entry teclast_x98plus2_props[] = {
466 PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
467 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
468 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
469 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
470 PROPERTY_ENTRY_STRING("firmware-name",
471 "gsl1686-teclast_x98plus2.fw"),
472 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
476 static const struct ts_dmi_data teclast_x98plus2_data = {
477 .acpi_name = "MSSL1680:00",
478 .properties = teclast_x98plus2_props,
481 static const struct property_entry trekstor_primebook_c11_props[] = {
482 PROPERTY_ENTRY_U32("touchscreen-size-x", 1970),
483 PROPERTY_ENTRY_U32("touchscreen-size-y", 1530),
484 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
485 PROPERTY_ENTRY_STRING("firmware-name",
486 "gsl1680-trekstor-primebook-c11.fw"),
487 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
488 PROPERTY_ENTRY_BOOL("silead,home-button"),
492 static const struct ts_dmi_data trekstor_primebook_c11_data = {
493 .acpi_name = "MSSL1680:00",
494 .properties = trekstor_primebook_c11_props,
497 static const struct property_entry trekstor_primebook_c13_props[] = {
498 PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
499 PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
500 PROPERTY_ENTRY_STRING("firmware-name",
501 "gsl1680-trekstor-primebook-c13.fw"),
502 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
503 PROPERTY_ENTRY_BOOL("silead,home-button"),
507 static const struct ts_dmi_data trekstor_primebook_c13_data = {
508 .acpi_name = "MSSL1680:00",
509 .properties = trekstor_primebook_c13_props,
512 static const struct property_entry trekstor_primetab_t13b_props[] = {
513 PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
514 PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
515 PROPERTY_ENTRY_STRING("firmware-name",
516 "gsl1680-trekstor-primetab-t13b.fw"),
517 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
518 PROPERTY_ENTRY_BOOL("silead,home-button"),
519 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
523 static const struct ts_dmi_data trekstor_primetab_t13b_data = {
524 .acpi_name = "MSSL1680:00",
525 .properties = trekstor_primetab_t13b_props,
528 static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
529 PROPERTY_ENTRY_U32("touchscreen-size-x", 1900),
530 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
531 PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
532 PROPERTY_ENTRY_STRING("firmware-name",
533 "gsl3670-surftab-twin-10-1-st10432-8.fw"),
534 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
538 static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
539 .acpi_name = "MSSL1680:00",
540 .properties = trekstor_surftab_twin_10_1_props,
543 static const struct property_entry trekstor_surftab_wintron70_props[] = {
544 PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
545 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
546 PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
547 PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
548 PROPERTY_ENTRY_STRING("firmware-name",
549 "gsl1686-surftab-wintron70-st70416-6.fw"),
550 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
551 PROPERTY_ENTRY_BOOL("silead,home-button"),
555 static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
556 .acpi_name = "MSSL1680:00",
557 .properties = trekstor_surftab_wintron70_props,
560 /* NOTE: Please keep this table sorted alphabetically */
561 static const struct dmi_system_id touchscreen_dmi_table[] = {
564 .driver_data = (void *)&chuwi_hi8_data,
566 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
567 DMI_MATCH(DMI_PRODUCT_NAME, "S806"),
571 /* Chuwi Hi8 (H1D_S806_206) */
572 .driver_data = (void *)&chuwi_hi8_data,
574 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
575 DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
576 DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"),
580 /* Chuwi Hi8 Air (CWI543) */
581 .driver_data = (void *)&chuwi_hi8_air_data,
583 DMI_MATCH(DMI_BOARD_VENDOR, "Default string"),
584 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
585 DMI_MATCH(DMI_PRODUCT_NAME, "Hi8 Air"),
589 /* Chuwi Hi8 Pro (CWI513) */
590 .driver_data = (void *)&chuwi_hi8_pro_data,
592 DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
593 DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
598 .driver_data = (void *)&chuwi_hi10_air_data,
600 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
601 DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"),
605 /* Chuwi Vi8 (CWI506) */
606 .driver_data = (void *)&chuwi_vi8_data,
608 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
609 DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
610 DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
614 /* Chuwi Vi10 (CWI505) */
615 .driver_data = (void *)&chuwi_vi10_data,
617 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
618 DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"),
619 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
620 DMI_MATCH(DMI_PRODUCT_NAME, "S165"),
624 /* Connect Tablet 9 */
625 .driver_data = (void *)&connect_tablet9_data,
627 DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
628 DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
632 /* CUBE iwork8 Air */
633 .driver_data = (void *)&cube_iwork8_air_data,
635 DMI_MATCH(DMI_SYS_VENDOR, "cube"),
636 DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"),
637 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
641 /* Cube KNote i1101 */
642 .driver_data = (void *)&cube_knote_i1101_data,
644 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
645 DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"),
646 DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"),
647 DMI_MATCH(DMI_PRODUCT_NAME, "i1101"),
652 .driver_data = (void *)&dexp_ursus_7w_data,
654 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
655 DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
659 /* Digma Citi E200 */
660 .driver_data = (void *)&digma_citi_e200_data,
662 DMI_MATCH(DMI_SYS_VENDOR, "Digma"),
663 DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"),
664 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
668 /* GP-electronic T701 */
669 .driver_data = (void *)&gp_electronic_t701_data,
671 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
672 DMI_MATCH(DMI_PRODUCT_NAME, "T701"),
673 DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"),
677 /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
678 .driver_data = (void *)&trekstor_surftab_wintron70_data,
680 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
681 DMI_MATCH(DMI_PRODUCT_NAME, "i71c"),
682 DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"),
686 /* I.T.Works TW891 */
687 .driver_data = (void *)&itworks_tw891_data,
689 DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
690 DMI_MATCH(DMI_PRODUCT_NAME, "TW891"),
694 /* Jumper EZpad 6 Pro */
695 .driver_data = (void *)&jumper_ezpad_6_pro_data,
697 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
698 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
699 DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
700 /* Above matches are too generic, add bios-date match */
701 DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"),
705 /* Jumper EZpad 6 Pro B */
706 .driver_data = (void *)&jumper_ezpad_6_pro_b_data,
708 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
709 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
710 DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
711 /* Above matches are too generic, add bios-date match */
712 DMI_MATCH(DMI_BIOS_DATE, "04/24/2018"),
716 /* Jumper EZpad mini3 */
717 .driver_data = (void *)&jumper_ezpad_mini3_data,
719 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
720 /* jumperx.T87.KFBNEEA02 with the version-nr dropped */
721 DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
725 /* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */
726 .driver_data = (void *)&trekstor_primebook_c11_data,
728 DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"),
729 DMI_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"),
734 .driver_data = (void *)&myria_my8307_data,
736 DMI_MATCH(DMI_SYS_VENDOR, "Complet Electro Serv"),
737 DMI_MATCH(DMI_PRODUCT_NAME, "MY8307"),
741 /* Onda oBook 20 Plus */
742 .driver_data = (void *)&onda_obook_20_plus_data,
744 DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
745 DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
749 /* ONDA V80 plus v3 (P80PSBG9V3A01501) */
750 .driver_data = (void *)&onda_v80_plus_v3_data,
752 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONDA"),
753 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V80 PLUS")
757 /* ONDA V820w DualOS */
758 .driver_data = (void *)&onda_v820w_32g_data,
760 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
761 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS")
765 /* ONDA V891w revision P891WBEBV1B00 aka v1 */
766 .driver_data = (void *)&onda_v891w_v1_data,
768 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
769 DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"),
770 DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"),
771 /* Exact match, different versions need different fw */
772 DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
776 /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
777 .driver_data = (void *)&onda_v891w_v3_data,
779 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
780 DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
781 DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
786 .driver_data = (void *)&pipo_w2s_data,
788 DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
789 DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
793 /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
794 .driver_data = (void *)&trekstor_surftab_wintron70_data,
796 DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"),
797 DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"),
798 /* Exact match, different versions need different fw */
799 DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"),
803 /* Point of View mobii wintab p800w (v2.0) */
804 .driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
806 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
807 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
808 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"),
809 /* Above matches are too generic, add bios-date match */
810 DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
814 /* Point of View mobii wintab p800w (v2.1) */
815 .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
817 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
818 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
819 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"),
820 /* Above matches are too generic, add bios-date match */
821 DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"),
825 /* Point of View mobii wintab p1006w (v1.0) */
826 .driver_data = (void *)&pov_mobii_wintab_p1006w_v10_data,
828 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
829 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
830 /* Note 105b is Foxcon's USB/PCI vendor id */
831 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"),
832 DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
836 /* Teclast X3 Plus */
837 .driver_data = (void *)&teclast_x3_plus_data,
839 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
840 DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
841 DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
845 /* Teclast X98 Plus II */
846 .driver_data = (void *)&teclast_x98plus2_data,
848 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
849 DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
853 /* Trekstor Primebook C11 */
854 .driver_data = (void *)&trekstor_primebook_c11_data,
856 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
857 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"),
861 /* Trekstor Primebook C13 */
862 .driver_data = (void *)&trekstor_primebook_c13_data,
864 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
865 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
869 /* Trekstor Primetab T13B */
870 .driver_data = (void *)&trekstor_primetab_t13b_data,
872 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
873 DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"),
877 /* TrekStor SurfTab twin 10.1 ST10432-8 */
878 .driver_data = (void *)&trekstor_surftab_twin_10_1_data,
880 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
881 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
885 /* Trekstor Surftab Wintron 7.0 ST70416-6 */
886 .driver_data = (void *)&trekstor_surftab_wintron70_data,
888 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
889 DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"),
890 /* Exact match, different versions need different fw */
891 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"),
895 /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
896 .driver_data = (void *)&trekstor_surftab_wintron70_data,
898 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
899 DMI_MATCH(DMI_PRODUCT_NAME,
900 "SurfTab wintron 7.0 ST70416-6"),
901 /* Exact match, different versions need different fw */
902 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
906 /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
907 .driver_data = (void *)&chuwi_vi8_data,
909 DMI_MATCH(DMI_SYS_VENDOR, "YOURS"),
910 DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"),
916 static const struct ts_dmi_data *ts_data;
918 static void ts_dmi_add_props(struct i2c_client *client)
920 struct device *dev = &client->dev;
923 if (has_acpi_companion(dev) &&
924 !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
925 error = device_add_properties(dev, ts_data->properties);
927 dev_err(dev, "failed to add properties: %d\n", error);
931 static int ts_dmi_notifier_call(struct notifier_block *nb,
932 unsigned long action, void *data)
934 struct device *dev = data;
935 struct i2c_client *client;
938 case BUS_NOTIFY_ADD_DEVICE:
939 client = i2c_verify_client(dev);
941 ts_dmi_add_props(client);
951 static struct notifier_block ts_dmi_notifier = {
952 .notifier_call = ts_dmi_notifier_call,
955 static int __init ts_dmi_init(void)
957 const struct dmi_system_id *dmi_id;
960 dmi_id = dmi_first_match(touchscreen_dmi_table);
962 return 0; /* Not an error */
964 ts_data = dmi_id->driver_data;
966 error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
968 pr_err("%s: failed to register i2c bus notifier: %d\n",
975 * We are registering out notifier after i2c core is initialized and i2c bus
976 * itself is ready (which happens at postcore initcall level), but before
977 * ACPI starts enumerating devices (at subsys initcall level).
979 arch_initcall(ts_dmi_init);