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", "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_air_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", "gsl3676-chuwi-hi8-air.fw"),
49 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
53 static const struct ts_dmi_data chuwi_hi8_air_data
= {
54 .acpi_name
= "MSSL1680:00",
55 .properties
= chuwi_hi8_air_props
,
58 static const struct property_entry chuwi_hi8_pro_props
[] = {
59 PROPERTY_ENTRY_U32("touchscreen-min-x", 6),
60 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
61 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
62 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
63 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
64 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-hi8-pro.fw"),
65 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
66 PROPERTY_ENTRY_BOOL("silead,home-button"),
70 static const struct ts_dmi_data chuwi_hi8_pro_data
= {
71 .acpi_name
= "MSSL1680:00",
72 .properties
= chuwi_hi8_pro_props
,
75 static const struct property_entry chuwi_hi10_air_props
[] = {
76 PROPERTY_ENTRY_U32("touchscreen-size-x", 1981),
77 PROPERTY_ENTRY_U32("touchscreen-size-y", 1271),
78 PROPERTY_ENTRY_U32("touchscreen-min-x", 99),
79 PROPERTY_ENTRY_U32("touchscreen-min-y", 9),
80 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
81 PROPERTY_ENTRY_U32("touchscreen-fuzz-x", 5),
82 PROPERTY_ENTRY_U32("touchscreen-fuzz-y", 4),
83 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10-air.fw"),
84 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
85 PROPERTY_ENTRY_BOOL("silead,home-button"),
89 static const struct ts_dmi_data chuwi_hi10_air_data
= {
90 .acpi_name
= "MSSL1680:00",
91 .properties
= chuwi_hi10_air_props
,
94 static const struct property_entry chuwi_vi8_props
[] = {
95 PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
96 PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
97 PROPERTY_ENTRY_U32("touchscreen-size-x", 1724),
98 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
99 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
100 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-vi8.fw"),
101 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
102 PROPERTY_ENTRY_BOOL("silead,home-button"),
106 static const struct ts_dmi_data chuwi_vi8_data
= {
107 .acpi_name
= "MSSL1680:00",
108 .properties
= chuwi_vi8_props
,
111 static const struct property_entry chuwi_vi10_props
[] = {
112 PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
113 PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
114 PROPERTY_ENTRY_U32("touchscreen-size-x", 1858),
115 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
116 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-vi10.fw"),
117 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
118 PROPERTY_ENTRY_BOOL("silead,home-button"),
122 static const struct ts_dmi_data chuwi_vi10_data
= {
123 .acpi_name
= "MSSL0002:00",
124 .properties
= chuwi_vi10_props
,
127 static const struct property_entry connect_tablet9_props
[] = {
128 PROPERTY_ENTRY_U32("touchscreen-min-x", 9),
129 PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
130 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
131 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
132 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
133 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
134 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-connect-tablet9.fw"),
135 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
139 static const struct ts_dmi_data connect_tablet9_data
= {
140 .acpi_name
= "MSSL1680:00",
141 .properties
= connect_tablet9_props
,
144 static const struct property_entry cube_iwork8_air_props
[] = {
145 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
146 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
147 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
148 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
149 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
150 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-cube-iwork8-air.fw"),
151 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
155 static const struct ts_dmi_data cube_iwork8_air_data
= {
156 .acpi_name
= "MSSL1680:00",
157 .properties
= cube_iwork8_air_props
,
160 static const struct property_entry cube_knote_i1101_props
[] = {
161 PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
162 PROPERTY_ENTRY_U32("touchscreen-min-y", 22),
163 PROPERTY_ENTRY_U32("touchscreen-size-x", 1961),
164 PROPERTY_ENTRY_U32("touchscreen-size-y", 1513),
165 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-cube-knote-i1101.fw"),
166 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
167 PROPERTY_ENTRY_BOOL("silead,home-button"),
171 static const struct ts_dmi_data cube_knote_i1101_data
= {
172 .acpi_name
= "MSSL1680:00",
173 .properties
= cube_knote_i1101_props
,
176 static const struct property_entry dexp_ursus_7w_props
[] = {
177 PROPERTY_ENTRY_U32("touchscreen-size-x", 890),
178 PROPERTY_ENTRY_U32("touchscreen-size-y", 630),
179 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-dexp-ursus-7w.fw"),
180 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
181 PROPERTY_ENTRY_BOOL("silead,home-button"),
185 static const struct ts_dmi_data dexp_ursus_7w_data
= {
186 .acpi_name
= "MSSL1680:00",
187 .properties
= dexp_ursus_7w_props
,
190 static const struct property_entry digma_citi_e200_props
[] = {
191 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
192 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
193 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
194 PROPERTY_ENTRY_STRING("firmware-name",
195 "gsl1686-digma_citi_e200.fw"),
196 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
197 PROPERTY_ENTRY_BOOL("silead,home-button"),
201 static const struct ts_dmi_data digma_citi_e200_data
= {
202 .acpi_name
= "MSSL1680:00",
203 .properties
= digma_citi_e200_props
,
206 static const struct property_entry gp_electronic_t701_props
[] = {
207 PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
208 PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
209 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
210 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
211 PROPERTY_ENTRY_STRING("firmware-name",
212 "gsl1680-gp-electronic-t701.fw"),
216 static const struct ts_dmi_data gp_electronic_t701_data
= {
217 .acpi_name
= "MSSL1680:00",
218 .properties
= gp_electronic_t701_props
,
221 static const struct property_entry itworks_tw891_props
[] = {
222 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
223 PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
224 PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
225 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
226 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
227 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
228 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
229 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
233 static const struct ts_dmi_data itworks_tw891_data
= {
234 .acpi_name
= "MSSL1680:00",
235 .properties
= itworks_tw891_props
,
238 static const struct property_entry jumper_ezpad_6_pro_props
[] = {
239 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
240 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
241 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"),
242 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
243 PROPERTY_ENTRY_BOOL("silead,home-button"),
247 static const struct ts_dmi_data jumper_ezpad_6_pro_data
= {
248 .acpi_name
= "MSSL1680:00",
249 .properties
= jumper_ezpad_6_pro_props
,
252 static const struct property_entry jumper_ezpad_6_pro_b_props
[] = {
253 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
254 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
255 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro-b.fw"),
256 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
257 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
258 PROPERTY_ENTRY_BOOL("silead,home-button"),
262 static const struct ts_dmi_data jumper_ezpad_6_pro_b_data
= {
263 .acpi_name
= "MSSL1680:00",
264 .properties
= jumper_ezpad_6_pro_b_props
,
267 static const struct property_entry jumper_ezpad_mini3_props
[] = {
268 PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
269 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
270 PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
271 PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
272 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
273 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
274 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
278 static const struct ts_dmi_data jumper_ezpad_mini3_data
= {
279 .acpi_name
= "MSSL1680:00",
280 .properties
= jumper_ezpad_mini3_props
,
283 static const struct property_entry myria_my8307_props
[] = {
284 PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
285 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
286 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
287 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
288 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
289 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-myria-my8307.fw"),
290 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
291 PROPERTY_ENTRY_BOOL("silead,home-button"),
295 static const struct ts_dmi_data myria_my8307_data
= {
296 .acpi_name
= "MSSL1680:00",
297 .properties
= myria_my8307_props
,
300 static const struct property_entry onda_obook_20_plus_props
[] = {
301 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
302 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
303 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
304 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
305 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
306 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
307 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
308 PROPERTY_ENTRY_BOOL("silead,home-button"),
312 static const struct ts_dmi_data onda_obook_20_plus_data
= {
313 .acpi_name
= "MSSL1680:00",
314 .properties
= onda_obook_20_plus_props
,
317 static const struct property_entry onda_v80_plus_v3_props
[] = {
318 PROPERTY_ENTRY_U32("touchscreen-min-x", 22),
319 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
320 PROPERTY_ENTRY_U32("touchscreen-size-x", 1698),
321 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
322 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
323 PROPERTY_ENTRY_STRING("firmware-name",
324 "gsl3676-onda-v80-plus-v3.fw"),
325 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
326 PROPERTY_ENTRY_BOOL("silead,home-button"),
330 static const struct ts_dmi_data onda_v80_plus_v3_data
= {
331 .acpi_name
= "MSSL1680:00",
332 .properties
= onda_v80_plus_v3_props
,
335 static const struct property_entry onda_v820w_32g_props
[] = {
336 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
337 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
338 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
339 PROPERTY_ENTRY_STRING("firmware-name",
340 "gsl1680-onda-v820w-32g.fw"),
341 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
342 PROPERTY_ENTRY_BOOL("silead,home-button"),
346 static const struct ts_dmi_data onda_v820w_32g_data
= {
347 .acpi_name
= "MSSL1680:00",
348 .properties
= onda_v820w_32g_props
,
351 static const struct property_entry onda_v891w_v1_props
[] = {
352 PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
353 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
354 PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
355 PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
356 PROPERTY_ENTRY_STRING("firmware-name",
357 "gsl3680-onda-v891w-v1.fw"),
358 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
359 PROPERTY_ENTRY_BOOL("silead,home-button"),
363 static const struct ts_dmi_data onda_v891w_v1_data
= {
364 .acpi_name
= "MSSL1680:00",
365 .properties
= onda_v891w_v1_props
,
368 static const struct property_entry onda_v891w_v3_props
[] = {
369 PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
370 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
371 PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
372 PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
373 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
374 PROPERTY_ENTRY_STRING("firmware-name",
375 "gsl3676-onda-v891w-v3.fw"),
376 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
377 PROPERTY_ENTRY_BOOL("silead,home-button"),
381 static const struct ts_dmi_data onda_v891w_v3_data
= {
382 .acpi_name
= "MSSL1680:00",
383 .properties
= onda_v891w_v3_props
,
386 static const struct property_entry pipo_w2s_props
[] = {
387 PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
388 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
389 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
390 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
391 PROPERTY_ENTRY_STRING("firmware-name",
392 "gsl1680-pipo-w2s.fw"),
396 static const struct ts_dmi_data pipo_w2s_data
= {
397 .acpi_name
= "MSSL1680:00",
398 .properties
= pipo_w2s_props
,
401 static const struct property_entry pov_mobii_wintab_p800w_v20_props
[] = {
402 PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
403 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
404 PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
405 PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
406 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
407 PROPERTY_ENTRY_STRING("firmware-name",
408 "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
409 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
410 PROPERTY_ENTRY_BOOL("silead,home-button"),
414 static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data
= {
415 .acpi_name
= "MSSL1680:00",
416 .properties
= pov_mobii_wintab_p800w_v20_props
,
419 static const struct property_entry pov_mobii_wintab_p800w_v21_props
[] = {
420 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
421 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
422 PROPERTY_ENTRY_U32("touchscreen-size-x", 1794),
423 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
424 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
425 PROPERTY_ENTRY_STRING("firmware-name",
426 "gsl3692-pov-mobii-wintab-p800w.fw"),
427 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
428 PROPERTY_ENTRY_BOOL("silead,home-button"),
432 static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data
= {
433 .acpi_name
= "MSSL1680:00",
434 .properties
= pov_mobii_wintab_p800w_v21_props
,
437 static const struct property_entry pov_mobii_wintab_p1006w_v10_props
[] = {
438 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
439 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
440 PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
441 PROPERTY_ENTRY_U32("touchscreen-size-y", 1520),
442 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
443 PROPERTY_ENTRY_STRING("firmware-name",
444 "gsl3692-pov-mobii-wintab-p1006w-v10.fw"),
445 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
446 PROPERTY_ENTRY_BOOL("silead,home-button"),
450 static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data
= {
451 .acpi_name
= "MSSL1680:00",
452 .properties
= pov_mobii_wintab_p1006w_v10_props
,
455 static const struct property_entry teclast_x3_plus_props
[] = {
456 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
457 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
458 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"),
459 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
460 PROPERTY_ENTRY_BOOL("silead,home-button"),
464 static const struct ts_dmi_data teclast_x3_plus_data
= {
465 .acpi_name
= "MSSL1680:00",
466 .properties
= teclast_x3_plus_props
,
469 static const struct property_entry teclast_x98plus2_props
[] = {
470 PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
471 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
472 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
473 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
474 PROPERTY_ENTRY_STRING("firmware-name",
475 "gsl1686-teclast_x98plus2.fw"),
476 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
480 static const struct ts_dmi_data teclast_x98plus2_data
= {
481 .acpi_name
= "MSSL1680:00",
482 .properties
= teclast_x98plus2_props
,
485 static const struct property_entry trekstor_primebook_c11_props
[] = {
486 PROPERTY_ENTRY_U32("touchscreen-size-x", 1970),
487 PROPERTY_ENTRY_U32("touchscreen-size-y", 1530),
488 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
489 PROPERTY_ENTRY_STRING("firmware-name",
490 "gsl1680-trekstor-primebook-c11.fw"),
491 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
492 PROPERTY_ENTRY_BOOL("silead,home-button"),
496 static const struct ts_dmi_data trekstor_primebook_c11_data
= {
497 .acpi_name
= "MSSL1680:00",
498 .properties
= trekstor_primebook_c11_props
,
501 static const struct property_entry trekstor_primebook_c13_props
[] = {
502 PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
503 PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
504 PROPERTY_ENTRY_STRING("firmware-name",
505 "gsl1680-trekstor-primebook-c13.fw"),
506 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
507 PROPERTY_ENTRY_BOOL("silead,home-button"),
511 static const struct ts_dmi_data trekstor_primebook_c13_data
= {
512 .acpi_name
= "MSSL1680:00",
513 .properties
= trekstor_primebook_c13_props
,
516 static const struct property_entry trekstor_primetab_t13b_props
[] = {
517 PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
518 PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
519 PROPERTY_ENTRY_STRING("firmware-name",
520 "gsl1680-trekstor-primetab-t13b.fw"),
521 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
522 PROPERTY_ENTRY_BOOL("silead,home-button"),
523 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
527 static const struct ts_dmi_data trekstor_primetab_t13b_data
= {
528 .acpi_name
= "MSSL1680:00",
529 .properties
= trekstor_primetab_t13b_props
,
532 static const struct property_entry trekstor_surftab_twin_10_1_props
[] = {
533 PROPERTY_ENTRY_U32("touchscreen-size-x", 1900),
534 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
535 PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
536 PROPERTY_ENTRY_STRING("firmware-name",
537 "gsl3670-surftab-twin-10-1-st10432-8.fw"),
538 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
542 static const struct ts_dmi_data trekstor_surftab_twin_10_1_data
= {
543 .acpi_name
= "MSSL1680:00",
544 .properties
= trekstor_surftab_twin_10_1_props
,
547 static const struct property_entry trekstor_surftab_wintron70_props
[] = {
548 PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
549 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
550 PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
551 PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
552 PROPERTY_ENTRY_STRING("firmware-name",
553 "gsl1686-surftab-wintron70-st70416-6.fw"),
554 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
555 PROPERTY_ENTRY_BOOL("silead,home-button"),
559 static const struct ts_dmi_data trekstor_surftab_wintron70_data
= {
560 .acpi_name
= "MSSL1680:00",
561 .properties
= trekstor_surftab_wintron70_props
,
564 /* NOTE: Please keep this table sorted alphabetically */
565 static const struct dmi_system_id touchscreen_dmi_table
[] = {
568 .driver_data
= (void *)&chuwi_hi8_data
,
570 DMI_MATCH(DMI_SYS_VENDOR
, "ilife"),
571 DMI_MATCH(DMI_PRODUCT_NAME
, "S806"),
575 /* Chuwi Hi8 (H1D_S806_206) */
576 .driver_data
= (void *)&chuwi_hi8_data
,
578 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
579 DMI_MATCH(DMI_PRODUCT_NAME
, "BayTrail"),
580 DMI_MATCH(DMI_BIOS_VERSION
, "H1D_S806_206"),
584 /* Chuwi Hi8 Air (CWI543) */
585 .driver_data
= (void *)&chuwi_hi8_air_data
,
587 DMI_MATCH(DMI_BOARD_VENDOR
, "Default string"),
588 DMI_MATCH(DMI_BOARD_NAME
, "Cherry Trail CR"),
589 DMI_MATCH(DMI_PRODUCT_NAME
, "Hi8 Air"),
593 /* Chuwi Hi8 Pro (CWI513) */
594 .driver_data
= (void *)&chuwi_hi8_pro_data
,
596 DMI_MATCH(DMI_SYS_VENDOR
, "Hampoo"),
597 DMI_MATCH(DMI_PRODUCT_NAME
, "X1D3_C806N"),
602 .driver_data
= (void *)&chuwi_hi10_air_data
,
604 DMI_MATCH(DMI_BOARD_VENDOR
, "Hampoo"),
605 DMI_MATCH(DMI_PRODUCT_SKU
, "P1W6_C109D_B"),
609 /* Chuwi Vi8 (CWI506) */
610 .driver_data
= (void *)&chuwi_vi8_data
,
612 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
613 DMI_MATCH(DMI_PRODUCT_NAME
, "i86"),
614 DMI_MATCH(DMI_BIOS_VERSION
, "CHUWI.D86JLBNR"),
618 /* Chuwi Vi10 (CWI505) */
619 .driver_data
= (void *)&chuwi_vi10_data
,
621 DMI_MATCH(DMI_BOARD_VENDOR
, "Hampoo"),
622 DMI_MATCH(DMI_BOARD_NAME
, "BYT-PF02"),
623 DMI_MATCH(DMI_SYS_VENDOR
, "ilife"),
624 DMI_MATCH(DMI_PRODUCT_NAME
, "S165"),
628 /* Connect Tablet 9 */
629 .driver_data
= (void *)&connect_tablet9_data
,
631 DMI_MATCH(DMI_SYS_VENDOR
, "Connect"),
632 DMI_MATCH(DMI_PRODUCT_NAME
, "Tablet 9"),
636 /* CUBE iwork8 Air */
637 .driver_data
= (void *)&cube_iwork8_air_data
,
639 DMI_MATCH(DMI_SYS_VENDOR
, "cube"),
640 DMI_MATCH(DMI_PRODUCT_NAME
, "i1-TF"),
641 DMI_MATCH(DMI_BOARD_NAME
, "Cherry Trail CR"),
645 /* Cube KNote i1101 */
646 .driver_data
= (void *)&cube_knote_i1101_data
,
648 DMI_MATCH(DMI_BOARD_VENDOR
, "Hampoo"),
649 DMI_MATCH(DMI_BOARD_NAME
, "L1W6_I1101"),
650 DMI_MATCH(DMI_SYS_VENDOR
, "ALLDOCUBE"),
651 DMI_MATCH(DMI_PRODUCT_NAME
, "i1101"),
656 .driver_data
= (void *)&dexp_ursus_7w_data
,
658 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
659 DMI_MATCH(DMI_PRODUCT_NAME
, "7W"),
663 /* Digma Citi E200 */
664 .driver_data
= (void *)&digma_citi_e200_data
,
666 DMI_MATCH(DMI_SYS_VENDOR
, "Digma"),
667 DMI_MATCH(DMI_PRODUCT_NAME
, "CITI E200"),
668 DMI_MATCH(DMI_BOARD_NAME
, "Cherry Trail CR"),
672 /* GP-electronic T701 */
673 .driver_data
= (void *)&gp_electronic_t701_data
,
675 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
676 DMI_MATCH(DMI_PRODUCT_NAME
, "T701"),
677 DMI_MATCH(DMI_BIOS_VERSION
, "BYT70A.YNCHENG.WIN.007"),
681 /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
682 .driver_data
= (void *)&trekstor_surftab_wintron70_data
,
684 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
685 DMI_MATCH(DMI_PRODUCT_NAME
, "i71c"),
686 DMI_MATCH(DMI_BIOS_VERSION
, "itWORKS.G.WI71C.JGBMRB"),
690 /* I.T.Works TW891 */
691 .driver_data
= (void *)&itworks_tw891_data
,
693 DMI_MATCH(DMI_SYS_VENDOR
, "To be filled by O.E.M."),
694 DMI_MATCH(DMI_PRODUCT_NAME
, "TW891"),
698 /* Jumper EZpad 6 Pro */
699 .driver_data
= (void *)&jumper_ezpad_6_pro_data
,
701 DMI_MATCH(DMI_SYS_VENDOR
, "Jumper"),
702 DMI_MATCH(DMI_PRODUCT_NAME
, "EZpad"),
703 DMI_MATCH(DMI_BIOS_VERSION
, "5.12"),
704 /* Above matches are too generic, add bios-date match */
705 DMI_MATCH(DMI_BIOS_DATE
, "08/18/2017"),
709 /* Jumper EZpad 6 Pro B */
710 .driver_data
= (void *)&jumper_ezpad_6_pro_b_data
,
712 DMI_MATCH(DMI_SYS_VENDOR
, "Jumper"),
713 DMI_MATCH(DMI_PRODUCT_NAME
, "EZpad"),
714 DMI_MATCH(DMI_BIOS_VERSION
, "5.12"),
715 /* Above matches are too generic, add bios-date match */
716 DMI_MATCH(DMI_BIOS_DATE
, "04/24/2018"),
720 /* Jumper EZpad mini3 */
721 .driver_data
= (void *)&jumper_ezpad_mini3_data
,
723 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
724 /* jumperx.T87.KFBNEEA02 with the version-nr dropped */
725 DMI_MATCH(DMI_BIOS_VERSION
, "jumperx.T87.KFBNEEA"),
729 /* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */
730 .driver_data
= (void *)&trekstor_primebook_c11_data
,
732 DMI_MATCH(DMI_SYS_VENDOR
, "MEDIACOM"),
733 DMI_MATCH(DMI_PRODUCT_NAME
, "FlexBook edge11 - M-FBE11"),
738 .driver_data
= (void *)&myria_my8307_data
,
740 DMI_MATCH(DMI_SYS_VENDOR
, "Complet Electro Serv"),
741 DMI_MATCH(DMI_PRODUCT_NAME
, "MY8307"),
745 /* Onda oBook 20 Plus */
746 .driver_data
= (void *)&onda_obook_20_plus_data
,
748 DMI_MATCH(DMI_SYS_VENDOR
, "ONDA"),
749 DMI_MATCH(DMI_PRODUCT_NAME
, "OBOOK 20 PLUS"),
753 /* ONDA V80 plus v3 (P80PSBG9V3A01501) */
754 .driver_data
= (void *)&onda_v80_plus_v3_data
,
756 DMI_EXACT_MATCH(DMI_SYS_VENDOR
, "ONDA"),
757 DMI_EXACT_MATCH(DMI_PRODUCT_NAME
, "V80 PLUS")
761 /* ONDA V820w DualOS */
762 .driver_data
= (void *)&onda_v820w_32g_data
,
764 DMI_EXACT_MATCH(DMI_BOARD_VENDOR
, "ONDA"),
765 DMI_EXACT_MATCH(DMI_PRODUCT_NAME
, "V820w DualOS")
769 /* ONDA V891w revision P891WBEBV1B00 aka v1 */
770 .driver_data
= (void *)&onda_v891w_v1_data
,
772 DMI_EXACT_MATCH(DMI_BOARD_VENDOR
, "ONDA"),
773 DMI_EXACT_MATCH(DMI_BOARD_NAME
, "ONDA Tablet"),
774 DMI_EXACT_MATCH(DMI_BOARD_VERSION
, "V001"),
775 /* Exact match, different versions need different fw */
776 DMI_EXACT_MATCH(DMI_BIOS_VERSION
, "ONDA.W89EBBN08"),
780 /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
781 .driver_data
= (void *)&onda_v891w_v3_data
,
783 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
784 DMI_MATCH(DMI_PRODUCT_NAME
, "ONDA Tablet"),
785 DMI_MATCH(DMI_BIOS_VERSION
, "ONDA.D890HBBNR0A"),
790 .driver_data
= (void *)&pipo_w2s_data
,
792 DMI_MATCH(DMI_SYS_VENDOR
, "PIPO"),
793 DMI_MATCH(DMI_PRODUCT_NAME
, "W2S"),
797 /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
798 .driver_data
= (void *)&trekstor_surftab_wintron70_data
,
800 DMI_MATCH(DMI_SYS_VENDOR
, "Shenzhen PLOYER"),
801 DMI_MATCH(DMI_PRODUCT_NAME
, "MOMO7W"),
802 /* Exact match, different versions need different fw */
803 DMI_MATCH(DMI_BIOS_VERSION
, "MOMO.G.WI71C.MABMRBA02"),
807 /* Point of View mobii wintab p800w (v2.0) */
808 .driver_data
= (void *)&pov_mobii_wintab_p800w_v20_data
,
810 DMI_MATCH(DMI_BOARD_VENDOR
, "AMI Corporation"),
811 DMI_MATCH(DMI_BOARD_NAME
, "Aptio CRB"),
812 DMI_MATCH(DMI_BIOS_VERSION
, "3BAIR1014"),
813 /* Above matches are too generic, add bios-date match */
814 DMI_MATCH(DMI_BIOS_DATE
, "10/24/2014"),
818 /* Point of View mobii wintab p800w (v2.1) */
819 .driver_data
= (void *)&pov_mobii_wintab_p800w_v21_data
,
821 DMI_MATCH(DMI_BOARD_VENDOR
, "AMI Corporation"),
822 DMI_MATCH(DMI_BOARD_NAME
, "Aptio CRB"),
823 DMI_MATCH(DMI_BIOS_VERSION
, "3BAIR1013"),
824 /* Above matches are too generic, add bios-date match */
825 DMI_MATCH(DMI_BIOS_DATE
, "08/22/2014"),
829 /* Point of View mobii wintab p1006w (v1.0) */
830 .driver_data
= (void *)&pov_mobii_wintab_p1006w_v10_data
,
832 DMI_EXACT_MATCH(DMI_SYS_VENDOR
, "Insyde"),
833 DMI_EXACT_MATCH(DMI_PRODUCT_NAME
, "BayTrail"),
834 /* Note 105b is Foxcon's USB/PCI vendor id */
835 DMI_EXACT_MATCH(DMI_BOARD_VENDOR
, "105B"),
836 DMI_EXACT_MATCH(DMI_BOARD_NAME
, "0E57"),
840 /* Teclast X3 Plus */
841 .driver_data
= (void *)&teclast_x3_plus_data
,
843 DMI_MATCH(DMI_SYS_VENDOR
, "TECLAST"),
844 DMI_MATCH(DMI_PRODUCT_NAME
, "X3 Plus"),
845 DMI_MATCH(DMI_BOARD_NAME
, "X3 Plus"),
849 /* Teclast X98 Plus II */
850 .driver_data
= (void *)&teclast_x98plus2_data
,
852 DMI_MATCH(DMI_SYS_VENDOR
, "TECLAST"),
853 DMI_MATCH(DMI_PRODUCT_NAME
, "X98 Plus II"),
857 /* Trekstor Primebook C11 */
858 .driver_data
= (void *)&trekstor_primebook_c11_data
,
860 DMI_MATCH(DMI_SYS_VENDOR
, "TREKSTOR"),
861 DMI_MATCH(DMI_PRODUCT_NAME
, "Primebook C11"),
865 /* Trekstor Primebook C13 */
866 .driver_data
= (void *)&trekstor_primebook_c13_data
,
868 DMI_MATCH(DMI_SYS_VENDOR
, "TREKSTOR"),
869 DMI_MATCH(DMI_PRODUCT_NAME
, "Primebook C13"),
873 /* Trekstor Primetab T13B */
874 .driver_data
= (void *)&trekstor_primetab_t13b_data
,
876 DMI_MATCH(DMI_SYS_VENDOR
, "TREKSTOR"),
877 DMI_MATCH(DMI_PRODUCT_NAME
, "Primetab T13B"),
881 /* TrekStor SurfTab twin 10.1 ST10432-8 */
882 .driver_data
= (void *)&trekstor_surftab_twin_10_1_data
,
884 DMI_MATCH(DMI_SYS_VENDOR
, "TrekStor"),
885 DMI_MATCH(DMI_PRODUCT_NAME
, "SurfTab twin 10.1"),
889 /* Trekstor Surftab Wintron 7.0 ST70416-6 */
890 .driver_data
= (void *)&trekstor_surftab_wintron70_data
,
892 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
893 DMI_MATCH(DMI_PRODUCT_NAME
, "ST70416-6"),
894 /* Exact match, different versions need different fw */
895 DMI_MATCH(DMI_BIOS_VERSION
, "TREK.G.WI71C.JGBMRBA04"),
899 /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
900 .driver_data
= (void *)&trekstor_surftab_wintron70_data
,
902 DMI_MATCH(DMI_SYS_VENDOR
, "TrekStor"),
903 DMI_MATCH(DMI_PRODUCT_NAME
,
904 "SurfTab wintron 7.0 ST70416-6"),
905 /* Exact match, different versions need different fw */
906 DMI_MATCH(DMI_BIOS_VERSION
, "TREK.G.WI71C.JGBMRBA05"),
910 /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
911 .driver_data
= (void *)&chuwi_vi8_data
,
913 DMI_MATCH(DMI_SYS_VENDOR
, "YOURS"),
914 DMI_MATCH(DMI_PRODUCT_NAME
, "Y8W81"),
920 static const struct ts_dmi_data
*ts_data
;
922 static void ts_dmi_add_props(struct i2c_client
*client
)
924 struct device
*dev
= &client
->dev
;
927 if (has_acpi_companion(dev
) &&
928 !strncmp(ts_data
->acpi_name
, client
->name
, I2C_NAME_SIZE
)) {
929 error
= device_add_properties(dev
, ts_data
->properties
);
931 dev_err(dev
, "failed to add properties: %d\n", error
);
935 static int ts_dmi_notifier_call(struct notifier_block
*nb
,
936 unsigned long action
, void *data
)
938 struct device
*dev
= data
;
939 struct i2c_client
*client
;
942 case BUS_NOTIFY_ADD_DEVICE
:
943 client
= i2c_verify_client(dev
);
945 ts_dmi_add_props(client
);
955 static struct notifier_block ts_dmi_notifier
= {
956 .notifier_call
= ts_dmi_notifier_call
,
959 static int __init
ts_dmi_init(void)
961 const struct dmi_system_id
*dmi_id
;
964 dmi_id
= dmi_first_match(touchscreen_dmi_table
);
966 return 0; /* Not an error */
968 ts_data
= dmi_id
->driver_data
;
970 error
= bus_register_notifier(&i2c_bus_type
, &ts_dmi_notifier
);
972 pr_err("%s: failed to register i2c bus notifier: %d\n",
979 * We are registering out notifier after i2c core is initialized and i2c bus
980 * itself is ready (which happens at postcore initcall level), but before
981 * ACPI starts enumerating devices (at subsys initcall level).
983 arch_initcall(ts_dmi_init
);