1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Touchscreen driver DMI based configuration code
5 * Copyright (c) 2017 Red Hat Inc.
8 * Hans de Goede <hdegoede@redhat.com>
11 #include <linux/acpi.h>
12 #include <linux/device.h>
13 #include <linux/dmi.h>
14 #include <linux/i2c.h>
15 #include <linux/notifier.h>
16 #include <linux/property.h>
17 #include <linux/string.h>
20 const char *acpi_name
;
21 const struct property_entry
*properties
;
24 /* NOTE: Please keep all entries sorted alphabetically */
26 static const struct property_entry chuwi_hi8_props
[] = {
27 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
28 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
29 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
30 PROPERTY_ENTRY_BOOL("silead,home-button"),
31 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi8.fw"),
35 static const struct ts_dmi_data chuwi_hi8_data
= {
36 .acpi_name
= "MSSL0001:00",
37 .properties
= chuwi_hi8_props
,
40 static const struct property_entry chuwi_hi8_air_props
[] = {
41 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
42 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
43 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
44 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-hi8-air.fw"),
45 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
49 static const struct ts_dmi_data chuwi_hi8_air_data
= {
50 .acpi_name
= "MSSL1680:00",
51 .properties
= chuwi_hi8_air_props
,
54 static const struct property_entry chuwi_hi8_pro_props
[] = {
55 PROPERTY_ENTRY_U32("touchscreen-min-x", 6),
56 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
57 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
58 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
59 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
60 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-hi8-pro.fw"),
61 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
62 PROPERTY_ENTRY_BOOL("silead,home-button"),
66 static const struct ts_dmi_data chuwi_hi8_pro_data
= {
67 .acpi_name
= "MSSL1680:00",
68 .properties
= chuwi_hi8_pro_props
,
71 static const struct property_entry chuwi_hi10_air_props
[] = {
72 PROPERTY_ENTRY_U32("touchscreen-size-x", 1981),
73 PROPERTY_ENTRY_U32("touchscreen-size-y", 1271),
74 PROPERTY_ENTRY_U32("touchscreen-min-x", 99),
75 PROPERTY_ENTRY_U32("touchscreen-min-y", 9),
76 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
77 PROPERTY_ENTRY_U32("touchscreen-fuzz-x", 5),
78 PROPERTY_ENTRY_U32("touchscreen-fuzz-y", 4),
79 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10-air.fw"),
80 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
81 PROPERTY_ENTRY_BOOL("silead,home-button"),
85 static const struct ts_dmi_data chuwi_hi10_air_data
= {
86 .acpi_name
= "MSSL1680:00",
87 .properties
= chuwi_hi10_air_props
,
90 static const struct property_entry chuwi_hi10_plus_props
[] = {
91 PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
92 PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
93 PROPERTY_ENTRY_U32("touchscreen-size-x", 1914),
94 PROPERTY_ENTRY_U32("touchscreen-size-y", 1283),
95 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10plus.fw"),
96 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
97 PROPERTY_ENTRY_BOOL("silead,home-button"),
101 static const struct ts_dmi_data chuwi_hi10_plus_data
= {
102 .acpi_name
= "MSSL0017:00",
103 .properties
= chuwi_hi10_plus_props
,
106 static const struct property_entry chuwi_vi8_props
[] = {
107 PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
108 PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
109 PROPERTY_ENTRY_U32("touchscreen-size-x", 1724),
110 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
111 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
112 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-vi8.fw"),
113 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
114 PROPERTY_ENTRY_BOOL("silead,home-button"),
118 static const struct ts_dmi_data chuwi_vi8_data
= {
119 .acpi_name
= "MSSL1680:00",
120 .properties
= chuwi_vi8_props
,
123 static const struct property_entry chuwi_vi10_props
[] = {
124 PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
125 PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
126 PROPERTY_ENTRY_U32("touchscreen-size-x", 1858),
127 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
128 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-vi10.fw"),
129 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
130 PROPERTY_ENTRY_BOOL("silead,home-button"),
134 static const struct ts_dmi_data chuwi_vi10_data
= {
135 .acpi_name
= "MSSL0002:00",
136 .properties
= chuwi_vi10_props
,
139 static const struct property_entry chuwi_surbook_mini_props
[] = {
140 PROPERTY_ENTRY_U32("touchscreen-min-x", 88),
141 PROPERTY_ENTRY_U32("touchscreen-min-y", 13),
142 PROPERTY_ENTRY_U32("touchscreen-size-x", 2040),
143 PROPERTY_ENTRY_U32("touchscreen-size-y", 1524),
144 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-surbook-mini.fw"),
145 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
146 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
150 static const struct ts_dmi_data chuwi_surbook_mini_data
= {
151 .acpi_name
= "MSSL1680:00",
152 .properties
= chuwi_surbook_mini_props
,
155 static const struct property_entry connect_tablet9_props
[] = {
156 PROPERTY_ENTRY_U32("touchscreen-min-x", 9),
157 PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
158 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
159 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
160 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
161 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
162 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-connect-tablet9.fw"),
163 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
167 static const struct ts_dmi_data connect_tablet9_data
= {
168 .acpi_name
= "MSSL1680:00",
169 .properties
= connect_tablet9_props
,
172 static const struct property_entry cube_iwork8_air_props
[] = {
173 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
174 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
175 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
176 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
177 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
178 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-cube-iwork8-air.fw"),
179 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
183 static const struct ts_dmi_data cube_iwork8_air_data
= {
184 .acpi_name
= "MSSL1680:00",
185 .properties
= cube_iwork8_air_props
,
188 static const struct property_entry cube_knote_i1101_props
[] = {
189 PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
190 PROPERTY_ENTRY_U32("touchscreen-min-y", 22),
191 PROPERTY_ENTRY_U32("touchscreen-size-x", 1961),
192 PROPERTY_ENTRY_U32("touchscreen-size-y", 1513),
193 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-cube-knote-i1101.fw"),
194 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
195 PROPERTY_ENTRY_BOOL("silead,home-button"),
199 static const struct ts_dmi_data cube_knote_i1101_data
= {
200 .acpi_name
= "MSSL1680:00",
201 .properties
= cube_knote_i1101_props
,
204 static const struct property_entry dexp_ursus_7w_props
[] = {
205 PROPERTY_ENTRY_U32("touchscreen-size-x", 890),
206 PROPERTY_ENTRY_U32("touchscreen-size-y", 630),
207 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-dexp-ursus-7w.fw"),
208 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
209 PROPERTY_ENTRY_BOOL("silead,home-button"),
213 static const struct ts_dmi_data dexp_ursus_7w_data
= {
214 .acpi_name
= "MSSL1680:00",
215 .properties
= dexp_ursus_7w_props
,
218 static const struct property_entry digma_citi_e200_props
[] = {
219 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
220 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
221 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
222 PROPERTY_ENTRY_STRING("firmware-name",
223 "gsl1686-digma_citi_e200.fw"),
224 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
225 PROPERTY_ENTRY_BOOL("silead,home-button"),
229 static const struct ts_dmi_data digma_citi_e200_data
= {
230 .acpi_name
= "MSSL1680:00",
231 .properties
= digma_citi_e200_props
,
234 static const struct property_entry gp_electronic_t701_props
[] = {
235 PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
236 PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
237 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
238 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
239 PROPERTY_ENTRY_STRING("firmware-name",
240 "gsl1680-gp-electronic-t701.fw"),
244 static const struct ts_dmi_data gp_electronic_t701_data
= {
245 .acpi_name
= "MSSL1680:00",
246 .properties
= gp_electronic_t701_props
,
249 static const struct property_entry irbis_tw90_props
[] = {
250 PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
251 PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
252 PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
253 PROPERTY_ENTRY_U32("touchscreen-min-y", 14),
254 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
255 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
256 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-irbis_tw90.fw"),
257 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
258 PROPERTY_ENTRY_BOOL("silead,home-button"),
262 static const struct ts_dmi_data irbis_tw90_data
= {
263 .acpi_name
= "MSSL1680:00",
264 .properties
= irbis_tw90_props
,
267 static const struct property_entry itworks_tw891_props
[] = {
268 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
269 PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
270 PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
271 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
272 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
273 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
274 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
275 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
279 static const struct ts_dmi_data itworks_tw891_data
= {
280 .acpi_name
= "MSSL1680:00",
281 .properties
= itworks_tw891_props
,
284 static const struct property_entry jumper_ezpad_6_pro_props
[] = {
285 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
286 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
287 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"),
288 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
289 PROPERTY_ENTRY_BOOL("silead,home-button"),
293 static const struct ts_dmi_data jumper_ezpad_6_pro_data
= {
294 .acpi_name
= "MSSL1680:00",
295 .properties
= jumper_ezpad_6_pro_props
,
298 static const struct property_entry jumper_ezpad_6_pro_b_props
[] = {
299 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
300 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
301 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro-b.fw"),
302 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
303 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
304 PROPERTY_ENTRY_BOOL("silead,home-button"),
308 static const struct ts_dmi_data jumper_ezpad_6_pro_b_data
= {
309 .acpi_name
= "MSSL1680:00",
310 .properties
= jumper_ezpad_6_pro_b_props
,
313 static const struct property_entry jumper_ezpad_6_m4_props
[] = {
314 PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
315 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
316 PROPERTY_ENTRY_U32("touchscreen-size-x", 1950),
317 PROPERTY_ENTRY_U32("touchscreen-size-y", 1525),
318 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-m4.fw"),
319 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
320 PROPERTY_ENTRY_BOOL("silead,home-button"),
324 static const struct ts_dmi_data jumper_ezpad_6_m4_data
= {
325 .acpi_name
= "MSSL1680:00",
326 .properties
= jumper_ezpad_6_m4_props
,
329 static const struct property_entry jumper_ezpad_mini3_props
[] = {
330 PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
331 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
332 PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
333 PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
334 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
335 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
336 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
340 static const struct ts_dmi_data jumper_ezpad_mini3_data
= {
341 .acpi_name
= "MSSL1680:00",
342 .properties
= jumper_ezpad_mini3_props
,
345 static const struct property_entry myria_my8307_props
[] = {
346 PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
347 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
348 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
349 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
350 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
351 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-myria-my8307.fw"),
352 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
353 PROPERTY_ENTRY_BOOL("silead,home-button"),
357 static const struct ts_dmi_data myria_my8307_data
= {
358 .acpi_name
= "MSSL1680:00",
359 .properties
= myria_my8307_props
,
362 static const struct property_entry onda_obook_20_plus_props
[] = {
363 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
364 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
365 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
366 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
367 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
368 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
369 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
370 PROPERTY_ENTRY_BOOL("silead,home-button"),
374 static const struct ts_dmi_data onda_obook_20_plus_data
= {
375 .acpi_name
= "MSSL1680:00",
376 .properties
= onda_obook_20_plus_props
,
379 static const struct property_entry onda_v80_plus_v3_props
[] = {
380 PROPERTY_ENTRY_U32("touchscreen-min-x", 22),
381 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
382 PROPERTY_ENTRY_U32("touchscreen-size-x", 1698),
383 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
384 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
385 PROPERTY_ENTRY_STRING("firmware-name",
386 "gsl3676-onda-v80-plus-v3.fw"),
387 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
388 PROPERTY_ENTRY_BOOL("silead,home-button"),
392 static const struct ts_dmi_data onda_v80_plus_v3_data
= {
393 .acpi_name
= "MSSL1680:00",
394 .properties
= onda_v80_plus_v3_props
,
397 static const struct property_entry onda_v820w_32g_props
[] = {
398 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
399 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
400 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
401 PROPERTY_ENTRY_STRING("firmware-name",
402 "gsl1680-onda-v820w-32g.fw"),
403 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
404 PROPERTY_ENTRY_BOOL("silead,home-button"),
408 static const struct ts_dmi_data onda_v820w_32g_data
= {
409 .acpi_name
= "MSSL1680:00",
410 .properties
= onda_v820w_32g_props
,
413 static const struct property_entry onda_v891w_v1_props
[] = {
414 PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
415 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
416 PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
417 PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
418 PROPERTY_ENTRY_STRING("firmware-name",
419 "gsl3680-onda-v891w-v1.fw"),
420 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
421 PROPERTY_ENTRY_BOOL("silead,home-button"),
425 static const struct ts_dmi_data onda_v891w_v1_data
= {
426 .acpi_name
= "MSSL1680:00",
427 .properties
= onda_v891w_v1_props
,
430 static const struct property_entry onda_v891w_v3_props
[] = {
431 PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
432 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
433 PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
434 PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
435 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
436 PROPERTY_ENTRY_STRING("firmware-name",
437 "gsl3676-onda-v891w-v3.fw"),
438 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
439 PROPERTY_ENTRY_BOOL("silead,home-button"),
443 static const struct ts_dmi_data onda_v891w_v3_data
= {
444 .acpi_name
= "MSSL1680:00",
445 .properties
= onda_v891w_v3_props
,
448 static const struct property_entry pipo_w2s_props
[] = {
449 PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
450 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
451 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
452 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
453 PROPERTY_ENTRY_STRING("firmware-name",
454 "gsl1680-pipo-w2s.fw"),
458 static const struct ts_dmi_data pipo_w2s_data
= {
459 .acpi_name
= "MSSL1680:00",
460 .properties
= pipo_w2s_props
,
463 static const struct property_entry pov_mobii_wintab_p800w_v20_props
[] = {
464 PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
465 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
466 PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
467 PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
468 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
469 PROPERTY_ENTRY_STRING("firmware-name",
470 "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
471 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
472 PROPERTY_ENTRY_BOOL("silead,home-button"),
476 static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data
= {
477 .acpi_name
= "MSSL1680:00",
478 .properties
= pov_mobii_wintab_p800w_v20_props
,
481 static const struct property_entry pov_mobii_wintab_p800w_v21_props
[] = {
482 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
483 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
484 PROPERTY_ENTRY_U32("touchscreen-size-x", 1794),
485 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
486 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
487 PROPERTY_ENTRY_STRING("firmware-name",
488 "gsl3692-pov-mobii-wintab-p800w.fw"),
489 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
490 PROPERTY_ENTRY_BOOL("silead,home-button"),
494 static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data
= {
495 .acpi_name
= "MSSL1680:00",
496 .properties
= pov_mobii_wintab_p800w_v21_props
,
499 static const struct property_entry pov_mobii_wintab_p1006w_v10_props
[] = {
500 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
501 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
502 PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
503 PROPERTY_ENTRY_U32("touchscreen-size-y", 1520),
504 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
505 PROPERTY_ENTRY_STRING("firmware-name",
506 "gsl3692-pov-mobii-wintab-p1006w-v10.fw"),
507 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
508 PROPERTY_ENTRY_BOOL("silead,home-button"),
512 static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data
= {
513 .acpi_name
= "MSSL1680:00",
514 .properties
= pov_mobii_wintab_p1006w_v10_props
,
517 static const struct property_entry schneider_sct101ctm_props
[] = {
518 PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
519 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
520 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
521 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
522 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
523 PROPERTY_ENTRY_STRING("firmware-name",
524 "gsl1680-schneider-sct101ctm.fw"),
525 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
526 PROPERTY_ENTRY_BOOL("silead,home-button"),
530 static const struct ts_dmi_data schneider_sct101ctm_data
= {
531 .acpi_name
= "MSSL1680:00",
532 .properties
= schneider_sct101ctm_props
,
535 static const struct property_entry teclast_x3_plus_props
[] = {
536 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
537 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
538 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"),
539 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
540 PROPERTY_ENTRY_BOOL("silead,home-button"),
544 static const struct ts_dmi_data teclast_x3_plus_data
= {
545 .acpi_name
= "MSSL1680:00",
546 .properties
= teclast_x3_plus_props
,
549 static const struct property_entry teclast_x98plus2_props
[] = {
550 PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
551 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
552 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
553 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
554 PROPERTY_ENTRY_STRING("firmware-name",
555 "gsl1686-teclast_x98plus2.fw"),
556 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
560 static const struct ts_dmi_data teclast_x98plus2_data
= {
561 .acpi_name
= "MSSL1680:00",
562 .properties
= teclast_x98plus2_props
,
565 static const struct property_entry trekstor_primebook_c11_props
[] = {
566 PROPERTY_ENTRY_U32("touchscreen-size-x", 1970),
567 PROPERTY_ENTRY_U32("touchscreen-size-y", 1530),
568 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
569 PROPERTY_ENTRY_STRING("firmware-name",
570 "gsl1680-trekstor-primebook-c11.fw"),
571 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
572 PROPERTY_ENTRY_BOOL("silead,home-button"),
576 static const struct ts_dmi_data trekstor_primebook_c11_data
= {
577 .acpi_name
= "MSSL1680:00",
578 .properties
= trekstor_primebook_c11_props
,
581 static const struct property_entry trekstor_primebook_c13_props
[] = {
582 PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
583 PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
584 PROPERTY_ENTRY_STRING("firmware-name",
585 "gsl1680-trekstor-primebook-c13.fw"),
586 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
587 PROPERTY_ENTRY_BOOL("silead,home-button"),
591 static const struct ts_dmi_data trekstor_primebook_c13_data
= {
592 .acpi_name
= "MSSL1680:00",
593 .properties
= trekstor_primebook_c13_props
,
596 static const struct property_entry trekstor_primetab_t13b_props
[] = {
597 PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
598 PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
599 PROPERTY_ENTRY_STRING("firmware-name",
600 "gsl1680-trekstor-primetab-t13b.fw"),
601 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
602 PROPERTY_ENTRY_BOOL("silead,home-button"),
603 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
607 static const struct ts_dmi_data trekstor_primetab_t13b_data
= {
608 .acpi_name
= "MSSL1680:00",
609 .properties
= trekstor_primetab_t13b_props
,
612 static const struct property_entry trekstor_surftab_twin_10_1_props
[] = {
613 PROPERTY_ENTRY_U32("touchscreen-size-x", 1900),
614 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
615 PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
616 PROPERTY_ENTRY_STRING("firmware-name",
617 "gsl3670-surftab-twin-10-1-st10432-8.fw"),
618 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
622 static const struct ts_dmi_data trekstor_surftab_twin_10_1_data
= {
623 .acpi_name
= "MSSL1680:00",
624 .properties
= trekstor_surftab_twin_10_1_props
,
627 static const struct property_entry trekstor_surftab_wintron70_props
[] = {
628 PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
629 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
630 PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
631 PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
632 PROPERTY_ENTRY_STRING("firmware-name",
633 "gsl1686-surftab-wintron70-st70416-6.fw"),
634 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
635 PROPERTY_ENTRY_BOOL("silead,home-button"),
639 static const struct ts_dmi_data trekstor_surftab_wintron70_data
= {
640 .acpi_name
= "MSSL1680:00",
641 .properties
= trekstor_surftab_wintron70_props
,
644 /* NOTE: Please keep this table sorted alphabetically */
645 static const struct dmi_system_id touchscreen_dmi_table
[] = {
648 .driver_data
= (void *)&chuwi_hi8_data
,
650 DMI_MATCH(DMI_SYS_VENDOR
, "ilife"),
651 DMI_MATCH(DMI_PRODUCT_NAME
, "S806"),
655 /* Chuwi Hi8 (H1D_S806_206) */
656 .driver_data
= (void *)&chuwi_hi8_data
,
658 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
659 DMI_MATCH(DMI_PRODUCT_NAME
, "BayTrail"),
660 DMI_MATCH(DMI_BIOS_VERSION
, "H1D_S806_206"),
664 /* Chuwi Hi8 Air (CWI543) */
665 .driver_data
= (void *)&chuwi_hi8_air_data
,
667 DMI_MATCH(DMI_BOARD_VENDOR
, "Default string"),
668 DMI_MATCH(DMI_BOARD_NAME
, "Cherry Trail CR"),
669 DMI_MATCH(DMI_PRODUCT_NAME
, "Hi8 Air"),
673 /* Chuwi Hi8 Pro (CWI513) */
674 .driver_data
= (void *)&chuwi_hi8_pro_data
,
676 DMI_MATCH(DMI_SYS_VENDOR
, "Hampoo"),
677 DMI_MATCH(DMI_PRODUCT_NAME
, "X1D3_C806N"),
682 .driver_data
= (void *)&chuwi_hi10_air_data
,
684 DMI_MATCH(DMI_SYS_VENDOR
, "CHUWI INNOVATION AND TECHNOLOGY(SHENZHEN)CO.LTD"),
685 DMI_MATCH(DMI_BOARD_NAME
, "Cherry Trail CR"),
686 DMI_MATCH(DMI_PRODUCT_SKU
, "P1W6_C109D_B"),
690 /* Chuwi Hi10 Plus (CWI527) */
691 .driver_data
= (void *)&chuwi_hi10_plus_data
,
693 DMI_MATCH(DMI_BOARD_VENDOR
, "Hampoo"),
694 DMI_MATCH(DMI_PRODUCT_NAME
, "Hi10 plus tablet"),
695 DMI_MATCH(DMI_BOARD_NAME
, "Cherry Trail CR"),
699 /* Chuwi Vi8 (CWI506) */
700 .driver_data
= (void *)&chuwi_vi8_data
,
702 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
703 DMI_MATCH(DMI_PRODUCT_NAME
, "i86"),
704 DMI_MATCH(DMI_BIOS_VERSION
, "CHUWI.D86JLBNR"),
708 /* Chuwi Vi10 (CWI505) */
709 .driver_data
= (void *)&chuwi_vi10_data
,
711 DMI_MATCH(DMI_BOARD_VENDOR
, "Hampoo"),
712 DMI_MATCH(DMI_BOARD_NAME
, "BYT-PF02"),
713 DMI_MATCH(DMI_SYS_VENDOR
, "ilife"),
714 DMI_MATCH(DMI_PRODUCT_NAME
, "S165"),
718 /* Chuwi Surbook Mini (CWI540) */
719 .driver_data
= (void *)&chuwi_surbook_mini_data
,
721 DMI_MATCH(DMI_BOARD_VENDOR
, "Hampoo"),
722 DMI_MATCH(DMI_PRODUCT_NAME
, "C3W6_AP108_4G"),
726 /* Connect Tablet 9 */
727 .driver_data
= (void *)&connect_tablet9_data
,
729 DMI_MATCH(DMI_SYS_VENDOR
, "Connect"),
730 DMI_MATCH(DMI_PRODUCT_NAME
, "Tablet 9"),
734 /* CUBE iwork8 Air */
735 .driver_data
= (void *)&cube_iwork8_air_data
,
737 DMI_MATCH(DMI_SYS_VENDOR
, "cube"),
738 DMI_MATCH(DMI_PRODUCT_NAME
, "i1-TF"),
739 DMI_MATCH(DMI_BOARD_NAME
, "Cherry Trail CR"),
743 /* Cube KNote i1101 */
744 .driver_data
= (void *)&cube_knote_i1101_data
,
746 DMI_MATCH(DMI_BOARD_VENDOR
, "Hampoo"),
747 DMI_MATCH(DMI_BOARD_NAME
, "L1W6_I1101"),
748 DMI_MATCH(DMI_SYS_VENDOR
, "ALLDOCUBE"),
749 DMI_MATCH(DMI_PRODUCT_NAME
, "i1101"),
754 .driver_data
= (void *)&dexp_ursus_7w_data
,
756 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
757 DMI_MATCH(DMI_PRODUCT_NAME
, "7W"),
761 /* Digma Citi E200 */
762 .driver_data
= (void *)&digma_citi_e200_data
,
764 DMI_MATCH(DMI_SYS_VENDOR
, "Digma"),
765 DMI_MATCH(DMI_PRODUCT_NAME
, "CITI E200"),
766 DMI_MATCH(DMI_BOARD_NAME
, "Cherry Trail CR"),
770 /* GP-electronic T701 */
771 .driver_data
= (void *)&gp_electronic_t701_data
,
773 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
774 DMI_MATCH(DMI_PRODUCT_NAME
, "T701"),
775 DMI_MATCH(DMI_BIOS_VERSION
, "BYT70A.YNCHENG.WIN.007"),
779 /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
780 .driver_data
= (void *)&trekstor_surftab_wintron70_data
,
782 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
783 DMI_MATCH(DMI_PRODUCT_NAME
, "i71c"),
784 DMI_MATCH(DMI_BIOS_VERSION
, "itWORKS.G.WI71C.JGBMRB"),
789 .driver_data
= (void *)&irbis_tw90_data
,
791 DMI_MATCH(DMI_SYS_VENDOR
, "IRBIS"),
792 DMI_MATCH(DMI_PRODUCT_NAME
, "TW90"),
796 /* I.T.Works TW891 */
797 .driver_data
= (void *)&itworks_tw891_data
,
799 DMI_MATCH(DMI_SYS_VENDOR
, "To be filled by O.E.M."),
800 DMI_MATCH(DMI_PRODUCT_NAME
, "TW891"),
804 /* Jumper EZpad 6 Pro */
805 .driver_data
= (void *)&jumper_ezpad_6_pro_data
,
807 DMI_MATCH(DMI_SYS_VENDOR
, "Jumper"),
808 DMI_MATCH(DMI_PRODUCT_NAME
, "EZpad"),
809 DMI_MATCH(DMI_BIOS_VERSION
, "5.12"),
810 /* Above matches are too generic, add bios-date match */
811 DMI_MATCH(DMI_BIOS_DATE
, "08/18/2017"),
815 /* Jumper EZpad 6 Pro B */
816 .driver_data
= (void *)&jumper_ezpad_6_pro_b_data
,
818 DMI_MATCH(DMI_SYS_VENDOR
, "Jumper"),
819 DMI_MATCH(DMI_PRODUCT_NAME
, "EZpad"),
820 DMI_MATCH(DMI_BIOS_VERSION
, "5.12"),
821 /* Above matches are too generic, add bios-date match */
822 DMI_MATCH(DMI_BIOS_DATE
, "04/24/2018"),
826 /* Jumper EZpad 6 m4 */
827 .driver_data
= (void *)&jumper_ezpad_6_m4_data
,
829 DMI_MATCH(DMI_SYS_VENDOR
, "jumper"),
830 DMI_MATCH(DMI_PRODUCT_NAME
, "EZpad"),
831 /* Jumper8.S106x.A00C.1066 with the version dropped */
832 DMI_MATCH(DMI_BIOS_VERSION
, "Jumper8.S106x"),
836 /* Jumper EZpad mini3 */
837 .driver_data
= (void *)&jumper_ezpad_mini3_data
,
839 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
840 /* jumperx.T87.KFBNEEA02 with the version-nr dropped */
841 DMI_MATCH(DMI_BIOS_VERSION
, "jumperx.T87.KFBNEEA"),
845 /* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */
846 .driver_data
= (void *)&trekstor_primebook_c11_data
,
848 DMI_MATCH(DMI_SYS_VENDOR
, "MEDIACOM"),
849 DMI_MATCH(DMI_PRODUCT_NAME
, "FlexBook edge11 - M-FBE11"),
854 .driver_data
= (void *)&myria_my8307_data
,
856 DMI_MATCH(DMI_SYS_VENDOR
, "Complet Electro Serv"),
857 DMI_MATCH(DMI_PRODUCT_NAME
, "MY8307"),
861 /* Onda oBook 20 Plus */
862 .driver_data
= (void *)&onda_obook_20_plus_data
,
864 DMI_MATCH(DMI_SYS_VENDOR
, "ONDA"),
865 DMI_MATCH(DMI_PRODUCT_NAME
, "OBOOK 20 PLUS"),
869 /* ONDA V80 plus v3 (P80PSBG9V3A01501) */
870 .driver_data
= (void *)&onda_v80_plus_v3_data
,
872 DMI_EXACT_MATCH(DMI_SYS_VENDOR
, "ONDA"),
873 DMI_EXACT_MATCH(DMI_PRODUCT_NAME
, "V80 PLUS")
877 /* ONDA V820w DualOS */
878 .driver_data
= (void *)&onda_v820w_32g_data
,
880 DMI_EXACT_MATCH(DMI_BOARD_VENDOR
, "ONDA"),
881 DMI_EXACT_MATCH(DMI_PRODUCT_NAME
, "V820w DualOS")
885 /* ONDA V891w revision P891WBEBV1B00 aka v1 */
886 .driver_data
= (void *)&onda_v891w_v1_data
,
888 DMI_EXACT_MATCH(DMI_BOARD_VENDOR
, "ONDA"),
889 DMI_EXACT_MATCH(DMI_BOARD_NAME
, "ONDA Tablet"),
890 DMI_EXACT_MATCH(DMI_BOARD_VERSION
, "V001"),
891 /* Exact match, different versions need different fw */
892 DMI_EXACT_MATCH(DMI_BIOS_VERSION
, "ONDA.W89EBBN08"),
896 /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
897 .driver_data
= (void *)&onda_v891w_v3_data
,
899 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
900 DMI_MATCH(DMI_PRODUCT_NAME
, "ONDA Tablet"),
901 DMI_MATCH(DMI_BIOS_VERSION
, "ONDA.D890HBBNR0A"),
906 .driver_data
= (void *)&pipo_w2s_data
,
908 DMI_MATCH(DMI_SYS_VENDOR
, "PIPO"),
909 DMI_MATCH(DMI_PRODUCT_NAME
, "W2S"),
913 /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
914 .driver_data
= (void *)&trekstor_surftab_wintron70_data
,
916 DMI_MATCH(DMI_SYS_VENDOR
, "Shenzhen PLOYER"),
917 DMI_MATCH(DMI_PRODUCT_NAME
, "MOMO7W"),
918 /* Exact match, different versions need different fw */
919 DMI_MATCH(DMI_BIOS_VERSION
, "MOMO.G.WI71C.MABMRBA02"),
923 /* Point of View mobii wintab p800w (v2.0) */
924 .driver_data
= (void *)&pov_mobii_wintab_p800w_v20_data
,
926 DMI_MATCH(DMI_BOARD_VENDOR
, "AMI Corporation"),
927 DMI_MATCH(DMI_BOARD_NAME
, "Aptio CRB"),
928 DMI_MATCH(DMI_BIOS_VERSION
, "3BAIR1014"),
929 /* Above matches are too generic, add bios-date match */
930 DMI_MATCH(DMI_BIOS_DATE
, "10/24/2014"),
934 /* Point of View mobii wintab p800w (v2.1) */
935 .driver_data
= (void *)&pov_mobii_wintab_p800w_v21_data
,
937 DMI_MATCH(DMI_BOARD_VENDOR
, "AMI Corporation"),
938 DMI_MATCH(DMI_BOARD_NAME
, "Aptio CRB"),
939 DMI_MATCH(DMI_BIOS_VERSION
, "3BAIR1013"),
940 /* Above matches are too generic, add bios-date match */
941 DMI_MATCH(DMI_BIOS_DATE
, "08/22/2014"),
945 /* Point of View mobii wintab p1006w (v1.0) */
946 .driver_data
= (void *)&pov_mobii_wintab_p1006w_v10_data
,
948 DMI_EXACT_MATCH(DMI_SYS_VENDOR
, "Insyde"),
949 DMI_EXACT_MATCH(DMI_PRODUCT_NAME
, "BayTrail"),
950 /* Note 105b is Foxcon's USB/PCI vendor id */
951 DMI_EXACT_MATCH(DMI_BOARD_VENDOR
, "105B"),
952 DMI_EXACT_MATCH(DMI_BOARD_NAME
, "0E57"),
956 /* Schneider SCT101CTM */
957 .driver_data
= (void *)&schneider_sct101ctm_data
,
959 DMI_MATCH(DMI_SYS_VENDOR
, "Default string"),
960 DMI_MATCH(DMI_PRODUCT_NAME
, "SCT101CTM"),
964 /* Teclast X3 Plus */
965 .driver_data
= (void *)&teclast_x3_plus_data
,
967 DMI_MATCH(DMI_SYS_VENDOR
, "TECLAST"),
968 DMI_MATCH(DMI_PRODUCT_NAME
, "X3 Plus"),
969 DMI_MATCH(DMI_BOARD_NAME
, "X3 Plus"),
973 /* Teclast X98 Plus II */
974 .driver_data
= (void *)&teclast_x98plus2_data
,
976 DMI_MATCH(DMI_SYS_VENDOR
, "TECLAST"),
977 DMI_MATCH(DMI_PRODUCT_NAME
, "X98 Plus II"),
981 /* Trekstor Primebook C11 */
982 .driver_data
= (void *)&trekstor_primebook_c11_data
,
984 DMI_MATCH(DMI_SYS_VENDOR
, "TREKSTOR"),
985 DMI_MATCH(DMI_PRODUCT_NAME
, "Primebook C11"),
989 /* Trekstor Primebook C11B (same touchscreen as the C11) */
990 .driver_data
= (void *)&trekstor_primebook_c11_data
,
992 DMI_MATCH(DMI_SYS_VENDOR
, "TREKSTOR"),
993 DMI_MATCH(DMI_PRODUCT_NAME
, "PRIMEBOOK C11B"),
997 /* Trekstor Primebook C13 */
998 .driver_data
= (void *)&trekstor_primebook_c13_data
,
1000 DMI_MATCH(DMI_SYS_VENDOR
, "TREKSTOR"),
1001 DMI_MATCH(DMI_PRODUCT_NAME
, "Primebook C13"),
1005 /* Trekstor Primetab T13B */
1006 .driver_data
= (void *)&trekstor_primetab_t13b_data
,
1008 DMI_MATCH(DMI_SYS_VENDOR
, "TREKSTOR"),
1009 DMI_MATCH(DMI_PRODUCT_NAME
, "Primetab T13B"),
1013 /* TrekStor SurfTab twin 10.1 ST10432-8 */
1014 .driver_data
= (void *)&trekstor_surftab_twin_10_1_data
,
1016 DMI_MATCH(DMI_SYS_VENDOR
, "TrekStor"),
1017 DMI_MATCH(DMI_PRODUCT_NAME
, "SurfTab twin 10.1"),
1021 /* Trekstor Surftab Wintron 7.0 ST70416-6 */
1022 .driver_data
= (void *)&trekstor_surftab_wintron70_data
,
1024 DMI_MATCH(DMI_SYS_VENDOR
, "Insyde"),
1025 DMI_MATCH(DMI_PRODUCT_NAME
, "ST70416-6"),
1026 /* Exact match, different versions need different fw */
1027 DMI_MATCH(DMI_BIOS_VERSION
, "TREK.G.WI71C.JGBMRBA04"),
1031 /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
1032 .driver_data
= (void *)&trekstor_surftab_wintron70_data
,
1034 DMI_MATCH(DMI_SYS_VENDOR
, "TrekStor"),
1035 DMI_MATCH(DMI_PRODUCT_NAME
,
1036 "SurfTab wintron 7.0 ST70416-6"),
1037 /* Exact match, different versions need different fw */
1038 DMI_MATCH(DMI_BIOS_VERSION
, "TREK.G.WI71C.JGBMRBA05"),
1042 /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
1043 .driver_data
= (void *)&chuwi_vi8_data
,
1045 DMI_MATCH(DMI_SYS_VENDOR
, "YOURS"),
1046 DMI_MATCH(DMI_PRODUCT_NAME
, "Y8W81"),
1052 static const struct ts_dmi_data
*ts_data
;
1054 static void ts_dmi_add_props(struct i2c_client
*client
)
1056 struct device
*dev
= &client
->dev
;
1059 if (has_acpi_companion(dev
) &&
1060 !strncmp(ts_data
->acpi_name
, client
->name
, I2C_NAME_SIZE
)) {
1061 error
= device_add_properties(dev
, ts_data
->properties
);
1063 dev_err(dev
, "failed to add properties: %d\n", error
);
1067 static int ts_dmi_notifier_call(struct notifier_block
*nb
,
1068 unsigned long action
, void *data
)
1070 struct device
*dev
= data
;
1071 struct i2c_client
*client
;
1074 case BUS_NOTIFY_ADD_DEVICE
:
1075 client
= i2c_verify_client(dev
);
1077 ts_dmi_add_props(client
);
1087 static struct notifier_block ts_dmi_notifier
= {
1088 .notifier_call
= ts_dmi_notifier_call
,
1091 static int __init
ts_dmi_init(void)
1093 const struct dmi_system_id
*dmi_id
;
1096 dmi_id
= dmi_first_match(touchscreen_dmi_table
);
1098 return 0; /* Not an error */
1100 ts_data
= dmi_id
->driver_data
;
1102 error
= bus_register_notifier(&i2c_bus_type
, &ts_dmi_notifier
);
1104 pr_err("%s: failed to register i2c bus notifier: %d\n",
1111 * We are registering out notifier after i2c core is initialized and i2c bus
1112 * itself is ready (which happens at postcore initcall level), but before
1113 * ACPI starts enumerating devices (at subsys initcall level).
1115 arch_initcall(ts_dmi_init
);