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 digma_citi_e200_props[] = {
151 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
152 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
153 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
154 PROPERTY_ENTRY_STRING("firmware-name",
156 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
157 PROPERTY_ENTRY_BOOL("silead,home-button"),
161 static const struct ts_dmi_data digma_citi_e200_data = {
162 .acpi_name = "MSSL1680:00",
163 .properties = digma_citi_e200_props,
166 static const struct property_entry estar_beauty_hd_props[] = {
167 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
171 static const struct ts_dmi_data estar_beauty_hd_data = {
172 .acpi_name = "GDIX1001:00",
173 .properties = estar_beauty_hd_props,
176 static const struct property_entry gp_electronic_t701_props[] = {
177 PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
178 PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
179 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
180 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
181 PROPERTY_ENTRY_STRING("firmware-name",
186 static const struct ts_dmi_data gp_electronic_t701_data = {
187 .acpi_name = "MSSL1680:00",
188 .properties = gp_electronic_t701_props,
191 static const struct property_entry itworks_tw891_props[] = {
192 PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
193 PROPERTY_ENTRY_U32("touchscreen-size-y", 890),
194 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
195 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
196 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
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", "/*(DEBLOBBED)*/"),
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-size-x", 1700),
221 PROPERTY_ENTRY_U32("touchscreen-size-y", 1150),
222 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
223 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
224 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
228 static const struct ts_dmi_data jumper_ezpad_mini3_data = {
229 .acpi_name = "MSSL1680:00",
230 .properties = jumper_ezpad_mini3_props,
233 static const struct property_entry onda_obook_20_plus_props[] = {
234 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
235 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
236 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
237 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
238 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
239 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
240 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
241 PROPERTY_ENTRY_BOOL("silead,home-button"),
245 static const struct ts_dmi_data onda_obook_20_plus_data = {
246 .acpi_name = "MSSL1680:00",
247 .properties = onda_obook_20_plus_props,
250 static const struct property_entry onda_v820w_32g_props[] = {
251 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
252 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
253 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
254 PROPERTY_ENTRY_STRING("firmware-name",
256 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
257 PROPERTY_ENTRY_BOOL("silead,home-button"),
261 static const struct ts_dmi_data onda_v820w_32g_data = {
262 .acpi_name = "MSSL1680:00",
263 .properties = onda_v820w_32g_props,
266 static const struct property_entry onda_v891w_v1_props[] = {
267 PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
268 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
269 PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
270 PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
271 PROPERTY_ENTRY_STRING("firmware-name",
273 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
274 PROPERTY_ENTRY_BOOL("silead,home-button"),
278 static const struct ts_dmi_data onda_v891w_v1_data = {
279 .acpi_name = "MSSL1680:00",
280 .properties = onda_v891w_v1_props,
283 static const struct property_entry onda_v891w_v3_props[] = {
284 PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
285 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
286 PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
287 PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
288 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
289 PROPERTY_ENTRY_STRING("firmware-name",
291 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
292 PROPERTY_ENTRY_BOOL("silead,home-button"),
296 static const struct ts_dmi_data onda_v891w_v3_data = {
297 .acpi_name = "MSSL1680:00",
298 .properties = onda_v891w_v3_props,
301 static const struct property_entry pipo_w2s_props[] = {
302 PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
303 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
304 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
305 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
306 PROPERTY_ENTRY_STRING("firmware-name",
311 static const struct ts_dmi_data pipo_w2s_data = {
312 .acpi_name = "MSSL1680:00",
313 .properties = pipo_w2s_props,
316 static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
317 PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
318 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
319 PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
320 PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
321 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
322 PROPERTY_ENTRY_STRING("firmware-name",
324 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
325 PROPERTY_ENTRY_BOOL("silead,home-button"),
329 static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
330 .acpi_name = "MSSL1680:00",
331 .properties = pov_mobii_wintab_p800w_v20_props,
334 static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
335 PROPERTY_ENTRY_U32("touchscreen-size-x", 1800),
336 PROPERTY_ENTRY_U32("touchscreen-size-y", 1150),
337 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
338 PROPERTY_ENTRY_STRING("firmware-name",
340 PROPERTY_ENTRY_BOOL("silead,home-button"),
344 static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
345 .acpi_name = "MSSL1680:00",
346 .properties = pov_mobii_wintab_p800w_v21_props,
349 static const struct property_entry teclast_x3_plus_props[] = {
350 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
351 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
352 PROPERTY_ENTRY_STRING("firmware-name", "/*(DEBLOBBED)*/"),
353 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
354 PROPERTY_ENTRY_BOOL("silead,home-button"),
358 static const struct ts_dmi_data teclast_x3_plus_data = {
359 .acpi_name = "MSSL1680:00",
360 .properties = teclast_x3_plus_props,
363 static const struct property_entry teclast_x98plus2_props[] = {
364 PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
365 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
366 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
367 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
368 PROPERTY_ENTRY_STRING("firmware-name",
370 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
374 static const struct ts_dmi_data teclast_x98plus2_data = {
375 .acpi_name = "MSSL1680:00",
376 .properties = teclast_x98plus2_props,
379 static const struct property_entry trekstor_primebook_c13_props[] = {
380 PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
381 PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
382 PROPERTY_ENTRY_STRING("firmware-name",
384 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
385 PROPERTY_ENTRY_BOOL("silead,home-button"),
389 static const struct ts_dmi_data trekstor_primebook_c13_data = {
390 .acpi_name = "MSSL1680:00",
391 .properties = trekstor_primebook_c13_props,
394 static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
395 PROPERTY_ENTRY_U32("touchscreen-size-x", 1900),
396 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
397 PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
398 PROPERTY_ENTRY_STRING("firmware-name",
400 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
404 static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
405 .acpi_name = "MSSL1680:00",
406 .properties = trekstor_surftab_twin_10_1_props,
409 static const struct property_entry trekstor_surftab_wintron70_props[] = {
410 PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
411 PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
412 PROPERTY_ENTRY_STRING("firmware-name",
414 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
415 PROPERTY_ENTRY_BOOL("silead,home-button"),
419 static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
420 .acpi_name = "MSSL1680:00",
421 .properties = trekstor_surftab_wintron70_props,
424 /* NOTE: Please keep this table sorted alphabetically */
425 static const struct dmi_system_id touchscreen_dmi_table[] = {
428 .driver_data = (void *)&chuwi_hi8_data,
430 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
431 DMI_MATCH(DMI_PRODUCT_NAME, "S806"),
435 /* Chuwi Hi8 (H1D_S806_206) */
436 .driver_data = (void *)&chuwi_hi8_data,
438 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
439 DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
440 DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"),
444 /* Chuwi Hi8 Pro (CWI513) */
445 .driver_data = (void *)&chuwi_hi8_pro_data,
447 DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
448 DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
452 /* Chuwi Vi8 (CWI506) */
453 .driver_data = (void *)&chuwi_vi8_data,
455 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
456 DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
457 DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
461 /* Chuwi Vi10 (CWI505) */
462 .driver_data = (void *)&chuwi_vi10_data,
464 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
465 DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"),
466 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
467 DMI_MATCH(DMI_PRODUCT_NAME, "S165"),
471 /* Connect Tablet 9 */
472 .driver_data = (void *)&connect_tablet9_data,
474 DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
475 DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
479 /* CUBE iwork8 Air */
480 .driver_data = (void *)&cube_iwork8_air_data,
482 DMI_MATCH(DMI_SYS_VENDOR, "cube"),
483 DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"),
484 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
488 /* Cube KNote i1101 */
489 .driver_data = (void *)&cube_knote_i1101_data,
491 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
492 DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"),
493 DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"),
494 DMI_MATCH(DMI_PRODUCT_NAME, "i1101"),
499 .driver_data = (void *)&dexp_ursus_7w_data,
501 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
502 DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
506 /* Digma Citi E200 */
507 .driver_data = (void *)&digma_citi_e200_data,
509 DMI_MATCH(DMI_SYS_VENDOR, "Digma"),
510 DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"),
511 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
515 /* Estar Beauty HD (MID 7316R) */
516 .driver_data = (void *)&estar_beauty_hd_data,
518 DMI_MATCH(DMI_SYS_VENDOR, "Estar"),
519 DMI_MATCH(DMI_PRODUCT_NAME, "eSTAR BEAUTY HD Intel Quad core"),
523 /* GP-electronic T701 */
524 .driver_data = (void *)&gp_electronic_t701_data,
526 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
527 DMI_MATCH(DMI_PRODUCT_NAME, "T701"),
528 DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"),
532 /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
533 .driver_data = (void *)&trekstor_surftab_wintron70_data,
535 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
536 DMI_MATCH(DMI_PRODUCT_NAME, "i71c"),
537 DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"),
541 /* I.T.Works TW891 */
542 .driver_data = (void *)&itworks_tw891_data,
544 DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
545 DMI_MATCH(DMI_PRODUCT_NAME, "TW891"),
549 /* Jumper EZpad 6 Pro */
550 .driver_data = (void *)&jumper_ezpad_6_pro_data,
552 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
553 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
554 DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
555 /* Above matches are too generic, add bios-date match */
556 DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"),
560 /* Jumper EZpad mini3 */
561 .driver_data = (void *)&jumper_ezpad_mini3_data,
563 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
564 /* jumperx.T87.KFBNEEA02 with the version-nr dropped */
565 DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
569 /* Onda oBook 20 Plus */
570 .driver_data = (void *)&onda_obook_20_plus_data,
572 DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
573 DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
577 /* ONDA V820w DualOS */
578 .driver_data = (void *)&onda_v820w_32g_data,
580 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
581 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS")
585 /* ONDA V891w revision P891WBEBV1B00 aka v1 */
586 .driver_data = (void *)&onda_v891w_v1_data,
588 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
589 DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"),
590 DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"),
591 /* Exact match, different versions need different fw */
592 DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
596 /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
597 .driver_data = (void *)&onda_v891w_v3_data,
599 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
600 DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
601 DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
606 .driver_data = (void *)&pipo_w2s_data,
608 DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
609 DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
613 /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
614 .driver_data = (void *)&trekstor_surftab_wintron70_data,
616 DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"),
617 DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"),
618 /* Exact match, different versions need different fw */
619 DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"),
623 /* Point of View mobii wintab p800w (v2.0) */
624 .driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
626 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
627 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
628 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"),
629 /* Above matches are too generic, add bios-date match */
630 DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
634 /* Point of View mobii wintab p800w (v2.1) */
635 .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
637 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
638 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
639 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"),
640 /* Above matches are too generic, add bios-date match */
641 DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"),
645 /* Teclast X3 Plus */
646 .driver_data = (void *)&teclast_x3_plus_data,
648 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
649 DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
650 DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
654 /* Teclast X98 Plus II */
655 .driver_data = (void *)&teclast_x98plus2_data,
657 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
658 DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
662 /* Trekstor Primebook C13 */
663 .driver_data = (void *)&trekstor_primebook_c13_data,
665 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
666 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
670 /* TrekStor SurfTab twin 10.1 ST10432-8 */
671 .driver_data = (void *)&trekstor_surftab_twin_10_1_data,
673 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
674 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
678 /* Trekstor Surftab Wintron 7.0 ST70416-6 */
679 .driver_data = (void *)&trekstor_surftab_wintron70_data,
681 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
682 DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"),
683 /* Exact match, different versions need different fw */
684 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"),
688 /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
689 .driver_data = (void *)&trekstor_surftab_wintron70_data,
691 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
692 DMI_MATCH(DMI_PRODUCT_NAME,
693 "SurfTab wintron 7.0 ST70416-6"),
694 /* Exact match, different versions need different fw */
695 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
699 /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
700 .driver_data = (void *)&chuwi_vi8_data,
702 DMI_MATCH(DMI_SYS_VENDOR, "YOURS"),
703 DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"),
709 static const struct ts_dmi_data *ts_data;
711 static void ts_dmi_add_props(struct i2c_client *client)
713 struct device *dev = &client->dev;
716 if (has_acpi_companion(dev) &&
717 !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
718 error = device_add_properties(dev, ts_data->properties);
720 dev_err(dev, "failed to add properties: %d\n", error);
724 static int ts_dmi_notifier_call(struct notifier_block *nb,
725 unsigned long action, void *data)
727 struct device *dev = data;
728 struct i2c_client *client;
731 case BUS_NOTIFY_ADD_DEVICE:
732 client = i2c_verify_client(dev);
734 ts_dmi_add_props(client);
744 static struct notifier_block ts_dmi_notifier = {
745 .notifier_call = ts_dmi_notifier_call,
748 static int __init ts_dmi_init(void)
750 const struct dmi_system_id *dmi_id;
753 dmi_id = dmi_first_match(touchscreen_dmi_table);
755 return 0; /* Not an error */
757 ts_data = dmi_id->driver_data;
759 error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
761 pr_err("%s: failed to register i2c bus notifier: %d\n",
768 * We are registering out notifier after i2c core is initialized and i2c bus
769 * itself is ready (which happens at postcore initcall level), but before
770 * ACPI starts enumerating devices (at subsys initcall level).
772 arch_initcall(ts_dmi_init);