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_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 chuwi_surbook_mini_props[] = {
140 PROPERTY_ENTRY_U32("touchscreen-min-x", 88),
141 PROPERTY_ENTRY_U32("touchscreen-min-y", 13),
142 PROPERTY_ENTRY_U32("touchscreen-size-x", 2040),
143 PROPERTY_ENTRY_U32("touchscreen-size-y", 1524),
144 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-surbook-mini.fw"),
145 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
146 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
150 static const struct ts_dmi_data chuwi_surbook_mini_data = {
151 .acpi_name = "MSSL1680:00",
152 .properties = chuwi_surbook_mini_props,
155 static const struct property_entry connect_tablet9_props[] = {
156 PROPERTY_ENTRY_U32("touchscreen-min-x", 9),
157 PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
158 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
159 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
160 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
161 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
162 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-connect-tablet9.fw"),
163 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
167 static const struct ts_dmi_data connect_tablet9_data = {
168 .acpi_name = "MSSL1680:00",
169 .properties = connect_tablet9_props,
172 static const struct property_entry cube_iwork8_air_props[] = {
173 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
174 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
175 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
176 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
177 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
178 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-cube-iwork8-air.fw"),
179 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
183 static const struct ts_dmi_data cube_iwork8_air_data = {
184 .acpi_name = "MSSL1680:00",
185 .properties = cube_iwork8_air_props,
188 static const struct property_entry cube_knote_i1101_props[] = {
189 PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
190 PROPERTY_ENTRY_U32("touchscreen-min-y", 22),
191 PROPERTY_ENTRY_U32("touchscreen-size-x", 1961),
192 PROPERTY_ENTRY_U32("touchscreen-size-y", 1513),
193 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-cube-knote-i1101.fw"),
194 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
195 PROPERTY_ENTRY_BOOL("silead,home-button"),
199 static const struct ts_dmi_data cube_knote_i1101_data = {
200 .acpi_name = "MSSL1680:00",
201 .properties = cube_knote_i1101_props,
204 static const struct property_entry dexp_ursus_7w_props[] = {
205 PROPERTY_ENTRY_U32("touchscreen-size-x", 890),
206 PROPERTY_ENTRY_U32("touchscreen-size-y", 630),
207 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-dexp-ursus-7w.fw"),
208 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
209 PROPERTY_ENTRY_BOOL("silead,home-button"),
213 static const struct ts_dmi_data dexp_ursus_7w_data = {
214 .acpi_name = "MSSL1680:00",
215 .properties = dexp_ursus_7w_props,
218 static const struct property_entry digma_citi_e200_props[] = {
219 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
220 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
221 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
222 PROPERTY_ENTRY_STRING("firmware-name",
223 "gsl1686-digma_citi_e200.fw"),
224 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
225 PROPERTY_ENTRY_BOOL("silead,home-button"),
229 static const struct ts_dmi_data digma_citi_e200_data = {
230 .acpi_name = "MSSL1680:00",
231 .properties = digma_citi_e200_props,
234 static const struct property_entry gp_electronic_t701_props[] = {
235 PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
236 PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
237 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
238 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
239 PROPERTY_ENTRY_STRING("firmware-name",
240 "gsl1680-gp-electronic-t701.fw"),
244 static const struct ts_dmi_data gp_electronic_t701_data = {
245 .acpi_name = "MSSL1680:00",
246 .properties = gp_electronic_t701_props,
249 static const struct property_entry irbis_tw90_props[] = {
250 PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
251 PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
252 PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
253 PROPERTY_ENTRY_U32("touchscreen-min-y", 14),
254 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
255 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
256 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-irbis_tw90.fw"),
257 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
258 PROPERTY_ENTRY_BOOL("silead,home-button"),
262 static const struct ts_dmi_data irbis_tw90_data = {
263 .acpi_name = "MSSL1680:00",
264 .properties = irbis_tw90_props,
267 static const struct property_entry itworks_tw891_props[] = {
268 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
269 PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
270 PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
271 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
272 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
273 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
274 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
275 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
279 static const struct ts_dmi_data itworks_tw891_data = {
280 .acpi_name = "MSSL1680:00",
281 .properties = itworks_tw891_props,
284 static const struct property_entry jumper_ezpad_6_pro_props[] = {
285 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
286 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
287 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"),
288 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
289 PROPERTY_ENTRY_BOOL("silead,home-button"),
293 static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
294 .acpi_name = "MSSL1680:00",
295 .properties = jumper_ezpad_6_pro_props,
298 static const struct property_entry jumper_ezpad_6_pro_b_props[] = {
299 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
300 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
301 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro-b.fw"),
302 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
303 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
304 PROPERTY_ENTRY_BOOL("silead,home-button"),
308 static const struct ts_dmi_data jumper_ezpad_6_pro_b_data = {
309 .acpi_name = "MSSL1680:00",
310 .properties = jumper_ezpad_6_pro_b_props,
313 static const struct property_entry jumper_ezpad_mini3_props[] = {
314 PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
315 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
316 PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
317 PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
318 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
319 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
320 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
324 static const struct ts_dmi_data jumper_ezpad_mini3_data = {
325 .acpi_name = "MSSL1680:00",
326 .properties = jumper_ezpad_mini3_props,
329 static const struct property_entry myria_my8307_props[] = {
330 PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
331 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
332 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
333 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
334 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
335 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-myria-my8307.fw"),
336 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
337 PROPERTY_ENTRY_BOOL("silead,home-button"),
341 static const struct ts_dmi_data myria_my8307_data = {
342 .acpi_name = "MSSL1680:00",
343 .properties = myria_my8307_props,
346 static const struct property_entry onda_obook_20_plus_props[] = {
347 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
348 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
349 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
350 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
351 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
352 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
353 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
354 PROPERTY_ENTRY_BOOL("silead,home-button"),
358 static const struct ts_dmi_data onda_obook_20_plus_data = {
359 .acpi_name = "MSSL1680:00",
360 .properties = onda_obook_20_plus_props,
363 static const struct property_entry onda_v80_plus_v3_props[] = {
364 PROPERTY_ENTRY_U32("touchscreen-min-x", 22),
365 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
366 PROPERTY_ENTRY_U32("touchscreen-size-x", 1698),
367 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
368 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
369 PROPERTY_ENTRY_STRING("firmware-name",
370 "gsl3676-onda-v80-plus-v3.fw"),
371 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
372 PROPERTY_ENTRY_BOOL("silead,home-button"),
376 static const struct ts_dmi_data onda_v80_plus_v3_data = {
377 .acpi_name = "MSSL1680:00",
378 .properties = onda_v80_plus_v3_props,
381 static const struct property_entry onda_v820w_32g_props[] = {
382 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
383 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
384 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
385 PROPERTY_ENTRY_STRING("firmware-name",
386 "gsl1680-onda-v820w-32g.fw"),
387 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
388 PROPERTY_ENTRY_BOOL("silead,home-button"),
392 static const struct ts_dmi_data onda_v820w_32g_data = {
393 .acpi_name = "MSSL1680:00",
394 .properties = onda_v820w_32g_props,
397 static const struct property_entry onda_v891w_v1_props[] = {
398 PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
399 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
400 PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
401 PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
402 PROPERTY_ENTRY_STRING("firmware-name",
403 "gsl3680-onda-v891w-v1.fw"),
404 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
405 PROPERTY_ENTRY_BOOL("silead,home-button"),
409 static const struct ts_dmi_data onda_v891w_v1_data = {
410 .acpi_name = "MSSL1680:00",
411 .properties = onda_v891w_v1_props,
414 static const struct property_entry onda_v891w_v3_props[] = {
415 PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
416 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
417 PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
418 PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
419 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
420 PROPERTY_ENTRY_STRING("firmware-name",
421 "gsl3676-onda-v891w-v3.fw"),
422 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
423 PROPERTY_ENTRY_BOOL("silead,home-button"),
427 static const struct ts_dmi_data onda_v891w_v3_data = {
428 .acpi_name = "MSSL1680:00",
429 .properties = onda_v891w_v3_props,
432 static const struct property_entry pipo_w2s_props[] = {
433 PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
434 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
435 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
436 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
437 PROPERTY_ENTRY_STRING("firmware-name",
438 "gsl1680-pipo-w2s.fw"),
442 static const struct ts_dmi_data pipo_w2s_data = {
443 .acpi_name = "MSSL1680:00",
444 .properties = pipo_w2s_props,
447 static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
448 PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
449 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
450 PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
451 PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
452 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
453 PROPERTY_ENTRY_STRING("firmware-name",
454 "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
455 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
456 PROPERTY_ENTRY_BOOL("silead,home-button"),
460 static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
461 .acpi_name = "MSSL1680:00",
462 .properties = pov_mobii_wintab_p800w_v20_props,
465 static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
466 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
467 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
468 PROPERTY_ENTRY_U32("touchscreen-size-x", 1794),
469 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
470 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
471 PROPERTY_ENTRY_STRING("firmware-name",
472 "gsl3692-pov-mobii-wintab-p800w.fw"),
473 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
474 PROPERTY_ENTRY_BOOL("silead,home-button"),
478 static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
479 .acpi_name = "MSSL1680:00",
480 .properties = pov_mobii_wintab_p800w_v21_props,
483 static const struct property_entry pov_mobii_wintab_p1006w_v10_props[] = {
484 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
485 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
486 PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
487 PROPERTY_ENTRY_U32("touchscreen-size-y", 1520),
488 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
489 PROPERTY_ENTRY_STRING("firmware-name",
490 "gsl3692-pov-mobii-wintab-p1006w-v10.fw"),
491 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
492 PROPERTY_ENTRY_BOOL("silead,home-button"),
496 static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = {
497 .acpi_name = "MSSL1680:00",
498 .properties = pov_mobii_wintab_p1006w_v10_props,
501 static const struct property_entry teclast_x3_plus_props[] = {
502 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
503 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
504 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"),
505 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
506 PROPERTY_ENTRY_BOOL("silead,home-button"),
510 static const struct ts_dmi_data teclast_x3_plus_data = {
511 .acpi_name = "MSSL1680:00",
512 .properties = teclast_x3_plus_props,
515 static const struct property_entry teclast_x98plus2_props[] = {
516 PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
517 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
518 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
519 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
520 PROPERTY_ENTRY_STRING("firmware-name",
521 "gsl1686-teclast_x98plus2.fw"),
522 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
526 static const struct ts_dmi_data teclast_x98plus2_data = {
527 .acpi_name = "MSSL1680:00",
528 .properties = teclast_x98plus2_props,
531 static const struct property_entry trekstor_primebook_c11_props[] = {
532 PROPERTY_ENTRY_U32("touchscreen-size-x", 1970),
533 PROPERTY_ENTRY_U32("touchscreen-size-y", 1530),
534 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
535 PROPERTY_ENTRY_STRING("firmware-name",
536 "gsl1680-trekstor-primebook-c11.fw"),
537 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
538 PROPERTY_ENTRY_BOOL("silead,home-button"),
542 static const struct ts_dmi_data trekstor_primebook_c11_data = {
543 .acpi_name = "MSSL1680:00",
544 .properties = trekstor_primebook_c11_props,
547 static const struct property_entry trekstor_primebook_c13_props[] = {
548 PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
549 PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
550 PROPERTY_ENTRY_STRING("firmware-name",
551 "gsl1680-trekstor-primebook-c13.fw"),
552 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
553 PROPERTY_ENTRY_BOOL("silead,home-button"),
557 static const struct ts_dmi_data trekstor_primebook_c13_data = {
558 .acpi_name = "MSSL1680:00",
559 .properties = trekstor_primebook_c13_props,
562 static const struct property_entry trekstor_primetab_t13b_props[] = {
563 PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
564 PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
565 PROPERTY_ENTRY_STRING("firmware-name",
566 "gsl1680-trekstor-primetab-t13b.fw"),
567 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
568 PROPERTY_ENTRY_BOOL("silead,home-button"),
569 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
573 static const struct ts_dmi_data trekstor_primetab_t13b_data = {
574 .acpi_name = "MSSL1680:00",
575 .properties = trekstor_primetab_t13b_props,
578 static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
579 PROPERTY_ENTRY_U32("touchscreen-size-x", 1900),
580 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
581 PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
582 PROPERTY_ENTRY_STRING("firmware-name",
583 "gsl3670-surftab-twin-10-1-st10432-8.fw"),
584 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
588 static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
589 .acpi_name = "MSSL1680:00",
590 .properties = trekstor_surftab_twin_10_1_props,
593 static const struct property_entry trekstor_surftab_wintron70_props[] = {
594 PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
595 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
596 PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
597 PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
598 PROPERTY_ENTRY_STRING("firmware-name",
599 "gsl1686-surftab-wintron70-st70416-6.fw"),
600 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
601 PROPERTY_ENTRY_BOOL("silead,home-button"),
605 static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
606 .acpi_name = "MSSL1680:00",
607 .properties = trekstor_surftab_wintron70_props,
610 /* NOTE: Please keep this table sorted alphabetically */
611 static const struct dmi_system_id touchscreen_dmi_table[] = {
614 .driver_data = (void *)&chuwi_hi8_data,
616 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
617 DMI_MATCH(DMI_PRODUCT_NAME, "S806"),
621 /* Chuwi Hi8 (H1D_S806_206) */
622 .driver_data = (void *)&chuwi_hi8_data,
624 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
625 DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
626 DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"),
630 /* Chuwi Hi8 Air (CWI543) */
631 .driver_data = (void *)&chuwi_hi8_air_data,
633 DMI_MATCH(DMI_BOARD_VENDOR, "Default string"),
634 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
635 DMI_MATCH(DMI_PRODUCT_NAME, "Hi8 Air"),
639 /* Chuwi Hi8 Pro (CWI513) */
640 .driver_data = (void *)&chuwi_hi8_pro_data,
642 DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
643 DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
648 .driver_data = (void *)&chuwi_hi10_air_data,
650 DMI_MATCH(DMI_SYS_VENDOR, "CHUWI INNOVATION AND TECHNOLOGY(SHENZHEN)CO.LTD"),
651 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
652 DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"),
656 /* Chuwi Hi10 Plus (CWI527) */
657 .driver_data = (void *)&chuwi_hi10_plus_data,
659 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
660 DMI_MATCH(DMI_PRODUCT_NAME, "Hi10 plus tablet"),
661 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
665 /* Chuwi Vi8 (CWI506) */
666 .driver_data = (void *)&chuwi_vi8_data,
668 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
669 DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
670 DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
674 /* Chuwi Vi10 (CWI505) */
675 .driver_data = (void *)&chuwi_vi10_data,
677 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
678 DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"),
679 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
680 DMI_MATCH(DMI_PRODUCT_NAME, "S165"),
684 /* Chuwi Surbook Mini (CWI540) */
685 .driver_data = (void *)&chuwi_surbook_mini_data,
687 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
688 DMI_MATCH(DMI_PRODUCT_NAME, "C3W6_AP108_4G"),
692 /* Connect Tablet 9 */
693 .driver_data = (void *)&connect_tablet9_data,
695 DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
696 DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
700 /* CUBE iwork8 Air */
701 .driver_data = (void *)&cube_iwork8_air_data,
703 DMI_MATCH(DMI_SYS_VENDOR, "cube"),
704 DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"),
705 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
709 /* Cube KNote i1101 */
710 .driver_data = (void *)&cube_knote_i1101_data,
712 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
713 DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"),
714 DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"),
715 DMI_MATCH(DMI_PRODUCT_NAME, "i1101"),
720 .driver_data = (void *)&dexp_ursus_7w_data,
722 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
723 DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
727 /* Digma Citi E200 */
728 .driver_data = (void *)&digma_citi_e200_data,
730 DMI_MATCH(DMI_SYS_VENDOR, "Digma"),
731 DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"),
732 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
736 /* GP-electronic T701 */
737 .driver_data = (void *)&gp_electronic_t701_data,
739 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
740 DMI_MATCH(DMI_PRODUCT_NAME, "T701"),
741 DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"),
745 /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
746 .driver_data = (void *)&trekstor_surftab_wintron70_data,
748 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
749 DMI_MATCH(DMI_PRODUCT_NAME, "i71c"),
750 DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"),
755 .driver_data = (void *)&irbis_tw90_data,
757 DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"),
758 DMI_MATCH(DMI_PRODUCT_NAME, "TW90"),
762 /* I.T.Works TW891 */
763 .driver_data = (void *)&itworks_tw891_data,
765 DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
766 DMI_MATCH(DMI_PRODUCT_NAME, "TW891"),
770 /* Jumper EZpad 6 Pro */
771 .driver_data = (void *)&jumper_ezpad_6_pro_data,
773 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
774 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
775 DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
776 /* Above matches are too generic, add bios-date match */
777 DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"),
781 /* Jumper EZpad 6 Pro B */
782 .driver_data = (void *)&jumper_ezpad_6_pro_b_data,
784 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
785 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
786 DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
787 /* Above matches are too generic, add bios-date match */
788 DMI_MATCH(DMI_BIOS_DATE, "04/24/2018"),
792 /* Jumper EZpad mini3 */
793 .driver_data = (void *)&jumper_ezpad_mini3_data,
795 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
796 /* jumperx.T87.KFBNEEA02 with the version-nr dropped */
797 DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
801 /* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */
802 .driver_data = (void *)&trekstor_primebook_c11_data,
804 DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"),
805 DMI_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"),
810 .driver_data = (void *)&myria_my8307_data,
812 DMI_MATCH(DMI_SYS_VENDOR, "Complet Electro Serv"),
813 DMI_MATCH(DMI_PRODUCT_NAME, "MY8307"),
817 /* Onda oBook 20 Plus */
818 .driver_data = (void *)&onda_obook_20_plus_data,
820 DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
821 DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
825 /* ONDA V80 plus v3 (P80PSBG9V3A01501) */
826 .driver_data = (void *)&onda_v80_plus_v3_data,
828 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONDA"),
829 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V80 PLUS")
833 /* ONDA V820w DualOS */
834 .driver_data = (void *)&onda_v820w_32g_data,
836 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
837 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS")
841 /* ONDA V891w revision P891WBEBV1B00 aka v1 */
842 .driver_data = (void *)&onda_v891w_v1_data,
844 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
845 DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"),
846 DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"),
847 /* Exact match, different versions need different fw */
848 DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
852 /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
853 .driver_data = (void *)&onda_v891w_v3_data,
855 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
856 DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
857 DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
862 .driver_data = (void *)&pipo_w2s_data,
864 DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
865 DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
869 /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
870 .driver_data = (void *)&trekstor_surftab_wintron70_data,
872 DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"),
873 DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"),
874 /* Exact match, different versions need different fw */
875 DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"),
879 /* Point of View mobii wintab p800w (v2.0) */
880 .driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
882 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
883 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
884 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"),
885 /* Above matches are too generic, add bios-date match */
886 DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
890 /* Point of View mobii wintab p800w (v2.1) */
891 .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
893 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
894 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
895 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"),
896 /* Above matches are too generic, add bios-date match */
897 DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"),
901 /* Point of View mobii wintab p1006w (v1.0) */
902 .driver_data = (void *)&pov_mobii_wintab_p1006w_v10_data,
904 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
905 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
906 /* Note 105b is Foxcon's USB/PCI vendor id */
907 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"),
908 DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
912 /* Teclast X3 Plus */
913 .driver_data = (void *)&teclast_x3_plus_data,
915 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
916 DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
917 DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
921 /* Teclast X98 Plus II */
922 .driver_data = (void *)&teclast_x98plus2_data,
924 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
925 DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
929 /* Trekstor Primebook C11 */
930 .driver_data = (void *)&trekstor_primebook_c11_data,
932 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
933 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"),
937 /* Trekstor Primebook C11B (same touchscreen as the C11) */
938 .driver_data = (void *)&trekstor_primebook_c11_data,
940 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
941 DMI_MATCH(DMI_PRODUCT_NAME, "PRIMEBOOK C11B"),
945 /* Trekstor Primebook C13 */
946 .driver_data = (void *)&trekstor_primebook_c13_data,
948 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
949 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
953 /* Trekstor Primetab T13B */
954 .driver_data = (void *)&trekstor_primetab_t13b_data,
956 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
957 DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"),
961 /* TrekStor SurfTab twin 10.1 ST10432-8 */
962 .driver_data = (void *)&trekstor_surftab_twin_10_1_data,
964 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
965 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
969 /* Trekstor Surftab Wintron 7.0 ST70416-6 */
970 .driver_data = (void *)&trekstor_surftab_wintron70_data,
972 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
973 DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"),
974 /* Exact match, different versions need different fw */
975 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"),
979 /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
980 .driver_data = (void *)&trekstor_surftab_wintron70_data,
982 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
983 DMI_MATCH(DMI_PRODUCT_NAME,
984 "SurfTab wintron 7.0 ST70416-6"),
985 /* Exact match, different versions need different fw */
986 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
990 /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
991 .driver_data = (void *)&chuwi_vi8_data,
993 DMI_MATCH(DMI_SYS_VENDOR, "YOURS"),
994 DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"),
1000 static const struct ts_dmi_data *ts_data;
1002 static void ts_dmi_add_props(struct i2c_client *client)
1004 struct device *dev = &client->dev;
1007 if (has_acpi_companion(dev) &&
1008 !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
1009 error = device_add_properties(dev, ts_data->properties);
1011 dev_err(dev, "failed to add properties: %d\n", error);
1015 static int ts_dmi_notifier_call(struct notifier_block *nb,
1016 unsigned long action, void *data)
1018 struct device *dev = data;
1019 struct i2c_client *client;
1022 case BUS_NOTIFY_ADD_DEVICE:
1023 client = i2c_verify_client(dev);
1025 ts_dmi_add_props(client);
1035 static struct notifier_block ts_dmi_notifier = {
1036 .notifier_call = ts_dmi_notifier_call,
1039 static int __init ts_dmi_init(void)
1041 const struct dmi_system_id *dmi_id;
1044 dmi_id = dmi_first_match(touchscreen_dmi_table);
1046 return 0; /* Not an error */
1048 ts_data = dmi_id->driver_data;
1050 error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
1052 pr_err("%s: failed to register i2c bus notifier: %d\n",
1059 * We are registering out notifier after i2c core is initialized and i2c bus
1060 * itself is ready (which happens at postcore initcall level), but before
1061 * ACPI starts enumerating devices (at subsys initcall level).
1063 arch_initcall(ts_dmi_init);