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.
12 * Hans de Goede <hdegoede@redhat.com>
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", "/*(DEBLOBBED)*/"),
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-size-x", 1728),
46 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
47 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
48 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
49 PROPERTY_ENTRY_BOOL("silead,home-button"),
53 static const struct ts_dmi_data chuwi_hi8_pro_data = {
54 .acpi_name = "MSSL1680:00",
55 .properties = chuwi_hi8_pro_props,
58 static const struct property_entry chuwi_vi8_props[] = {
59 PROPERTY_ENTRY_U32("touchscreen-size-x", 1724),
60 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
61 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
62 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
63 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
64 PROPERTY_ENTRY_BOOL("silead,home-button"),
68 static const struct ts_dmi_data chuwi_vi8_data = {
69 .acpi_name = "MSSL1680:00",
70 .properties = chuwi_vi8_props,
73 static const struct property_entry chuwi_vi10_props[] = {
74 PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
75 PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
76 PROPERTY_ENTRY_U32("touchscreen-size-x", 1858),
77 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
78 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
79 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
80 PROPERTY_ENTRY_BOOL("silead,home-button"),
84 static const struct ts_dmi_data chuwi_vi10_data = {
85 .acpi_name = "MSSL0002:00",
86 .properties = chuwi_vi10_props,
89 static const struct property_entry connect_tablet9_props[] = {
90 PROPERTY_ENTRY_U32("touchscreen-min-x", 9),
91 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
92 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
93 PROPERTY_ENTRY_U32("touchscreen-size-y", 878),
94 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
95 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
96 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
97 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
101 static const struct ts_dmi_data connect_tablet9_data = {
102 .acpi_name = "MSSL1680:00",
103 .properties = connect_tablet9_props,
106 static const struct property_entry cube_iwork8_air_props[] = {
107 PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
108 PROPERTY_ENTRY_U32("touchscreen-size-y", 900),
109 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
110 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
111 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
115 static const struct ts_dmi_data cube_iwork8_air_data = {
116 .acpi_name = "MSSL1680:00",
117 .properties = cube_iwork8_air_props,
120 static const struct property_entry cube_knote_i1101_props[] = {
121 PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
122 PROPERTY_ENTRY_U32("touchscreen-min-y", 22),
123 PROPERTY_ENTRY_U32("touchscreen-size-x", 1961),
124 PROPERTY_ENTRY_U32("touchscreen-size-y", 1513),
125 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
126 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
127 PROPERTY_ENTRY_BOOL("silead,home-button"),
131 static const struct ts_dmi_data cube_knote_i1101_data = {
132 .acpi_name = "MSSL1680:00",
133 .properties = cube_knote_i1101_props,
136 static const struct property_entry dexp_ursus_7w_props[] = {
137 PROPERTY_ENTRY_U32("touchscreen-size-x", 890),
138 PROPERTY_ENTRY_U32("touchscreen-size-y", 630),
139 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
140 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
141 PROPERTY_ENTRY_BOOL("silead,home-button"),
145 static const struct ts_dmi_data dexp_ursus_7w_data = {
146 .acpi_name = "MSSL1680:00",
147 .properties = dexp_ursus_7w_props,
150 static const struct property_entry dexp_ursus_kx210i_props[] = {
151 PROPERTY_ENTRY_U32("touchscreen-min-x", 5),
152 PROPERTY_ENTRY_U32("touchscreen-min-y", 2),
153 PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
154 PROPERTY_ENTRY_U32("touchscreen-size-y", 1137),
155 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
156 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
157 PROPERTY_ENTRY_BOOL("silead,home-button"),
161 static const struct ts_dmi_data dexp_ursus_kx210i_data = {
162 .acpi_name = "MSSL1680:00",
163 .properties = dexp_ursus_kx210i_props,
166 static const struct property_entry digma_citi_e200_props[] = {
167 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
168 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
169 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
170 PROPERTY_ENTRY_STRING("firmware-name",
172 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
173 PROPERTY_ENTRY_BOOL("silead,home-button"),
177 static const struct ts_dmi_data digma_citi_e200_data = {
178 .acpi_name = "MSSL1680:00",
179 .properties = digma_citi_e200_props,
182 static const struct property_entry estar_beauty_hd_props[] = {
183 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
187 static const struct ts_dmi_data estar_beauty_hd_data = {
188 .acpi_name = "GDIX1001:00",
189 .properties = estar_beauty_hd_props,
192 static const struct property_entry gp_electronic_t701_props[] = {
193 PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
194 PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
195 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
196 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
197 PROPERTY_ENTRY_STRING("firmware-name",
202 static const struct ts_dmi_data gp_electronic_t701_data = {
203 .acpi_name = "MSSL1680:00",
204 .properties = gp_electronic_t701_props,
207 static const struct property_entry itworks_tw891_props[] = {
208 PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
209 PROPERTY_ENTRY_U32("touchscreen-size-y", 890),
210 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
211 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
212 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
216 static const struct ts_dmi_data itworks_tw891_data = {
217 .acpi_name = "MSSL1680:00",
218 .properties = itworks_tw891_props,
221 static const struct property_entry jumper_ezpad_6_pro_props[] = {
222 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
223 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
224 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
225 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
226 PROPERTY_ENTRY_BOOL("silead,home-button"),
230 static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
231 .acpi_name = "MSSL1680:00",
232 .properties = jumper_ezpad_6_pro_props,
235 static const struct property_entry jumper_ezpad_mini3_props[] = {
236 PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
237 PROPERTY_ENTRY_U32("touchscreen-size-y", 1150),
238 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
239 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
240 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
244 static const struct ts_dmi_data jumper_ezpad_mini3_data = {
245 .acpi_name = "MSSL1680:00",
246 .properties = jumper_ezpad_mini3_props,
249 static const struct property_entry onda_obook_20_plus_props[] = {
250 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
251 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
252 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
253 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
254 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
255 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
256 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
257 PROPERTY_ENTRY_BOOL("silead,home-button"),
261 static const struct ts_dmi_data onda_obook_20_plus_data = {
262 .acpi_name = "MSSL1680:00",
263 .properties = onda_obook_20_plus_props,
266 static const struct property_entry onda_v820w_32g_props[] = {
267 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
268 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
269 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
270 PROPERTY_ENTRY_STRING("firmware-name",
272 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
273 PROPERTY_ENTRY_BOOL("silead,home-button"),
277 static const struct ts_dmi_data onda_v820w_32g_data = {
278 .acpi_name = "MSSL1680:00",
279 .properties = onda_v820w_32g_props,
282 static const struct property_entry onda_v891w_v1_props[] = {
283 PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
284 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
285 PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
286 PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
287 PROPERTY_ENTRY_STRING("firmware-name",
289 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
290 PROPERTY_ENTRY_BOOL("silead,home-button"),
294 static const struct ts_dmi_data onda_v891w_v1_data = {
295 .acpi_name = "MSSL1680:00",
296 .properties = onda_v891w_v1_props,
299 static const struct property_entry onda_v891w_v3_props[] = {
300 PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
301 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
302 PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
303 PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
304 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
305 PROPERTY_ENTRY_STRING("firmware-name",
307 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
308 PROPERTY_ENTRY_BOOL("silead,home-button"),
312 static const struct ts_dmi_data onda_v891w_v3_data = {
313 .acpi_name = "MSSL1680:00",
314 .properties = onda_v891w_v3_props,
317 static const struct property_entry pipo_w2s_props[] = {
318 PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
319 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
320 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
321 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
322 PROPERTY_ENTRY_STRING("firmware-name",
327 static const struct ts_dmi_data pipo_w2s_data = {
328 .acpi_name = "MSSL1680:00",
329 .properties = pipo_w2s_props,
332 static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
333 PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
334 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
335 PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
336 PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
337 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
338 PROPERTY_ENTRY_STRING("firmware-name",
340 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
341 PROPERTY_ENTRY_BOOL("silead,home-button"),
345 static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
346 .acpi_name = "MSSL1680:00",
347 .properties = pov_mobii_wintab_p800w_v20_props,
350 static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
351 PROPERTY_ENTRY_U32("touchscreen-size-x", 1800),
352 PROPERTY_ENTRY_U32("touchscreen-size-y", 1150),
353 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
354 PROPERTY_ENTRY_STRING("firmware-name",
356 PROPERTY_ENTRY_BOOL("silead,home-button"),
360 static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
361 .acpi_name = "MSSL1680:00",
362 .properties = pov_mobii_wintab_p800w_v21_props,
365 static const struct property_entry teclast_x3_plus_props[] = {
366 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
367 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
368 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
369 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
370 PROPERTY_ENTRY_BOOL("silead,home-button"),
374 static const struct ts_dmi_data teclast_x3_plus_data = {
375 .acpi_name = "MSSL1680:00",
376 .properties = teclast_x3_plus_props,
379 static const struct property_entry teclast_x98plus2_props[] = {
380 PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
381 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
382 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
383 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
384 PROPERTY_ENTRY_STRING("firmware-name",
386 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
390 static const struct ts_dmi_data teclast_x98plus2_data = {
391 .acpi_name = "MSSL1680:00",
392 .properties = teclast_x98plus2_props,
395 static const struct property_entry trekstor_primebook_c13_props[] = {
396 PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
397 PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
398 PROPERTY_ENTRY_STRING("firmware-name",
400 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
401 PROPERTY_ENTRY_BOOL("silead,home-button"),
405 static const struct ts_dmi_data trekstor_primebook_c13_data = {
406 .acpi_name = "MSSL1680:00",
407 .properties = trekstor_primebook_c13_props,
410 static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
411 PROPERTY_ENTRY_U32("touchscreen-size-x", 1900),
412 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
413 PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
414 PROPERTY_ENTRY_STRING("firmware-name",
416 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
420 static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
421 .acpi_name = "MSSL1680:00",
422 .properties = trekstor_surftab_twin_10_1_props,
425 static const struct property_entry trekstor_surftab_wintron70_props[] = {
426 PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
427 PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
428 PROPERTY_ENTRY_STRING("firmware-name",
430 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
431 PROPERTY_ENTRY_BOOL("silead,home-button"),
435 static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
436 .acpi_name = "MSSL1680:00",
437 .properties = trekstor_surftab_wintron70_props,
440 /* NOTE: Please keep this table sorted alphabetically */
441 static const struct dmi_system_id touchscreen_dmi_table[] = {
444 .driver_data = (void *)&chuwi_hi8_data,
446 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
447 DMI_MATCH(DMI_PRODUCT_NAME, "S806"),
451 /* Chuwi Hi8 (H1D_S806_206) */
452 .driver_data = (void *)&chuwi_hi8_data,
454 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
455 DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
456 DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"),
460 /* Chuwi Hi8 Pro (CWI513) */
461 .driver_data = (void *)&chuwi_hi8_pro_data,
463 DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
464 DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
468 /* Chuwi Vi8 (CWI506) */
469 .driver_data = (void *)&chuwi_vi8_data,
471 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
472 DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
473 DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
477 /* Chuwi Vi10 (CWI505) */
478 .driver_data = (void *)&chuwi_vi10_data,
480 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
481 DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"),
482 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
483 DMI_MATCH(DMI_PRODUCT_NAME, "S165"),
487 /* Connect Tablet 9 */
488 .driver_data = (void *)&connect_tablet9_data,
490 DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
491 DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
495 /* CUBE iwork8 Air */
496 .driver_data = (void *)&cube_iwork8_air_data,
498 DMI_MATCH(DMI_SYS_VENDOR, "cube"),
499 DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"),
500 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
504 /* Cube KNote i1101 */
505 .driver_data = (void *)&cube_knote_i1101_data,
507 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
508 DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"),
509 DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"),
510 DMI_MATCH(DMI_PRODUCT_NAME, "i1101"),
515 .driver_data = (void *)&dexp_ursus_7w_data,
517 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
518 DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
522 /* DEXP Ursus KX210i */
523 .driver_data = (void *)&dexp_ursus_kx210i_data,
525 DMI_MATCH(DMI_SYS_VENDOR, "INSYDE Corp."),
526 DMI_MATCH(DMI_PRODUCT_NAME, "S107I"),
530 /* Digma Citi E200 */
531 .driver_data = (void *)&digma_citi_e200_data,
533 DMI_MATCH(DMI_SYS_VENDOR, "Digma"),
534 DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"),
535 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
539 /* Estar Beauty HD (MID 7316R) */
540 .driver_data = (void *)&estar_beauty_hd_data,
542 DMI_MATCH(DMI_SYS_VENDOR, "Estar"),
543 DMI_MATCH(DMI_PRODUCT_NAME, "eSTAR BEAUTY HD Intel Quad core"),
547 /* GP-electronic T701 */
548 .driver_data = (void *)&gp_electronic_t701_data,
550 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
551 DMI_MATCH(DMI_PRODUCT_NAME, "T701"),
552 DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"),
556 /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
557 .driver_data = (void *)&trekstor_surftab_wintron70_data,
559 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
560 DMI_MATCH(DMI_PRODUCT_NAME, "i71c"),
561 DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"),
565 /* I.T.Works TW891 */
566 .driver_data = (void *)&itworks_tw891_data,
568 DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
569 DMI_MATCH(DMI_PRODUCT_NAME, "TW891"),
573 /* Jumper EZpad 6 Pro */
574 .driver_data = (void *)&jumper_ezpad_6_pro_data,
576 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
577 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
578 DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
579 /* Above matches are too generic, add bios-date match */
580 DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"),
584 /* Jumper EZpad mini3 */
585 .driver_data = (void *)&jumper_ezpad_mini3_data,
587 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
588 /* jumperx.T87.KFBNEEA02 with the version-nr dropped */
589 DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
593 /* Onda oBook 20 Plus */
594 .driver_data = (void *)&onda_obook_20_plus_data,
596 DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
597 DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
601 /* ONDA V820w DualOS */
602 .driver_data = (void *)&onda_v820w_32g_data,
604 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
605 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS")
609 /* ONDA V891w revision P891WBEBV1B00 aka v1 */
610 .driver_data = (void *)&onda_v891w_v1_data,
612 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
613 DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"),
614 DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"),
615 /* Exact match, different versions need different fw */
616 DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
620 /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
621 .driver_data = (void *)&onda_v891w_v3_data,
623 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
624 DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
625 DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
630 .driver_data = (void *)&pipo_w2s_data,
632 DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
633 DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
637 /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
638 .driver_data = (void *)&trekstor_surftab_wintron70_data,
640 DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"),
641 DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"),
642 /* Exact match, different versions need different fw */
643 DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"),
647 /* Point of View mobii wintab p800w (v2.0) */
648 .driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
650 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
651 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
652 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"),
653 /* Above matches are too generic, add bios-date match */
654 DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
658 /* Point of View mobii wintab p800w (v2.1) */
659 .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
661 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
662 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
663 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"),
664 /* Above matches are too generic, add bios-date match */
665 DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"),
669 /* Teclast X3 Plus */
670 .driver_data = (void *)&teclast_x3_plus_data,
672 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
673 DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
674 DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
678 /* Teclast X98 Plus II */
679 .driver_data = (void *)&teclast_x98plus2_data,
681 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
682 DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
686 /* Trekstor Primebook C13 */
687 .driver_data = (void *)&trekstor_primebook_c13_data,
689 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
690 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
694 /* TrekStor SurfTab twin 10.1 ST10432-8 */
695 .driver_data = (void *)&trekstor_surftab_twin_10_1_data,
697 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
698 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
702 /* Trekstor Surftab Wintron 7.0 ST70416-6 */
703 .driver_data = (void *)&trekstor_surftab_wintron70_data,
705 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
706 DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"),
707 /* Exact match, different versions need different fw */
708 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"),
712 /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
713 .driver_data = (void *)&trekstor_surftab_wintron70_data,
715 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
716 DMI_MATCH(DMI_PRODUCT_NAME,
717 "SurfTab wintron 7.0 ST70416-6"),
718 /* Exact match, different versions need different fw */
719 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
723 /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
724 .driver_data = (void *)&chuwi_vi8_data,
726 DMI_MATCH(DMI_SYS_VENDOR, "YOURS"),
727 DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"),
733 static const struct ts_dmi_data *ts_data;
735 static void ts_dmi_add_props(struct i2c_client *client)
737 struct device *dev = &client->dev;
740 if (has_acpi_companion(dev) &&
741 !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
742 error = device_add_properties(dev, ts_data->properties);
744 dev_err(dev, "failed to add properties: %d\n", error);
748 static int ts_dmi_notifier_call(struct notifier_block *nb,
749 unsigned long action, void *data)
751 struct device *dev = data;
752 struct i2c_client *client;
755 case BUS_NOTIFY_ADD_DEVICE:
756 client = i2c_verify_client(dev);
758 ts_dmi_add_props(client);
768 static struct notifier_block ts_dmi_notifier = {
769 .notifier_call = ts_dmi_notifier_call,
772 static int __init ts_dmi_init(void)
774 const struct dmi_system_id *dmi_id;
777 dmi_id = dmi_first_match(touchscreen_dmi_table);
779 return 0; /* Not an error */
781 ts_data = dmi_id->driver_data;
783 error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
785 pr_err("%s: failed to register i2c bus notifier: %d\n",
792 * We are registering out notifier after i2c core is initialized and i2c bus
793 * itself is ready (which happens at postcore initcall level), but before
794 * ACPI starts enumerating devices (at subsys initcall level).
796 arch_initcall(ts_dmi_init);