2 * Touchscreen driver DMI based configuration code
4 * Copyright (c) 2017 Red Hat Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
15 #include <linux/acpi.h>
16 #include <linux/device.h>
17 #include <linux/dmi.h>
18 #include <linux/i2c.h>
19 #include <linux/notifier.h>
20 #include <linux/property.h>
21 #include <linux/string.h>
24 const char *acpi_name;
25 const struct property_entry *properties;
28 /* NOTE: Please keep all entries sorted alphabetically */
30 static const struct property_entry chuwi_hi8_props[] = {
31 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
32 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
33 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
34 PROPERTY_ENTRY_BOOL("silead,home-button"),
35 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi8.fw"),
39 static const struct ts_dmi_data chuwi_hi8_data = {
40 .acpi_name = "MSSL0001:00",
41 .properties = chuwi_hi8_props,
44 static const struct property_entry chuwi_hi8_pro_props[] = {
45 PROPERTY_ENTRY_U32("touchscreen-min-x", 6),
46 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
47 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
48 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
49 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
50 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-hi8-pro.fw"),
51 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
52 PROPERTY_ENTRY_BOOL("silead,home-button"),
56 static const struct ts_dmi_data chuwi_hi8_pro_data = {
57 .acpi_name = "MSSL1680:00",
58 .properties = chuwi_hi8_pro_props,
61 static const struct property_entry chuwi_vi8_props[] = {
62 PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
63 PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
64 PROPERTY_ENTRY_U32("touchscreen-size-x", 1724),
65 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
66 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
67 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-vi8.fw"),
68 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
69 PROPERTY_ENTRY_BOOL("silead,home-button"),
73 static const struct ts_dmi_data chuwi_vi8_data = {
74 .acpi_name = "MSSL1680:00",
75 .properties = chuwi_vi8_props,
78 static const struct property_entry chuwi_vi10_props[] = {
79 PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
80 PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
81 PROPERTY_ENTRY_U32("touchscreen-size-x", 1858),
82 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
83 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-vi10.fw"),
84 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
85 PROPERTY_ENTRY_BOOL("silead,home-button"),
89 static const struct ts_dmi_data chuwi_vi10_data = {
90 .acpi_name = "MSSL0002:00",
91 .properties = chuwi_vi10_props,
94 static const struct property_entry connect_tablet9_props[] = {
95 PROPERTY_ENTRY_U32("touchscreen-min-x", 9),
96 PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
97 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
98 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
99 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
100 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
101 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-connect-tablet9.fw"),
102 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
106 static const struct ts_dmi_data connect_tablet9_data = {
107 .acpi_name = "MSSL1680:00",
108 .properties = connect_tablet9_props,
111 static const struct property_entry cube_iwork8_air_props[] = {
112 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
113 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
114 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
115 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
116 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
117 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-cube-iwork8-air.fw"),
118 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
122 static const struct ts_dmi_data cube_iwork8_air_data = {
123 .acpi_name = "MSSL1680:00",
124 .properties = cube_iwork8_air_props,
127 static const struct property_entry cube_knote_i1101_props[] = {
128 PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
129 PROPERTY_ENTRY_U32("touchscreen-min-y", 22),
130 PROPERTY_ENTRY_U32("touchscreen-size-x", 1961),
131 PROPERTY_ENTRY_U32("touchscreen-size-y", 1513),
132 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-cube-knote-i1101.fw"),
133 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
134 PROPERTY_ENTRY_BOOL("silead,home-button"),
138 static const struct ts_dmi_data cube_knote_i1101_data = {
139 .acpi_name = "MSSL1680:00",
140 .properties = cube_knote_i1101_props,
143 static const struct property_entry dexp_ursus_7w_props[] = {
144 PROPERTY_ENTRY_U32("touchscreen-size-x", 890),
145 PROPERTY_ENTRY_U32("touchscreen-size-y", 630),
146 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-dexp-ursus-7w.fw"),
147 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
148 PROPERTY_ENTRY_BOOL("silead,home-button"),
152 static const struct ts_dmi_data dexp_ursus_7w_data = {
153 .acpi_name = "MSSL1680:00",
154 .properties = dexp_ursus_7w_props,
157 static const struct property_entry digma_citi_e200_props[] = {
158 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
159 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
160 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
161 PROPERTY_ENTRY_STRING("firmware-name",
162 "gsl1686-digma_citi_e200.fw"),
163 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
164 PROPERTY_ENTRY_BOOL("silead,home-button"),
168 static const struct ts_dmi_data digma_citi_e200_data = {
169 .acpi_name = "MSSL1680:00",
170 .properties = digma_citi_e200_props,
173 static const struct property_entry gp_electronic_t701_props[] = {
174 PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
175 PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
176 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
177 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
178 PROPERTY_ENTRY_STRING("firmware-name",
179 "gsl1680-gp-electronic-t701.fw"),
183 static const struct ts_dmi_data gp_electronic_t701_data = {
184 .acpi_name = "MSSL1680:00",
185 .properties = gp_electronic_t701_props,
188 static const struct property_entry itworks_tw891_props[] = {
189 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
190 PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
191 PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
192 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
193 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
194 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
195 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
196 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
200 static const struct ts_dmi_data itworks_tw891_data = {
201 .acpi_name = "MSSL1680:00",
202 .properties = itworks_tw891_props,
205 static const struct property_entry jumper_ezpad_6_pro_props[] = {
206 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
207 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
208 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"),
209 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
210 PROPERTY_ENTRY_BOOL("silead,home-button"),
214 static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
215 .acpi_name = "MSSL1680:00",
216 .properties = jumper_ezpad_6_pro_props,
219 static const struct property_entry jumper_ezpad_mini3_props[] = {
220 PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
221 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
222 PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
223 PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
224 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
225 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
226 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
230 static const struct ts_dmi_data jumper_ezpad_mini3_data = {
231 .acpi_name = "MSSL1680:00",
232 .properties = jumper_ezpad_mini3_props,
235 static const struct property_entry onda_obook_20_plus_props[] = {
236 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
237 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
238 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
239 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
240 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
241 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
242 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
243 PROPERTY_ENTRY_BOOL("silead,home-button"),
247 static const struct ts_dmi_data onda_obook_20_plus_data = {
248 .acpi_name = "MSSL1680:00",
249 .properties = onda_obook_20_plus_props,
252 static const struct property_entry onda_v80_plus_v3_props[] = {
253 PROPERTY_ENTRY_U32("touchscreen-min-x", 22),
254 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
255 PROPERTY_ENTRY_U32("touchscreen-size-x", 1698),
256 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
257 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
258 PROPERTY_ENTRY_STRING("firmware-name",
259 "gsl3676-onda-v80-plus-v3.fw"),
260 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
261 PROPERTY_ENTRY_BOOL("silead,home-button"),
265 static const struct ts_dmi_data onda_v80_plus_v3_data = {
266 .acpi_name = "MSSL1680:00",
267 .properties = onda_v80_plus_v3_props,
270 static const struct property_entry onda_v820w_32g_props[] = {
271 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
272 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
273 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
274 PROPERTY_ENTRY_STRING("firmware-name",
275 "gsl1680-onda-v820w-32g.fw"),
276 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
277 PROPERTY_ENTRY_BOOL("silead,home-button"),
281 static const struct ts_dmi_data onda_v820w_32g_data = {
282 .acpi_name = "MSSL1680:00",
283 .properties = onda_v820w_32g_props,
286 static const struct property_entry onda_v891w_v1_props[] = {
287 PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
288 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
289 PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
290 PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
291 PROPERTY_ENTRY_STRING("firmware-name",
292 "gsl3680-onda-v891w-v1.fw"),
293 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
294 PROPERTY_ENTRY_BOOL("silead,home-button"),
298 static const struct ts_dmi_data onda_v891w_v1_data = {
299 .acpi_name = "MSSL1680:00",
300 .properties = onda_v891w_v1_props,
303 static const struct property_entry onda_v891w_v3_props[] = {
304 PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
305 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
306 PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
307 PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
308 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
309 PROPERTY_ENTRY_STRING("firmware-name",
310 "gsl3676-onda-v891w-v3.fw"),
311 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
312 PROPERTY_ENTRY_BOOL("silead,home-button"),
316 static const struct ts_dmi_data onda_v891w_v3_data = {
317 .acpi_name = "MSSL1680:00",
318 .properties = onda_v891w_v3_props,
321 static const struct property_entry pipo_w2s_props[] = {
322 PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
323 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
324 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
325 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
326 PROPERTY_ENTRY_STRING("firmware-name",
327 "gsl1680-pipo-w2s.fw"),
331 static const struct ts_dmi_data pipo_w2s_data = {
332 .acpi_name = "MSSL1680:00",
333 .properties = pipo_w2s_props,
336 static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
337 PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
338 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
339 PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
340 PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
341 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
342 PROPERTY_ENTRY_STRING("firmware-name",
343 "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
344 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
345 PROPERTY_ENTRY_BOOL("silead,home-button"),
349 static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
350 .acpi_name = "MSSL1680:00",
351 .properties = pov_mobii_wintab_p800w_v20_props,
354 static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
355 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
356 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
357 PROPERTY_ENTRY_U32("touchscreen-size-x", 1794),
358 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
359 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
360 PROPERTY_ENTRY_STRING("firmware-name",
361 "gsl3692-pov-mobii-wintab-p800w.fw"),
362 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
363 PROPERTY_ENTRY_BOOL("silead,home-button"),
367 static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
368 .acpi_name = "MSSL1680:00",
369 .properties = pov_mobii_wintab_p800w_v21_props,
372 static const struct property_entry teclast_x3_plus_props[] = {
373 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
374 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
375 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"),
376 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
377 PROPERTY_ENTRY_BOOL("silead,home-button"),
381 static const struct ts_dmi_data teclast_x3_plus_data = {
382 .acpi_name = "MSSL1680:00",
383 .properties = teclast_x3_plus_props,
386 static const struct property_entry teclast_x98plus2_props[] = {
387 PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
388 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
389 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
390 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
391 PROPERTY_ENTRY_STRING("firmware-name",
392 "gsl1686-teclast_x98plus2.fw"),
393 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
397 static const struct ts_dmi_data teclast_x98plus2_data = {
398 .acpi_name = "MSSL1680:00",
399 .properties = teclast_x98plus2_props,
402 static const struct property_entry trekstor_primebook_c11_props[] = {
403 PROPERTY_ENTRY_U32("touchscreen-size-x", 1970),
404 PROPERTY_ENTRY_U32("touchscreen-size-y", 1530),
405 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
406 PROPERTY_ENTRY_STRING("firmware-name",
407 "gsl1680-trekstor-primebook-c11.fw"),
408 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
409 PROPERTY_ENTRY_BOOL("silead,home-button"),
413 static const struct ts_dmi_data trekstor_primebook_c11_data = {
414 .acpi_name = "MSSL1680:00",
415 .properties = trekstor_primebook_c11_props,
418 static const struct property_entry trekstor_primebook_c13_props[] = {
419 PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
420 PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
421 PROPERTY_ENTRY_STRING("firmware-name",
422 "gsl1680-trekstor-primebook-c13.fw"),
423 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
424 PROPERTY_ENTRY_BOOL("silead,home-button"),
428 static const struct ts_dmi_data trekstor_primebook_c13_data = {
429 .acpi_name = "MSSL1680:00",
430 .properties = trekstor_primebook_c13_props,
433 static const struct property_entry trekstor_primetab_t13b_props[] = {
434 PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
435 PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
436 PROPERTY_ENTRY_STRING("firmware-name",
437 "gsl1680-trekstor-primetab-t13b.fw"),
438 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
439 PROPERTY_ENTRY_BOOL("silead,home-button"),
440 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
444 static const struct ts_dmi_data trekstor_primetab_t13b_data = {
445 .acpi_name = "MSSL1680:00",
446 .properties = trekstor_primetab_t13b_props,
449 static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
450 PROPERTY_ENTRY_U32("touchscreen-size-x", 1900),
451 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
452 PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
453 PROPERTY_ENTRY_STRING("firmware-name",
454 "gsl3670-surftab-twin-10-1-st10432-8.fw"),
455 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
459 static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
460 .acpi_name = "MSSL1680:00",
461 .properties = trekstor_surftab_twin_10_1_props,
464 static const struct property_entry trekstor_surftab_wintron70_props[] = {
465 PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
466 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
467 PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
468 PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
469 PROPERTY_ENTRY_STRING("firmware-name",
470 "gsl1686-surftab-wintron70-st70416-6.fw"),
471 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
472 PROPERTY_ENTRY_BOOL("silead,home-button"),
476 static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
477 .acpi_name = "MSSL1680:00",
478 .properties = trekstor_surftab_wintron70_props,
481 /* NOTE: Please keep this table sorted alphabetically */
482 static const struct dmi_system_id touchscreen_dmi_table[] = {
485 .driver_data = (void *)&chuwi_hi8_data,
487 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
488 DMI_MATCH(DMI_PRODUCT_NAME, "S806"),
492 /* Chuwi Hi8 (H1D_S806_206) */
493 .driver_data = (void *)&chuwi_hi8_data,
495 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
496 DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
497 DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"),
501 /* Chuwi Hi8 Pro (CWI513) */
502 .driver_data = (void *)&chuwi_hi8_pro_data,
504 DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
505 DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
509 /* Chuwi Vi8 (CWI506) */
510 .driver_data = (void *)&chuwi_vi8_data,
512 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
513 DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
514 DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
518 /* Chuwi Vi10 (CWI505) */
519 .driver_data = (void *)&chuwi_vi10_data,
521 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
522 DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"),
523 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
524 DMI_MATCH(DMI_PRODUCT_NAME, "S165"),
528 /* Connect Tablet 9 */
529 .driver_data = (void *)&connect_tablet9_data,
531 DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
532 DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
536 /* CUBE iwork8 Air */
537 .driver_data = (void *)&cube_iwork8_air_data,
539 DMI_MATCH(DMI_SYS_VENDOR, "cube"),
540 DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"),
541 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
545 /* Cube KNote i1101 */
546 .driver_data = (void *)&cube_knote_i1101_data,
548 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
549 DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"),
550 DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"),
551 DMI_MATCH(DMI_PRODUCT_NAME, "i1101"),
556 .driver_data = (void *)&dexp_ursus_7w_data,
558 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
559 DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
563 /* Digma Citi E200 */
564 .driver_data = (void *)&digma_citi_e200_data,
566 DMI_MATCH(DMI_SYS_VENDOR, "Digma"),
567 DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"),
568 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
572 /* GP-electronic T701 */
573 .driver_data = (void *)&gp_electronic_t701_data,
575 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
576 DMI_MATCH(DMI_PRODUCT_NAME, "T701"),
577 DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"),
581 /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
582 .driver_data = (void *)&trekstor_surftab_wintron70_data,
584 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
585 DMI_MATCH(DMI_PRODUCT_NAME, "i71c"),
586 DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"),
590 /* I.T.Works TW891 */
591 .driver_data = (void *)&itworks_tw891_data,
593 DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
594 DMI_MATCH(DMI_PRODUCT_NAME, "TW891"),
598 /* Jumper EZpad 6 Pro */
599 .driver_data = (void *)&jumper_ezpad_6_pro_data,
601 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
602 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
603 DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
604 /* Above matches are too generic, add bios-date match */
605 DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"),
609 /* Jumper EZpad mini3 */
610 .driver_data = (void *)&jumper_ezpad_mini3_data,
612 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
613 /* jumperx.T87.KFBNEEA02 with the version-nr dropped */
614 DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
618 /* Onda oBook 20 Plus */
619 .driver_data = (void *)&onda_obook_20_plus_data,
621 DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
622 DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
626 /* ONDA V80 plus v3 (P80PSBG9V3A01501) */
627 .driver_data = (void *)&onda_v80_plus_v3_data,
629 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONDA"),
630 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V80 PLUS")
634 /* ONDA V820w DualOS */
635 .driver_data = (void *)&onda_v820w_32g_data,
637 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
638 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS")
642 /* ONDA V891w revision P891WBEBV1B00 aka v1 */
643 .driver_data = (void *)&onda_v891w_v1_data,
645 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
646 DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"),
647 DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"),
648 /* Exact match, different versions need different fw */
649 DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
653 /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
654 .driver_data = (void *)&onda_v891w_v3_data,
656 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
657 DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
658 DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
663 .driver_data = (void *)&pipo_w2s_data,
665 DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
666 DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
670 /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
671 .driver_data = (void *)&trekstor_surftab_wintron70_data,
673 DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"),
674 DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"),
675 /* Exact match, different versions need different fw */
676 DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"),
680 /* Point of View mobii wintab p800w (v2.0) */
681 .driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
683 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
684 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
685 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"),
686 /* Above matches are too generic, add bios-date match */
687 DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
691 /* Point of View mobii wintab p800w (v2.1) */
692 .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
694 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
695 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
696 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"),
697 /* Above matches are too generic, add bios-date match */
698 DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"),
702 /* Teclast X3 Plus */
703 .driver_data = (void *)&teclast_x3_plus_data,
705 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
706 DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
707 DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
711 /* Teclast X98 Plus II */
712 .driver_data = (void *)&teclast_x98plus2_data,
714 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
715 DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
719 /* Trekstor Primebook C11 */
720 .driver_data = (void *)&trekstor_primebook_c11_data,
722 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
723 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"),
727 /* Trekstor Primebook C13 */
728 .driver_data = (void *)&trekstor_primebook_c13_data,
730 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
731 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
735 /* Trekstor Primetab T13B */
736 .driver_data = (void *)&trekstor_primetab_t13b_data,
738 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
739 DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"),
743 /* TrekStor SurfTab twin 10.1 ST10432-8 */
744 .driver_data = (void *)&trekstor_surftab_twin_10_1_data,
746 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
747 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
751 /* Trekstor Surftab Wintron 7.0 ST70416-6 */
752 .driver_data = (void *)&trekstor_surftab_wintron70_data,
754 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
755 DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"),
756 /* Exact match, different versions need different fw */
757 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"),
761 /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
762 .driver_data = (void *)&trekstor_surftab_wintron70_data,
764 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
765 DMI_MATCH(DMI_PRODUCT_NAME,
766 "SurfTab wintron 7.0 ST70416-6"),
767 /* Exact match, different versions need different fw */
768 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
772 /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
773 .driver_data = (void *)&chuwi_vi8_data,
775 DMI_MATCH(DMI_SYS_VENDOR, "YOURS"),
776 DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"),
782 static const struct ts_dmi_data *ts_data;
784 static void ts_dmi_add_props(struct i2c_client *client)
786 struct device *dev = &client->dev;
789 if (has_acpi_companion(dev) &&
790 !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
791 error = device_add_properties(dev, ts_data->properties);
793 dev_err(dev, "failed to add properties: %d\n", error);
797 static int ts_dmi_notifier_call(struct notifier_block *nb,
798 unsigned long action, void *data)
800 struct device *dev = data;
801 struct i2c_client *client;
804 case BUS_NOTIFY_ADD_DEVICE:
805 client = i2c_verify_client(dev);
807 ts_dmi_add_props(client);
817 static struct notifier_block ts_dmi_notifier = {
818 .notifier_call = ts_dmi_notifier_call,
821 static int __init ts_dmi_init(void)
823 const struct dmi_system_id *dmi_id;
826 dmi_id = dmi_first_match(touchscreen_dmi_table);
828 return 0; /* Not an error */
830 ts_data = dmi_id->driver_data;
832 error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
834 pr_err("%s: failed to register i2c bus notifier: %d\n",
841 * We are registering out notifier after i2c core is initialized and i2c bus
842 * itself is ready (which happens at postcore initcall level), but before
843 * ACPI starts enumerating devices (at subsys initcall level).
845 arch_initcall(ts_dmi_init);