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", "gsl1686-digma_citi_e200.fw"),
223 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
224 PROPERTY_ENTRY_BOOL("silead,home-button"),
228 static const struct ts_dmi_data digma_citi_e200_data = {
229 .acpi_name = "MSSL1680:00",
230 .properties = digma_citi_e200_props,
233 static const struct property_entry gp_electronic_t701_props[] = {
234 PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
235 PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
236 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
237 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
238 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-gp-electronic-t701.fw"),
242 static const struct ts_dmi_data gp_electronic_t701_data = {
243 .acpi_name = "MSSL1680:00",
244 .properties = gp_electronic_t701_props,
247 static const struct property_entry irbis_tw90_props[] = {
248 PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
249 PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
250 PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
251 PROPERTY_ENTRY_U32("touchscreen-min-y", 14),
252 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
253 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
254 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-irbis_tw90.fw"),
255 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
256 PROPERTY_ENTRY_BOOL("silead,home-button"),
260 static const struct ts_dmi_data irbis_tw90_data = {
261 .acpi_name = "MSSL1680:00",
262 .properties = irbis_tw90_props,
265 static const struct property_entry itworks_tw891_props[] = {
266 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
267 PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
268 PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
269 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
270 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
271 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
272 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
273 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
277 static const struct ts_dmi_data itworks_tw891_data = {
278 .acpi_name = "MSSL1680:00",
279 .properties = itworks_tw891_props,
282 static const struct property_entry jumper_ezpad_6_pro_props[] = {
283 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
284 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
285 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"),
286 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
287 PROPERTY_ENTRY_BOOL("silead,home-button"),
291 static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
292 .acpi_name = "MSSL1680:00",
293 .properties = jumper_ezpad_6_pro_props,
296 static const struct property_entry jumper_ezpad_6_pro_b_props[] = {
297 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
298 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
299 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro-b.fw"),
300 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
301 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
302 PROPERTY_ENTRY_BOOL("silead,home-button"),
306 static const struct ts_dmi_data jumper_ezpad_6_pro_b_data = {
307 .acpi_name = "MSSL1680:00",
308 .properties = jumper_ezpad_6_pro_b_props,
311 static const struct property_entry jumper_ezpad_6_m4_props[] = {
312 PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
313 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
314 PROPERTY_ENTRY_U32("touchscreen-size-x", 1950),
315 PROPERTY_ENTRY_U32("touchscreen-size-y", 1525),
316 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-m4.fw"),
317 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
318 PROPERTY_ENTRY_BOOL("silead,home-button"),
322 static const struct ts_dmi_data jumper_ezpad_6_m4_data = {
323 .acpi_name = "MSSL1680:00",
324 .properties = jumper_ezpad_6_m4_props,
327 static const struct property_entry jumper_ezpad_mini3_props[] = {
328 PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
329 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
330 PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
331 PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
332 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
333 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
334 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
338 static const struct ts_dmi_data jumper_ezpad_mini3_data = {
339 .acpi_name = "MSSL1680:00",
340 .properties = jumper_ezpad_mini3_props,
343 static const struct property_entry myria_my8307_props[] = {
344 PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
345 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
346 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
347 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
348 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
349 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-myria-my8307.fw"),
350 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
351 PROPERTY_ENTRY_BOOL("silead,home-button"),
355 static const struct ts_dmi_data myria_my8307_data = {
356 .acpi_name = "MSSL1680:00",
357 .properties = myria_my8307_props,
360 static const struct property_entry onda_obook_20_plus_props[] = {
361 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
362 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
363 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
364 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
365 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
366 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
367 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
368 PROPERTY_ENTRY_BOOL("silead,home-button"),
372 static const struct ts_dmi_data onda_obook_20_plus_data = {
373 .acpi_name = "MSSL1680:00",
374 .properties = onda_obook_20_plus_props,
377 static const struct property_entry onda_v80_plus_v3_props[] = {
378 PROPERTY_ENTRY_U32("touchscreen-min-x", 22),
379 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
380 PROPERTY_ENTRY_U32("touchscreen-size-x", 1698),
381 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
382 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
383 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v80-plus-v3.fw"),
384 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
385 PROPERTY_ENTRY_BOOL("silead,home-button"),
389 static const struct ts_dmi_data onda_v80_plus_v3_data = {
390 .acpi_name = "MSSL1680:00",
391 .properties = onda_v80_plus_v3_props,
394 static const struct property_entry onda_v820w_32g_props[] = {
395 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
396 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
397 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
398 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-onda-v820w-32g.fw"),
399 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
400 PROPERTY_ENTRY_BOOL("silead,home-button"),
404 static const struct ts_dmi_data onda_v820w_32g_data = {
405 .acpi_name = "MSSL1680:00",
406 .properties = onda_v820w_32g_props,
409 static const struct property_entry onda_v891w_v1_props[] = {
410 PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
411 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
412 PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
413 PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
414 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-onda-v891w-v1.fw"),
415 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
416 PROPERTY_ENTRY_BOOL("silead,home-button"),
420 static const struct ts_dmi_data onda_v891w_v1_data = {
421 .acpi_name = "MSSL1680:00",
422 .properties = onda_v891w_v1_props,
425 static const struct property_entry onda_v891w_v3_props[] = {
426 PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
427 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
428 PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
429 PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
430 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
431 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v891w-v3.fw"),
432 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
433 PROPERTY_ENTRY_BOOL("silead,home-button"),
437 static const struct ts_dmi_data onda_v891w_v3_data = {
438 .acpi_name = "MSSL1680:00",
439 .properties = onda_v891w_v3_props,
442 static const struct property_entry pipo_w2s_props[] = {
443 PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
444 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
445 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
446 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
447 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w2s.fw"),
451 static const struct ts_dmi_data pipo_w2s_data = {
452 .acpi_name = "MSSL1680:00",
453 .properties = pipo_w2s_props,
456 static const struct property_entry pipo_w11_props[] = {
457 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
458 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
459 PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
460 PROPERTY_ENTRY_U32("touchscreen-size-y", 1532),
461 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w11.fw"),
462 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
463 PROPERTY_ENTRY_BOOL("silead,home-button"),
467 static const struct ts_dmi_data pipo_w11_data = {
468 .acpi_name = "MSSL1680:00",
469 .properties = pipo_w11_props,
472 static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
473 PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
474 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
475 PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
476 PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
477 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
478 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
479 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
480 PROPERTY_ENTRY_BOOL("silead,home-button"),
484 static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
485 .acpi_name = "MSSL1680:00",
486 .properties = pov_mobii_wintab_p800w_v20_props,
489 static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
490 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
491 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
492 PROPERTY_ENTRY_U32("touchscreen-size-x", 1794),
493 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
494 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
495 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p800w.fw"),
496 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
497 PROPERTY_ENTRY_BOOL("silead,home-button"),
501 static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
502 .acpi_name = "MSSL1680:00",
503 .properties = pov_mobii_wintab_p800w_v21_props,
506 static const struct property_entry pov_mobii_wintab_p1006w_v10_props[] = {
507 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
508 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
509 PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
510 PROPERTY_ENTRY_U32("touchscreen-size-y", 1520),
511 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
512 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p1006w-v10.fw"),
513 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
514 PROPERTY_ENTRY_BOOL("silead,home-button"),
518 static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = {
519 .acpi_name = "MSSL1680:00",
520 .properties = pov_mobii_wintab_p1006w_v10_props,
523 static const struct property_entry schneider_sct101ctm_props[] = {
524 PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
525 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
526 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
527 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
528 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
529 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-schneider-sct101ctm.fw"),
530 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
531 PROPERTY_ENTRY_BOOL("silead,home-button"),
535 static const struct ts_dmi_data schneider_sct101ctm_data = {
536 .acpi_name = "MSSL1680:00",
537 .properties = schneider_sct101ctm_props,
540 static const struct property_entry teclast_x3_plus_props[] = {
541 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
542 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
543 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"),
544 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
545 PROPERTY_ENTRY_BOOL("silead,home-button"),
549 static const struct ts_dmi_data teclast_x3_plus_data = {
550 .acpi_name = "MSSL1680:00",
551 .properties = teclast_x3_plus_props,
554 static const struct property_entry teclast_x98plus2_props[] = {
555 PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
556 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
557 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
558 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
559 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-teclast_x98plus2.fw"),
560 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
564 static const struct ts_dmi_data teclast_x98plus2_data = {
565 .acpi_name = "MSSL1680:00",
566 .properties = teclast_x98plus2_props,
569 static const struct property_entry trekstor_primebook_c11_props[] = {
570 PROPERTY_ENTRY_U32("touchscreen-size-x", 1970),
571 PROPERTY_ENTRY_U32("touchscreen-size-y", 1530),
572 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
573 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c11.fw"),
574 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
575 PROPERTY_ENTRY_BOOL("silead,home-button"),
579 static const struct ts_dmi_data trekstor_primebook_c11_data = {
580 .acpi_name = "MSSL1680:00",
581 .properties = trekstor_primebook_c11_props,
584 static const struct property_entry trekstor_primebook_c13_props[] = {
585 PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
586 PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
587 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c13.fw"),
588 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
589 PROPERTY_ENTRY_BOOL("silead,home-button"),
593 static const struct ts_dmi_data trekstor_primebook_c13_data = {
594 .acpi_name = "MSSL1680:00",
595 .properties = trekstor_primebook_c13_props,
598 static const struct property_entry trekstor_primetab_t13b_props[] = {
599 PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
600 PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
601 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primetab-t13b.fw"),
602 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
603 PROPERTY_ENTRY_BOOL("silead,home-button"),
604 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
608 static const struct ts_dmi_data trekstor_primetab_t13b_data = {
609 .acpi_name = "MSSL1680:00",
610 .properties = trekstor_primetab_t13b_props,
613 static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
614 PROPERTY_ENTRY_U32("touchscreen-size-x", 1900),
615 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
616 PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
617 PROPERTY_ENTRY_STRING("firmware-name", "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", "gsl1686-surftab-wintron70-st70416-6.fw"),
633 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
634 PROPERTY_ENTRY_BOOL("silead,home-button"),
638 static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
639 .acpi_name = "MSSL1680:00",
640 .properties = trekstor_surftab_wintron70_props,
643 /* NOTE: Please keep this table sorted alphabetically */
644 static const struct dmi_system_id touchscreen_dmi_table[] = {
647 .driver_data = (void *)&chuwi_hi8_data,
649 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
650 DMI_MATCH(DMI_PRODUCT_NAME, "S806"),
654 /* Chuwi Hi8 (H1D_S806_206) */
655 .driver_data = (void *)&chuwi_hi8_data,
657 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
658 DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
659 DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"),
663 /* Chuwi Hi8 Air (CWI543) */
664 .driver_data = (void *)&chuwi_hi8_air_data,
666 DMI_MATCH(DMI_BOARD_VENDOR, "Default string"),
667 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
668 DMI_MATCH(DMI_PRODUCT_NAME, "Hi8 Air"),
672 /* Chuwi Hi8 Pro (CWI513) */
673 .driver_data = (void *)&chuwi_hi8_pro_data,
675 DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
676 DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
681 .driver_data = (void *)&chuwi_hi10_air_data,
683 DMI_MATCH(DMI_SYS_VENDOR, "CHUWI INNOVATION AND TECHNOLOGY(SHENZHEN)CO.LTD"),
684 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
685 DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"),
689 /* Chuwi Hi10 Plus (CWI527) */
690 .driver_data = (void *)&chuwi_hi10_plus_data,
692 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
693 DMI_MATCH(DMI_PRODUCT_NAME, "Hi10 plus tablet"),
694 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
698 /* Chuwi Vi8 (CWI506) */
699 .driver_data = (void *)&chuwi_vi8_data,
701 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
702 DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
703 DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
707 /* Chuwi Vi10 (CWI505) */
708 .driver_data = (void *)&chuwi_vi10_data,
710 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
711 DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"),
712 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
713 DMI_MATCH(DMI_PRODUCT_NAME, "S165"),
717 /* Chuwi Surbook Mini (CWI540) */
718 .driver_data = (void *)&chuwi_surbook_mini_data,
720 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
721 DMI_MATCH(DMI_PRODUCT_NAME, "C3W6_AP108_4G"),
725 /* Connect Tablet 9 */
726 .driver_data = (void *)&connect_tablet9_data,
728 DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
729 DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
733 /* CUBE iwork8 Air */
734 .driver_data = (void *)&cube_iwork8_air_data,
736 DMI_MATCH(DMI_SYS_VENDOR, "cube"),
737 DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"),
738 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
742 /* Cube KNote i1101 */
743 .driver_data = (void *)&cube_knote_i1101_data,
745 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
746 DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"),
747 DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"),
748 DMI_MATCH(DMI_PRODUCT_NAME, "i1101"),
753 .driver_data = (void *)&dexp_ursus_7w_data,
755 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
756 DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
760 /* Digma Citi E200 */
761 .driver_data = (void *)&digma_citi_e200_data,
763 DMI_MATCH(DMI_SYS_VENDOR, "Digma"),
764 DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"),
765 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
769 /* GP-electronic T701 */
770 .driver_data = (void *)&gp_electronic_t701_data,
772 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
773 DMI_MATCH(DMI_PRODUCT_NAME, "T701"),
774 DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"),
778 /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
779 .driver_data = (void *)&trekstor_surftab_wintron70_data,
781 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
782 DMI_MATCH(DMI_PRODUCT_NAME, "i71c"),
783 DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"),
788 .driver_data = (void *)&irbis_tw90_data,
790 DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"),
791 DMI_MATCH(DMI_PRODUCT_NAME, "TW90"),
795 /* I.T.Works TW891 */
796 .driver_data = (void *)&itworks_tw891_data,
798 DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
799 DMI_MATCH(DMI_PRODUCT_NAME, "TW891"),
803 /* Jumper EZpad 6 Pro */
804 .driver_data = (void *)&jumper_ezpad_6_pro_data,
806 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
807 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
808 DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
809 /* Above matches are too generic, add bios-date match */
810 DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"),
814 /* Jumper EZpad 6 Pro B */
815 .driver_data = (void *)&jumper_ezpad_6_pro_b_data,
817 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
818 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
819 DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
820 /* Above matches are too generic, add bios-date match */
821 DMI_MATCH(DMI_BIOS_DATE, "04/24/2018"),
825 /* Jumper EZpad 6 m4 */
826 .driver_data = (void *)&jumper_ezpad_6_m4_data,
828 DMI_MATCH(DMI_SYS_VENDOR, "jumper"),
829 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
830 /* Jumper8.S106x.A00C.1066 with the version dropped */
831 DMI_MATCH(DMI_BIOS_VERSION, "Jumper8.S106x"),
835 /* Jumper EZpad mini3 */
836 .driver_data = (void *)&jumper_ezpad_mini3_data,
838 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
839 /* jumperx.T87.KFBNEEA02 with the version-nr dropped */
840 DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
844 /* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */
845 .driver_data = (void *)&trekstor_primebook_c11_data,
847 DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"),
848 DMI_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"),
853 .driver_data = (void *)&myria_my8307_data,
855 DMI_MATCH(DMI_SYS_VENDOR, "Complet Electro Serv"),
856 DMI_MATCH(DMI_PRODUCT_NAME, "MY8307"),
860 /* Onda oBook 20 Plus */
861 .driver_data = (void *)&onda_obook_20_plus_data,
863 DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
864 DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
868 /* ONDA V80 plus v3 (P80PSBG9V3A01501) */
869 .driver_data = (void *)&onda_v80_plus_v3_data,
871 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONDA"),
872 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V80 PLUS")
876 /* ONDA V820w DualOS */
877 .driver_data = (void *)&onda_v820w_32g_data,
879 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
880 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS")
884 /* ONDA V891w revision P891WBEBV1B00 aka v1 */
885 .driver_data = (void *)&onda_v891w_v1_data,
887 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
888 DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"),
889 DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"),
890 /* Exact match, different versions need different fw */
891 DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
895 /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
896 .driver_data = (void *)&onda_v891w_v3_data,
898 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
899 DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
900 DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
905 .driver_data = (void *)&pipo_w2s_data,
907 DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
908 DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
913 .driver_data = (void *)&pipo_w11_data,
915 DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
916 DMI_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."),
917 /* Above matches are too generic, add bios-ver match */
918 DMI_MATCH(DMI_BIOS_VERSION, "JS-BI-10.6-SF133GR300-GA55B-024-F"),
922 /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
923 .driver_data = (void *)&trekstor_surftab_wintron70_data,
925 DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"),
926 DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"),
927 /* Exact match, different versions need different fw */
928 DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"),
932 /* Point of View mobii wintab p800w (v2.0) */
933 .driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
935 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
936 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
937 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"),
938 /* Above matches are too generic, add bios-date match */
939 DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
943 /* Point of View mobii wintab p800w (v2.1) */
944 .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
946 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
947 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
948 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"),
949 /* Above matches are too generic, add bios-date match */
950 DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"),
954 /* Point of View mobii wintab p1006w (v1.0) */
955 .driver_data = (void *)&pov_mobii_wintab_p1006w_v10_data,
957 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
958 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
959 /* Note 105b is Foxcon's USB/PCI vendor id */
960 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"),
961 DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
965 /* Schneider SCT101CTM */
966 .driver_data = (void *)&schneider_sct101ctm_data,
968 DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
969 DMI_MATCH(DMI_PRODUCT_NAME, "SCT101CTM"),
973 /* Teclast X3 Plus */
974 .driver_data = (void *)&teclast_x3_plus_data,
976 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
977 DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
978 DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
982 /* Teclast X98 Plus II */
983 .driver_data = (void *)&teclast_x98plus2_data,
985 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
986 DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
990 /* Trekstor Primebook C11 */
991 .driver_data = (void *)&trekstor_primebook_c11_data,
993 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
994 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"),
998 /* Trekstor Primebook C11B (same touchscreen as the C11) */
999 .driver_data = (void *)&trekstor_primebook_c11_data,
1001 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1002 DMI_MATCH(DMI_PRODUCT_NAME, "PRIMEBOOK C11B"),
1006 /* Trekstor Primebook C13 */
1007 .driver_data = (void *)&trekstor_primebook_c13_data,
1009 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1010 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
1014 /* Trekstor Primetab T13B */
1015 .driver_data = (void *)&trekstor_primetab_t13b_data,
1017 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1018 DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"),
1022 /* TrekStor SurfTab twin 10.1 ST10432-8 */
1023 .driver_data = (void *)&trekstor_surftab_twin_10_1_data,
1025 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1026 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
1030 /* Trekstor Surftab Wintron 7.0 ST70416-6 */
1031 .driver_data = (void *)&trekstor_surftab_wintron70_data,
1033 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1034 DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"),
1035 /* Exact match, different versions need different fw */
1036 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"),
1040 /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
1041 .driver_data = (void *)&trekstor_surftab_wintron70_data,
1043 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1044 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab wintron 7.0 ST70416-6"),
1045 /* Exact match, different versions need different fw */
1046 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
1050 /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
1051 .driver_data = (void *)&chuwi_vi8_data,
1053 DMI_MATCH(DMI_SYS_VENDOR, "YOURS"),
1054 DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"),
1060 static const struct ts_dmi_data *ts_data;
1062 static void ts_dmi_add_props(struct i2c_client *client)
1064 struct device *dev = &client->dev;
1067 if (has_acpi_companion(dev) &&
1068 !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
1069 error = device_add_properties(dev, ts_data->properties);
1071 dev_err(dev, "failed to add properties: %d\n", error);
1075 static int ts_dmi_notifier_call(struct notifier_block *nb,
1076 unsigned long action, void *data)
1078 struct device *dev = data;
1079 struct i2c_client *client;
1082 case BUS_NOTIFY_ADD_DEVICE:
1083 client = i2c_verify_client(dev);
1085 ts_dmi_add_props(client);
1095 static struct notifier_block ts_dmi_notifier = {
1096 .notifier_call = ts_dmi_notifier_call,
1099 static int __init ts_dmi_init(void)
1101 const struct dmi_system_id *dmi_id;
1104 dmi_id = dmi_first_match(touchscreen_dmi_table);
1106 return 0; /* Not an error */
1108 ts_data = dmi_id->driver_data;
1110 error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
1112 pr_err("%s: failed to register i2c bus notifier: %d\n",
1119 * We are registering out notifier after i2c core is initialized and i2c bus
1120 * itself is ready (which happens at postcore initcall level), but before
1121 * ACPI starts enumerating devices (at subsys initcall level).
1123 arch_initcall(ts_dmi_init);