1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Touchscreen driver DMI based configuration code
4 *
5 * Copyright (c) 2017 Red Hat Inc.
6 *
7 * Red Hat authors:
8 * Hans de Goede <hdegoede@redhat.com>
9 */
10
11 #include <linux/acpi.h>
12 #include <linux/ctype.h>
13 #include <linux/device.h>
14 #include <linux/dmi.h>
15 #include <linux/efi_embedded_fw.h>
16 #include <linux/i2c.h>
17 #include <linux/init.h>
18 #include <linux/kstrtox.h>
19 #include <linux/notifier.h>
20 #include <linux/property.h>
21 #include <linux/string.h>
22
23 struct ts_dmi_data {
24 /* The EFI embedded-fw code expects this to be the first member! */
25 struct efi_embedded_fw_desc embedded_fw;
26 const char *acpi_name;
27 const struct property_entry *properties;
28 };
29
30 /* NOTE: Please keep all entries sorted alphabetically */
31
32 static const struct property_entry archos_101_cesium_educ_props[] = {
33 PROPERTY_ENTRY_U32("touchscreen-size-x", 1850),
34 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
35 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
36 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
37 PROPERTY_ENTRY_BOOL("silead,home-button"),
38 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-archos-101-cesium-educ.fw"),
39 { }
40 };
41
42 static const struct ts_dmi_data archos_101_cesium_educ_data = {
43 .acpi_name = "MSSL1680:00",
44 .properties = archos_101_cesium_educ_props,
45 };
46
47 static const struct property_entry bush_bush_windows_tablet_props[] = {
48 PROPERTY_ENTRY_U32("touchscreen-size-x", 1850),
49 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
50 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
51 PROPERTY_ENTRY_BOOL("silead,home-button"),
52 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-bush-bush-windows-tablet.fw"),
53 { }
54 };
55
56 static const struct ts_dmi_data bush_bush_windows_tablet_data = {
57 .acpi_name = "MSSL1680:00",
58 .properties = bush_bush_windows_tablet_props,
59 };
60
61 static const struct property_entry chuwi_hi8_props[] = {
62 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
63 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
64 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
65 PROPERTY_ENTRY_BOOL("silead,home-button"),
66 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi8.fw"),
67 { }
68 };
69
70 static const struct ts_dmi_data chuwi_hi8_data = {
71 .acpi_name = "MSSL0001:00",
72 .properties = chuwi_hi8_props,
73 };
74
75 static const struct property_entry chuwi_hi8_air_props[] = {
76 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
77 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
78 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
79 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-hi8-air.fw"),
80 { }
81 };
82
83 static const struct ts_dmi_data chuwi_hi8_air_data = {
84 .acpi_name = "MSSL1680",
85 .properties = chuwi_hi8_air_props,
86 };
87
88 static const struct property_entry chuwi_hi8_pro_props[] = {
89 PROPERTY_ENTRY_U32("touchscreen-min-x", 6),
90 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
91 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
92 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
93 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
94 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-hi8-pro.fw"),
95 PROPERTY_ENTRY_BOOL("silead,home-button"),
96 { }
97 };
98
99 static const struct ts_dmi_data chuwi_hi8_pro_data = {
100 .embedded_fw = {
101 .name = "silead/gsl3680-chuwi-hi8-pro.fw",
102 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
103 .length = 39864,
104 .sha256 = { 0xc0, 0x88, 0xc5, 0xef, 0xd1, 0x70, 0x77, 0x59,
105 0x4e, 0xe9, 0xc4, 0xd8, 0x2e, 0xcd, 0xbf, 0x95,
106 0x32, 0xd9, 0x03, 0x28, 0x0d, 0x48, 0x9f, 0x92,
107 0x35, 0x37, 0xf6, 0x8b, 0x2a, 0xe4, 0x73, 0xff },
108 },
109 .acpi_name = "MSSL1680:00",
110 .properties = chuwi_hi8_pro_props,
111 };
112
113 static const struct property_entry chuwi_hi10_air_props[] = {
114 PROPERTY_ENTRY_U32("touchscreen-size-x", 1981),
115 PROPERTY_ENTRY_U32("touchscreen-size-y", 1271),
116 PROPERTY_ENTRY_U32("touchscreen-min-x", 99),
117 PROPERTY_ENTRY_U32("touchscreen-min-y", 9),
118 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
119 PROPERTY_ENTRY_U32("touchscreen-fuzz-x", 5),
120 PROPERTY_ENTRY_U32("touchscreen-fuzz-y", 4),
121 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10-air.fw"),
122 PROPERTY_ENTRY_BOOL("silead,home-button"),
123 { }
124 };
125
126 static const struct ts_dmi_data chuwi_hi10_air_data = {
127 .acpi_name = "MSSL1680:00",
128 .properties = chuwi_hi10_air_props,
129 };
130
131 static const struct property_entry chuwi_hi10_plus_props[] = {
132 PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
133 PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
134 PROPERTY_ENTRY_U32("touchscreen-size-x", 1908),
135 PROPERTY_ENTRY_U32("touchscreen-size-y", 1270),
136 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10plus.fw"),
137 PROPERTY_ENTRY_BOOL("silead,home-button"),
138 PROPERTY_ENTRY_BOOL("silead,pen-supported"),
139 PROPERTY_ENTRY_U32("silead,pen-resolution-x", 8),
140 PROPERTY_ENTRY_U32("silead,pen-resolution-y", 8),
141 { }
142 };
143
144 static const struct ts_dmi_data chuwi_hi10_plus_data = {
145 .embedded_fw = {
146 .name = "silead/gsl1680-chuwi-hi10plus.fw",
147 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
148 .length = 34056,
149 .sha256 = { 0xfd, 0x0a, 0x08, 0x08, 0x3c, 0xa6, 0x34, 0x4e,
150 0x2c, 0x49, 0x9c, 0xcd, 0x7d, 0x44, 0x9d, 0x38,
151 0x10, 0x68, 0xb5, 0xbd, 0xb7, 0x2a, 0x63, 0xb5,
152 0x67, 0x0b, 0x96, 0xbd, 0x89, 0x67, 0x85, 0x09 },
153 },
154 .acpi_name = "MSSL0017:00",
155 .properties = chuwi_hi10_plus_props,
156 };
157
158 static const u32 chuwi_hi10_pro_efi_min_max[] = { 8, 1911, 8, 1271 };
159
160 static const struct property_entry chuwi_hi10_pro_props[] = {
161 PROPERTY_ENTRY_U32("touchscreen-min-x", 80),
162 PROPERTY_ENTRY_U32("touchscreen-min-y", 26),
163 PROPERTY_ENTRY_U32("touchscreen-size-x", 1962),
164 PROPERTY_ENTRY_U32("touchscreen-size-y", 1254),
165 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
166 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10-pro.fw"),
167 PROPERTY_ENTRY_U32_ARRAY("silead,efi-fw-min-max", chuwi_hi10_pro_efi_min_max),
168 PROPERTY_ENTRY_BOOL("silead,home-button"),
169 PROPERTY_ENTRY_BOOL("silead,pen-supported"),
170 PROPERTY_ENTRY_U32("silead,pen-resolution-x", 8),
171 PROPERTY_ENTRY_U32("silead,pen-resolution-y", 8),
172 { }
173 };
174
175 static const struct ts_dmi_data chuwi_hi10_pro_data = {
176 .embedded_fw = {
177 .name = "silead/gsl1680-chuwi-hi10-pro.fw",
178 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
179 .length = 42504,
180 .sha256 = { 0xdb, 0x92, 0x68, 0xa8, 0xdb, 0x81, 0x31, 0x00,
181 0x1f, 0x58, 0x89, 0xdb, 0x19, 0x1b, 0x15, 0x8c,
182 0x05, 0x14, 0xf4, 0x95, 0xba, 0x15, 0x45, 0x98,
183 0x42, 0xa3, 0xbb, 0x65, 0xe3, 0x30, 0xa5, 0x93 },
184 },
185 .acpi_name = "MSSL1680:00",
186 .properties = chuwi_hi10_pro_props,
187 };
188
189 static const struct property_entry chuwi_hibook_props[] = {
190 PROPERTY_ENTRY_U32("touchscreen-min-x", 30),
191 PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
192 PROPERTY_ENTRY_U32("touchscreen-size-x", 1892),
193 PROPERTY_ENTRY_U32("touchscreen-size-y", 1276),
194 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
195 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
196 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hibook.fw"),
197 PROPERTY_ENTRY_BOOL("silead,home-button"),
198 { }
199 };
200
201 static const struct ts_dmi_data chuwi_hibook_data = {
202 .embedded_fw = {
203 .name = "silead/gsl1680-chuwi-hibook.fw",
204 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
205 .length = 40392,
206 .sha256 = { 0xf7, 0xc0, 0xe8, 0x5a, 0x6c, 0xf2, 0xeb, 0x8d,
207 0x12, 0xc4, 0x45, 0xbf, 0x55, 0x13, 0x4c, 0x1a,
208 0x13, 0x04, 0x31, 0x08, 0x65, 0x73, 0xf7, 0xa8,
209 0x1b, 0x7d, 0x59, 0xc9, 0xe6, 0x97, 0xf7, 0x38 },
210 },
211 .acpi_name = "MSSL0017:00",
212 .properties = chuwi_hibook_props,
213 };
214
215 static const struct property_entry chuwi_vi8_props[] = {
216 PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
217 PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
218 PROPERTY_ENTRY_U32("touchscreen-size-x", 1724),
219 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
220 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
221 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-vi8.fw"),
222 PROPERTY_ENTRY_BOOL("silead,home-button"),
223 { }
224 };
225
226 static const struct ts_dmi_data chuwi_vi8_data = {
227 .acpi_name = "MSSL1680:00",
228 .properties = chuwi_vi8_props,
229 };
230
231 static const struct ts_dmi_data chuwi_vi8_plus_data = {
232 .embedded_fw = {
233 .name = "chipone/icn8505-HAMP0002.fw",
234 .prefix = { 0xb0, 0x07, 0x00, 0x00, 0xe4, 0x07, 0x00, 0x00 },
235 .length = 35012,
236 .sha256 = { 0x93, 0xe5, 0x49, 0xe0, 0xb6, 0xa2, 0xb4, 0xb3,
237 0x88, 0x96, 0x34, 0x97, 0x5e, 0xa8, 0x13, 0x78,
238 0x72, 0x98, 0xb8, 0x29, 0xeb, 0x5c, 0xa7, 0xf1,
239 0x25, 0x13, 0x43, 0xf4, 0x30, 0x7c, 0xfc, 0x7c },
240 },
241 };
242
243 static const struct property_entry chuwi_vi10_props[] = {
244 PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
245 PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
246 PROPERTY_ENTRY_U32("touchscreen-size-x", 1858),
247 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
248 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-vi10.fw"),
249 PROPERTY_ENTRY_BOOL("silead,home-button"),
250 { }
251 };
252
253 static const struct ts_dmi_data chuwi_vi10_data = {
254 .acpi_name = "MSSL0002:00",
255 .properties = chuwi_vi10_props,
256 };
257
258 static const struct property_entry chuwi_surbook_mini_props[] = {
259 PROPERTY_ENTRY_U32("touchscreen-min-x", 88),
260 PROPERTY_ENTRY_U32("touchscreen-min-y", 13),
261 PROPERTY_ENTRY_U32("touchscreen-size-x", 2040),
262 PROPERTY_ENTRY_U32("touchscreen-size-y", 1524),
263 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-surbook-mini.fw"),
264 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
265 { }
266 };
267
268 static const struct ts_dmi_data chuwi_surbook_mini_data = {
269 .acpi_name = "MSSL1680:00",
270 .properties = chuwi_surbook_mini_props,
271 };
272
273 static const struct property_entry connect_tablet9_props[] = {
274 PROPERTY_ENTRY_U32("touchscreen-min-x", 9),
275 PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
276 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
277 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
278 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
279 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
280 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-connect-tablet9.fw"),
281 { }
282 };
283
284 static const struct ts_dmi_data connect_tablet9_data = {
285 .acpi_name = "MSSL1680:00",
286 .properties = connect_tablet9_props,
287 };
288
289 static const struct property_entry csl_panther_tab_hd_props[] = {
290 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
291 PROPERTY_ENTRY_U32("touchscreen-min-y", 20),
292 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
293 PROPERTY_ENTRY_U32("touchscreen-size-y", 1526),
294 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
295 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
296 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-csl-panther-tab-hd.fw"),
297 { }
298 };
299
300 static const struct ts_dmi_data csl_panther_tab_hd_data = {
301 .acpi_name = "MSSL1680:00",
302 .properties = csl_panther_tab_hd_props,
303 };
304
305 static const struct property_entry cube_iwork8_air_props[] = {
306 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
307 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
308 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
309 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
310 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
311 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-cube-iwork8-air.fw"),
312 { }
313 };
314
315 static const struct ts_dmi_data cube_iwork8_air_data = {
316 .embedded_fw = {
317 .name = "silead/gsl3670-cube-iwork8-air.fw",
318 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
319 .length = 38808,
320 .sha256 = { 0xff, 0x62, 0x2d, 0xd1, 0x8a, 0x78, 0x04, 0x7b,
321 0x33, 0x06, 0xb0, 0x4f, 0x7f, 0x02, 0x08, 0x9c,
322 0x96, 0xd4, 0x9f, 0x04, 0xe1, 0x47, 0x25, 0x25,
323 0x60, 0x77, 0x41, 0x33, 0xeb, 0x12, 0x82, 0xfc },
324 },
325 .acpi_name = "MSSL1680:00",
326 .properties = cube_iwork8_air_props,
327 };
328
329 static const struct property_entry cube_knote_i1101_props[] = {
330 PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
331 PROPERTY_ENTRY_U32("touchscreen-min-y", 22),
332 PROPERTY_ENTRY_U32("touchscreen-size-x", 1961),
333 PROPERTY_ENTRY_U32("touchscreen-size-y", 1513),
334 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-cube-knote-i1101.fw"),
335 PROPERTY_ENTRY_BOOL("silead,home-button"),
336 { }
337 };
338
339 static const struct ts_dmi_data cube_knote_i1101_data = {
340 .acpi_name = "MSSL1680:00",
341 .properties = cube_knote_i1101_props,
342 };
343
344 static const struct property_entry dexp_ursus_7w_props[] = {
345 PROPERTY_ENTRY_U32("touchscreen-size-x", 890),
346 PROPERTY_ENTRY_U32("touchscreen-size-y", 630),
347 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-dexp-ursus-7w.fw"),
348 PROPERTY_ENTRY_BOOL("silead,home-button"),
349 { }
350 };
351
352 static const struct ts_dmi_data dexp_ursus_7w_data = {
353 .acpi_name = "MSSL1680:00",
354 .properties = dexp_ursus_7w_props,
355 };
356
357 static const struct property_entry dexp_ursus_kx210i_props[] = {
358 PROPERTY_ENTRY_U32("touchscreen-min-x", 5),
359 PROPERTY_ENTRY_U32("touchscreen-min-y", 2),
360 PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
361 PROPERTY_ENTRY_U32("touchscreen-size-y", 1137),
362 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-dexp-ursus-kx210i.fw"),
363 PROPERTY_ENTRY_BOOL("silead,home-button"),
364 { }
365 };
366
367 static const struct ts_dmi_data dexp_ursus_kx210i_data = {
368 .acpi_name = "MSSL1680:00",
369 .properties = dexp_ursus_kx210i_props,
370 };
371
372 static const struct property_entry digma_citi_e200_props[] = {
373 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
374 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
375 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
376 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-digma_citi_e200.fw"),
377 PROPERTY_ENTRY_BOOL("silead,home-button"),
378 { }
379 };
380
381 static const struct ts_dmi_data digma_citi_e200_data = {
382 .acpi_name = "MSSL1680:00",
383 .properties = digma_citi_e200_props,
384 };
385
386 static const struct property_entry estar_beauty_hd_props[] = {
387 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
388 { }
389 };
390
391 static const struct ts_dmi_data estar_beauty_hd_data = {
392 .acpi_name = "GDIX1001:00",
393 .properties = estar_beauty_hd_props,
394 };
395
396 /* Generic props + data for upside-down mounted GDIX1001 touchscreens */
397 static const struct property_entry gdix1001_upside_down_props[] = {
398 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
399 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
400 { }
401 };
402
403 static const struct ts_dmi_data gdix1001_upside_down_data = {
404 .acpi_name = "GDIX1001",
405 .properties = gdix1001_upside_down_props,
406 };
407
408 static const struct ts_dmi_data gdix1002_upside_down_data = {
409 .acpi_name = "GDIX1002",
410 .properties = gdix1001_upside_down_props,
411 };
412
413 static const struct property_entry gdix1001_y_inverted_props[] = {
414 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
415 { }
416 };
417
418 static const struct ts_dmi_data gdix1001_y_inverted_data = {
419 .acpi_name = "GDIX1001",
420 .properties = gdix1001_y_inverted_props,
421 };
422
423 static const struct property_entry gp_electronic_t701_props[] = {
424 PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
425 PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
426 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
427 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
428 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-gp-electronic-t701.fw"),
429 { }
430 };
431
432 static const struct ts_dmi_data gp_electronic_t701_data = {
433 .acpi_name = "MSSL1680:00",
434 .properties = gp_electronic_t701_props,
435 };
436
437 static const struct property_entry irbis_tw90_props[] = {
438 PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
439 PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
440 PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
441 PROPERTY_ENTRY_U32("touchscreen-min-y", 14),
442 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
443 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
444 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-irbis_tw90.fw"),
445 PROPERTY_ENTRY_BOOL("silead,home-button"),
446 { }
447 };
448
449 static const struct ts_dmi_data irbis_tw90_data = {
450 .acpi_name = "MSSL1680:00",
451 .properties = irbis_tw90_props,
452 };
453
454 static const struct property_entry irbis_tw118_props[] = {
455 PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
456 PROPERTY_ENTRY_U32("touchscreen-min-y", 30),
457 PROPERTY_ENTRY_U32("touchscreen-size-x", 1960),
458 PROPERTY_ENTRY_U32("touchscreen-size-y", 1510),
459 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-irbis-tw118.fw"),
460 { }
461 };
462
463 static const struct ts_dmi_data irbis_tw118_data = {
464 .acpi_name = "MSSL1680:00",
465 .properties = irbis_tw118_props,
466 };
467
468 static const struct property_entry itworks_tw891_props[] = {
469 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
470 PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
471 PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
472 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
473 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
474 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
475 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
476 { }
477 };
478
479 static const struct ts_dmi_data itworks_tw891_data = {
480 .acpi_name = "MSSL1680:00",
481 .properties = itworks_tw891_props,
482 };
483
484 static const struct property_entry jumper_ezpad_6_pro_props[] = {
485 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
486 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
487 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"),
488 PROPERTY_ENTRY_BOOL("silead,home-button"),
489 { }
490 };
491
492 static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
493 .acpi_name = "MSSL1680:00",
494 .properties = jumper_ezpad_6_pro_props,
495 };
496
497 static const struct property_entry jumper_ezpad_6_pro_b_props[] = {
498 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
499 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
500 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro-b.fw"),
501 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
502 PROPERTY_ENTRY_BOOL("silead,home-button"),
503 { }
504 };
505
506 static const struct ts_dmi_data jumper_ezpad_6_pro_b_data = {
507 .acpi_name = "MSSL1680:00",
508 .properties = jumper_ezpad_6_pro_b_props,
509 };
510
511 static const struct property_entry jumper_ezpad_6_m4_props[] = {
512 PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
513 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
514 PROPERTY_ENTRY_U32("touchscreen-size-x", 1950),
515 PROPERTY_ENTRY_U32("touchscreen-size-y", 1525),
516 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-m4.fw"),
517 PROPERTY_ENTRY_BOOL("silead,home-button"),
518 { }
519 };
520
521 static const struct ts_dmi_data jumper_ezpad_6_m4_data = {
522 .acpi_name = "MSSL1680:00",
523 .properties = jumper_ezpad_6_m4_props,
524 };
525
526 static const struct property_entry jumper_ezpad_7_props[] = {
527 PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
528 PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
529 PROPERTY_ENTRY_U32("touchscreen-size-x", 2044),
530 PROPERTY_ENTRY_U32("touchscreen-size-y", 1526),
531 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
532 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-jumper-ezpad-7.fw"),
533 PROPERTY_ENTRY_BOOL("silead,stuck-controller-bug"),
534 { }
535 };
536
537 static const struct ts_dmi_data jumper_ezpad_7_data = {
538 .acpi_name = "MSSL1680:00",
539 .properties = jumper_ezpad_7_props,
540 };
541
542 static const struct property_entry jumper_ezpad_mini3_props[] = {
543 PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
544 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
545 PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
546 PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
547 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
548 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
549 { }
550 };
551
552 static const struct ts_dmi_data jumper_ezpad_mini3_data = {
553 .acpi_name = "MSSL1680:00",
554 .properties = jumper_ezpad_mini3_props,
555 };
556
557 static const struct property_entry mpman_converter9_props[] = {
558 PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
559 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
560 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
561 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
562 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
563 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
564 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-mpman-converter9.fw"),
565 { }
566 };
567
568 static const struct ts_dmi_data mpman_converter9_data = {
569 .acpi_name = "MSSL1680:00",
570 .properties = mpman_converter9_props,
571 };
572
573 static const struct property_entry mpman_mpwin895cl_props[] = {
574 PROPERTY_ENTRY_U32("touchscreen-min-x", 3),
575 PROPERTY_ENTRY_U32("touchscreen-min-y", 9),
576 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
577 PROPERTY_ENTRY_U32("touchscreen-size-y", 1150),
578 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
579 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-mpman-mpwin895cl.fw"),
580 PROPERTY_ENTRY_BOOL("silead,home-button"),
581 { }
582 };
583
584 static const struct ts_dmi_data mpman_mpwin895cl_data = {
585 .acpi_name = "MSSL1680:00",
586 .properties = mpman_mpwin895cl_props,
587 };
588
589 static const struct property_entry myria_my8307_props[] = {
590 PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
591 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
592 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
593 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
594 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
595 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-myria-my8307.fw"),
596 PROPERTY_ENTRY_BOOL("silead,home-button"),
597 { }
598 };
599
600 static const struct ts_dmi_data myria_my8307_data = {
601 .acpi_name = "MSSL1680:00",
602 .properties = myria_my8307_props,
603 };
604
605 static const struct property_entry onda_obook_20_plus_props[] = {
606 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
607 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
608 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
609 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
610 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
611 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
612 PROPERTY_ENTRY_BOOL("silead,home-button"),
613 { }
614 };
615
616 static const struct ts_dmi_data onda_obook_20_plus_data = {
617 .acpi_name = "MSSL1680:00",
618 .properties = onda_obook_20_plus_props,
619 };
620
621 static const struct property_entry onda_v80_plus_v3_props[] = {
622 PROPERTY_ENTRY_U32("touchscreen-min-x", 22),
623 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
624 PROPERTY_ENTRY_U32("touchscreen-size-x", 1698),
625 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
626 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
627 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v80-plus-v3.fw"),
628 PROPERTY_ENTRY_BOOL("silead,home-button"),
629 { }
630 };
631
632 static const struct ts_dmi_data onda_v80_plus_v3_data = {
633 .embedded_fw = {
634 .name = "silead/gsl3676-onda-v80-plus-v3.fw",
635 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
636 .length = 37224,
637 .sha256 = { 0x8f, 0xbd, 0x8f, 0x0c, 0x6b, 0xba, 0x5b, 0xf5,
638 0xa3, 0xc7, 0xa3, 0xc0, 0x4f, 0xcd, 0xdf, 0x32,
639 0xcc, 0xe4, 0x70, 0xd6, 0x46, 0x9c, 0xd7, 0xa7,
640 0x4b, 0x82, 0x3f, 0xab, 0xc7, 0x90, 0xea, 0x23 },
641 },
642 .acpi_name = "MSSL1680:00",
643 .properties = onda_v80_plus_v3_props,
644 };
645
646 static const struct property_entry onda_v820w_32g_props[] = {
647 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
648 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
649 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
650 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-onda-v820w-32g.fw"),
651 PROPERTY_ENTRY_BOOL("silead,home-button"),
652 { }
653 };
654
655 static const struct ts_dmi_data onda_v820w_32g_data = {
656 .acpi_name = "MSSL1680:00",
657 .properties = onda_v820w_32g_props,
658 };
659
660 static const struct property_entry onda_v891_v5_props[] = {
661 PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
662 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
663 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
664 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
665 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
666 PROPERTY_ENTRY_STRING("firmware-name",
667 "gsl3676-onda-v891-v5.fw"),
668 PROPERTY_ENTRY_BOOL("silead,home-button"),
669 { }
670 };
671
672 static const struct ts_dmi_data onda_v891_v5_data = {
673 .acpi_name = "MSSL1680:00",
674 .properties = onda_v891_v5_props,
675 };
676
677 static const struct property_entry onda_v891w_v1_props[] = {
678 PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
679 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
680 PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
681 PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
682 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-onda-v891w-v1.fw"),
683 PROPERTY_ENTRY_BOOL("silead,home-button"),
684 { }
685 };
686
687 static const struct ts_dmi_data onda_v891w_v1_data = {
688 .acpi_name = "MSSL1680:00",
689 .properties = onda_v891w_v1_props,
690 };
691
692 static const struct property_entry onda_v891w_v3_props[] = {
693 PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
694 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
695 PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
696 PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
697 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
698 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v891w-v3.fw"),
699 PROPERTY_ENTRY_BOOL("silead,home-button"),
700 { }
701 };
702
703 static const struct ts_dmi_data onda_v891w_v3_data = {
704 .acpi_name = "MSSL1680:00",
705 .properties = onda_v891w_v3_props,
706 };
707
708 static const struct property_entry pipo_w2s_props[] = {
709 PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
710 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
711 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
712 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
713 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w2s.fw"),
714 { }
715 };
716
717 static const struct ts_dmi_data pipo_w2s_data = {
718 .embedded_fw = {
719 .name = "silead/gsl1680-pipo-w2s.fw",
720 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
721 .length = 39072,
722 .sha256 = { 0xd0, 0x58, 0xc4, 0x7d, 0x55, 0x2d, 0x62, 0x18,
723 0xd1, 0x6a, 0x71, 0x73, 0x0b, 0x3f, 0xbe, 0x60,
724 0xbb, 0x45, 0x8c, 0x52, 0x27, 0xb7, 0x18, 0xf4,
725 0x31, 0x00, 0x6a, 0x49, 0x76, 0xd8, 0x7c, 0xd3 },
726 },
727 .acpi_name = "MSSL1680:00",
728 .properties = pipo_w2s_props,
729 };
730
731 static const struct property_entry pipo_w11_props[] = {
732 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
733 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
734 PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
735 PROPERTY_ENTRY_U32("touchscreen-size-y", 1532),
736 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w11.fw"),
737 PROPERTY_ENTRY_BOOL("silead,home-button"),
738 { }
739 };
740
741 static const struct ts_dmi_data pipo_w11_data = {
742 .acpi_name = "MSSL1680:00",
743 .properties = pipo_w11_props,
744 };
745
746 static const struct property_entry positivo_c4128b_props[] = {
747 PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
748 PROPERTY_ENTRY_U32("touchscreen-min-y", 13),
749 PROPERTY_ENTRY_U32("touchscreen-size-x", 1915),
750 PROPERTY_ENTRY_U32("touchscreen-size-y", 1269),
751 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-positivo-c4128b.fw"),
752 { }
753 };
754
755 static const struct ts_dmi_data positivo_c4128b_data = {
756 .acpi_name = "MSSL1680:00",
757 .properties = positivo_c4128b_props,
758 };
759
760 static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
761 PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
762 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
763 PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
764 PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
765 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
766 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
767 PROPERTY_ENTRY_BOOL("silead,home-button"),
768 { }
769 };
770
771 static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
772 .acpi_name = "MSSL1680:00",
773 .properties = pov_mobii_wintab_p800w_v20_props,
774 };
775
776 static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
777 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
778 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
779 PROPERTY_ENTRY_U32("touchscreen-size-x", 1794),
780 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
781 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
782 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p800w.fw"),
783 PROPERTY_ENTRY_BOOL("silead,home-button"),
784 { }
785 };
786
787 static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
788 .acpi_name = "MSSL1680:00",
789 .properties = pov_mobii_wintab_p800w_v21_props,
790 };
791
792 static const struct property_entry pov_mobii_wintab_p1006w_v10_props[] = {
793 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
794 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
795 PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
796 PROPERTY_ENTRY_U32("touchscreen-size-y", 1520),
797 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
798 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p1006w-v10.fw"),
799 PROPERTY_ENTRY_BOOL("silead,home-button"),
800 { }
801 };
802
803 static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = {
804 .acpi_name = "MSSL1680:00",
805 .properties = pov_mobii_wintab_p1006w_v10_props,
806 };
807
808 static const struct property_entry predia_basic_props[] = {
809 PROPERTY_ENTRY_U32("touchscreen-min-x", 3),
810 PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
811 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
812 PROPERTY_ENTRY_U32("touchscreen-size-y", 1144),
813 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
814 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-predia-basic.fw"),
815 PROPERTY_ENTRY_BOOL("silead,home-button"),
816 { }
817 };
818
819 static const struct ts_dmi_data predia_basic_data = {
820 .acpi_name = "MSSL1680:00",
821 .properties = predia_basic_props,
822 };
823
824 static const struct property_entry rca_cambio_w101_v2_props[] = {
825 PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
826 PROPERTY_ENTRY_U32("touchscreen-min-y", 20),
827 PROPERTY_ENTRY_U32("touchscreen-size-x", 1644),
828 PROPERTY_ENTRY_U32("touchscreen-size-y", 874),
829 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
830 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-rca-cambio-w101-v2.fw"),
831 { }
832 };
833
834 static const struct ts_dmi_data rca_cambio_w101_v2_data = {
835 .acpi_name = "MSSL1680:00",
836 .properties = rca_cambio_w101_v2_props,
837 };
838
839 static const struct property_entry rwc_nanote_p8_props[] = {
840 PROPERTY_ENTRY_U32("touchscreen-min-y", 46),
841 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
842 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
843 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
844 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-rwc-nanote-p8.fw"),
845 { }
846 };
847
848 static const struct ts_dmi_data rwc_nanote_p8_data = {
849 .acpi_name = "MSSL1680:00",
850 .properties = rwc_nanote_p8_props,
851 };
852
853 static const struct property_entry rwc_nanote_next_props[] = {
854 PROPERTY_ENTRY_U32("touchscreen-min-x", 5),
855 PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
856 PROPERTY_ENTRY_U32("touchscreen-size-x", 1785),
857 PROPERTY_ENTRY_U32("touchscreen-size-y", 1145),
858 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
859 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-rwc-nanote-next.fw"),
860 { }
861 };
862
863 static const struct ts_dmi_data rwc_nanote_next_data = {
864 .acpi_name = "MSSL1680:00",
865 .properties = rwc_nanote_next_props,
866 };
867
868 static const struct property_entry sary_tab_3_props[] = {
869 PROPERTY_ENTRY_U32("touchscreen-size-x", 1730),
870 PROPERTY_ENTRY_U32("touchscreen-size-y", 1151),
871 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
872 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
873 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
874 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-sary-tab-3.fw"),
875 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
876 PROPERTY_ENTRY_BOOL("silead,home-button"),
877 { }
878 };
879
880 static const struct ts_dmi_data sary_tab_3_data = {
881 .acpi_name = "MSSL1680:00",
882 .properties = sary_tab_3_props,
883 };
884
885 static const struct property_entry schneider_sct101ctm_props[] = {
886 PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
887 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
888 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
889 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
890 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
891 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-schneider-sct101ctm.fw"),
892 PROPERTY_ENTRY_BOOL("silead,home-button"),
893 { }
894 };
895
896 static const struct ts_dmi_data schneider_sct101ctm_data = {
897 .acpi_name = "MSSL1680:00",
898 .properties = schneider_sct101ctm_props,
899 };
900
901 static const struct property_entry globalspace_solt_ivw116_props[] = {
902 PROPERTY_ENTRY_U32("touchscreen-min-x", 7),
903 PROPERTY_ENTRY_U32("touchscreen-min-y", 22),
904 PROPERTY_ENTRY_U32("touchscreen-size-x", 1723),
905 PROPERTY_ENTRY_U32("touchscreen-size-y", 1077),
906 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-globalspace-solt-ivw116.fw"),
907 PROPERTY_ENTRY_BOOL("silead,home-button"),
908 { }
909 };
910
911 static const struct ts_dmi_data globalspace_solt_ivw116_data = {
912 .acpi_name = "MSSL1680:00",
913 .properties = globalspace_solt_ivw116_props,
914 };
915
916 static const struct property_entry techbite_arc_11_6_props[] = {
917 PROPERTY_ENTRY_U32("touchscreen-min-x", 5),
918 PROPERTY_ENTRY_U32("touchscreen-min-y", 7),
919 PROPERTY_ENTRY_U32("touchscreen-size-x", 1981),
920 PROPERTY_ENTRY_U32("touchscreen-size-y", 1270),
921 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
922 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-techbite-arc-11-6.fw"),
923 { }
924 };
925
926 static const struct ts_dmi_data techbite_arc_11_6_data = {
927 .acpi_name = "MSSL1680:00",
928 .properties = techbite_arc_11_6_props,
929 };
930
931 static const struct property_entry teclast_tbook11_props[] = {
932 PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
933 PROPERTY_ENTRY_U32("touchscreen-min-y", 14),
934 PROPERTY_ENTRY_U32("touchscreen-size-x", 1916),
935 PROPERTY_ENTRY_U32("touchscreen-size-y", 1264),
936 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
937 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-teclast-tbook11.fw"),
938 PROPERTY_ENTRY_BOOL("silead,home-button"),
939 { }
940 };
941
942 static const struct ts_dmi_data teclast_tbook11_data = {
943 .embedded_fw = {
944 .name = "silead/gsl3692-teclast-tbook11.fw",
945 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
946 .length = 43560,
947 .sha256 = { 0x9d, 0xb0, 0x3d, 0xf1, 0x00, 0x3c, 0xb5, 0x25,
948 0x62, 0x8a, 0xa0, 0x93, 0x4b, 0xe0, 0x4e, 0x75,
949 0xd1, 0x27, 0xb1, 0x65, 0x3c, 0xba, 0xa5, 0x0f,
950 0xcd, 0xb4, 0xbe, 0x00, 0xbb, 0xf6, 0x43, 0x29 },
951 },
952 .acpi_name = "MSSL1680:00",
953 .properties = teclast_tbook11_props,
954 };
955
956 static const struct property_entry teclast_x16_plus_props[] = {
957 PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
958 PROPERTY_ENTRY_U32("touchscreen-min-y", 14),
959 PROPERTY_ENTRY_U32("touchscreen-size-x", 1916),
960 PROPERTY_ENTRY_U32("touchscreen-size-y", 1264),
961 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
962 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-teclast-x16-plus.fw"),
963 PROPERTY_ENTRY_BOOL("silead,home-button"),
964 { }
965 };
966
967 static const struct ts_dmi_data teclast_x16_plus_data = {
968 .embedded_fw = {
969 .name = "silead/gsl3692-teclast-x16-plus.fw",
970 .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
971 .length = 43560,
972 .sha256 = { 0x9d, 0xb0, 0x3d, 0xf1, 0x00, 0x3c, 0xb5, 0x25,
973 0x62, 0x8a, 0xa0, 0x93, 0x4b, 0xe0, 0x4e, 0x75,
974 0xd1, 0x27, 0xb1, 0x65, 0x3c, 0xba, 0xa5, 0x0f,
975 0xcd, 0xb4, 0xbe, 0x00, 0xbb, 0xf6, 0x43, 0x29 },
976 },
977 .acpi_name = "MSSL1680:00",
978 .properties = teclast_x16_plus_props,
979 };
980
981 static const struct property_entry teclast_x3_plus_props[] = {
982 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
983 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
984 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"),
985 PROPERTY_ENTRY_BOOL("silead,home-button"),
986 { }
987 };
988
989 static const struct ts_dmi_data teclast_x3_plus_data = {
990 .acpi_name = "MSSL1680:00",
991 .properties = teclast_x3_plus_props,
992 };
993
994 static const struct property_entry teclast_x98plus2_props[] = {
995 PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
996 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
997 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
998 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
999 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-teclast_x98plus2.fw"),
1000 { }
1001 };
1002
1003 static const struct ts_dmi_data teclast_x98plus2_data = {
1004 .acpi_name = "MSSL1680:00",
1005 .properties = teclast_x98plus2_props,
1006 };
1007
1008 static const struct property_entry trekstor_primebook_c11_props[] = {
1009 PROPERTY_ENTRY_U32("touchscreen-size-x", 1970),
1010 PROPERTY_ENTRY_U32("touchscreen-size-y", 1530),
1011 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
1012 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c11.fw"),
1013 PROPERTY_ENTRY_BOOL("silead,home-button"),
1014 { }
1015 };
1016
1017 static const struct ts_dmi_data trekstor_primebook_c11_data = {
1018 .acpi_name = "MSSL1680:00",
1019 .properties = trekstor_primebook_c11_props,
1020 };
1021
1022 static const struct property_entry trekstor_primebook_c13_props[] = {
1023 PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
1024 PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
1025 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c13.fw"),
1026 PROPERTY_ENTRY_BOOL("silead,home-button"),
1027 { }
1028 };
1029
1030 static const struct ts_dmi_data trekstor_primebook_c13_data = {
1031 .acpi_name = "MSSL1680:00",
1032 .properties = trekstor_primebook_c13_props,
1033 };
1034
1035 static const struct property_entry trekstor_primetab_t13b_props[] = {
1036 PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
1037 PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
1038 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primetab-t13b.fw"),
1039 PROPERTY_ENTRY_BOOL("silead,home-button"),
1040 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
1041 { }
1042 };
1043
1044 static const struct ts_dmi_data trekstor_primetab_t13b_data = {
1045 .acpi_name = "MSSL1680:00",
1046 .properties = trekstor_primetab_t13b_props,
1047 };
1048
1049 static const struct property_entry trekstor_surftab_duo_w1_props[] = {
1050 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
1051 { }
1052 };
1053
1054 static const struct ts_dmi_data trekstor_surftab_duo_w1_data = {
1055 .acpi_name = "GDIX1001:00",
1056 .properties = trekstor_surftab_duo_w1_props,
1057 };
1058
1059 static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
1060 PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
1061 PROPERTY_ENTRY_U32("touchscreen-min-y", 0),
1062 PROPERTY_ENTRY_U32("touchscreen-size-x", 1890),
1063 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
1064 PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
1065 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-surftab-twin-10-1-st10432-8.fw"),
1066 PROPERTY_ENTRY_BOOL("silead,home-button"),
1067 { }
1068 };
1069
1070 static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
1071 .acpi_name = "MSSL1680:00",
1072 .properties = trekstor_surftab_twin_10_1_props,
1073 };
1074
1075 static const struct property_entry trekstor_surftab_wintron70_props[] = {
1076 PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
1077 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
1078 PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
1079 PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
1080 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-surftab-wintron70-st70416-6.fw"),
1081 PROPERTY_ENTRY_BOOL("silead,home-button"),
1082 { }
1083 };
1084
1085 static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
1086 .acpi_name = "MSSL1680:00",
1087 .properties = trekstor_surftab_wintron70_props,
1088 };
1089
1090 static const struct property_entry viglen_connect_10_props[] = {
1091 PROPERTY_ENTRY_U32("touchscreen-size-x", 1890),
1092 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
1093 PROPERTY_ENTRY_U32("touchscreen-fuzz-x", 6),
1094 PROPERTY_ENTRY_U32("touchscreen-fuzz-y", 6),
1095 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
1096 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-viglen-connect-10.fw"),
1097 PROPERTY_ENTRY_BOOL("silead,home-button"),
1098 { }
1099 };
1100
1101 static const struct ts_dmi_data viglen_connect_10_data = {
1102 .acpi_name = "MSSL1680:00",
1103 .properties = viglen_connect_10_props,
1104 };
1105
1106 static const struct property_entry vinga_twizzle_j116_props[] = {
1107 PROPERTY_ENTRY_U32("touchscreen-size-x", 1920),
1108 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
1109 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-vinga-twizzle_j116.fw"),
1110 PROPERTY_ENTRY_BOOL("silead,home-button"),
1111 { }
1112 };
1113
1114 static const struct ts_dmi_data vinga_twizzle_j116_data = {
1115 .acpi_name = "MSSL1680:00",
1116 .properties = vinga_twizzle_j116_props,
1117 };
1118
1119 /* NOTE: Please keep this table sorted alphabetically */
1120 const struct dmi_system_id touchscreen_dmi_table[] = {
1121 {
1122 /* Archos 101 Cesium Educ */
1123 .driver_data = (void *)&archos_101_cesium_educ_data,
1124 .matches = {
1125 DMI_MATCH(DMI_PRODUCT_NAME, "ARCHOS 101 Cesium Educ"),
1126 },
1127 },
1128 {
1129 /* Bush Windows tablet */
1130 .driver_data = (void *)&bush_bush_windows_tablet_data,
1131 .matches = {
1132 DMI_MATCH(DMI_PRODUCT_NAME, "Bush Windows tablet"),
1133 },
1134 },
1135 {
1136 /* Chuwi Hi8 */
1137 .driver_data = (void *)&chuwi_hi8_data,
1138 .matches = {
1139 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
1140 DMI_MATCH(DMI_PRODUCT_NAME, "S806"),
1141 },
1142 },
1143 {
1144 /* Chuwi Hi8 (H1D_S806_206) */
1145 .driver_data = (void *)&chuwi_hi8_data,
1146 .matches = {
1147 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1148 DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
1149 DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"),
1150 },
1151 },
1152 {
1153 /* Chuwi Hi8 Air (CWI543) */
1154 .driver_data = (void *)&chuwi_hi8_air_data,
1155 .matches = {
1156 DMI_MATCH(DMI_BOARD_VENDOR, "Default string"),
1157 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
1158 DMI_MATCH(DMI_PRODUCT_NAME, "Hi8 Air"),
1159 },
1160 },
1161 {
1162 /* Chuwi Hi8 Pro (CWI513) */
1163 .driver_data = (void *)&chuwi_hi8_pro_data,
1164 .matches = {
1165 DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
1166 DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
1167 },
1168 },
1169 {
1170 /* Chuwi Hi10 Air */
1171 .driver_data = (void *)&chuwi_hi10_air_data,
1172 .matches = {
1173 DMI_MATCH(DMI_SYS_VENDOR, "CHUWI INNOVATION AND TECHNOLOGY(SHENZHEN)CO.LTD"),
1174 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
1175 DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"),
1176 },
1177 },
1178 {
1179 /* Chuwi Hi10 Plus (CWI527) */
1180 .driver_data = (void *)&chuwi_hi10_plus_data,
1181 .matches = {
1182 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
1183 DMI_MATCH(DMI_PRODUCT_NAME, "Hi10 plus tablet"),
1184 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
1185 },
1186 },
1187 {
1188 /* Chuwi Hi10 Pro (CWI529) */
1189 .driver_data = (void *)&chuwi_hi10_pro_data,
1190 .matches = {
1191 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
1192 DMI_MATCH(DMI_PRODUCT_NAME, "Hi10 pro tablet"),
1193 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
1194 },
1195 },
1196 {
1197 /* Chuwi HiBook (CWI514) */
1198 .driver_data = (void *)&chuwi_hibook_data,
1199 .matches = {
1200 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
1201 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
1202 /* Above matches are too generic, add bios-date match */
1203 DMI_MATCH(DMI_BIOS_DATE, "05/07/2016"),
1204 },
1205 },
1206 {
1207 /* Chuwi Vi8 (CWI501) */
1208 .driver_data = (void *)&chuwi_vi8_data,
1209 .matches = {
1210 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1211 DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
1212 DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.W86JLBNR01"),
1213 },
1214 },
1215 {
1216 /* Chuwi Vi8 (CWI506) */
1217 .driver_data = (void *)&chuwi_vi8_data,
1218 .matches = {
1219 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1220 DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
1221 DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
1222 },
1223 },
1224 {
1225 /* Chuwi Vi8 dual-boot (CWI506) */
1226 .driver_data = (void *)&chuwi_vi8_data,
1227 .matches = {
1228 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1229 DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
1230 DMI_MATCH(DMI_BIOS_VERSION, "CHUWI2.D86JHBNR02"),
1231 },
1232 },
1233 {
1234 /* Chuwi Vi8 Plus (CWI519) */
1235 .driver_data = (void *)&chuwi_vi8_plus_data,
1236 .matches = {
1237 DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
1238 DMI_MATCH(DMI_PRODUCT_NAME, "D2D3_Vi8A1"),
1239 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
1240 },
1241 },
1242 {
1243 /* Chuwi Vi10 (CWI505) */
1244 .driver_data = (void *)&chuwi_vi10_data,
1245 .matches = {
1246 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
1247 DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"),
1248 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
1249 DMI_MATCH(DMI_PRODUCT_NAME, "S165"),
1250 },
1251 },
1252 {
1253 /* Chuwi Surbook Mini (CWI540) */
1254 .driver_data = (void *)&chuwi_surbook_mini_data,
1255 .matches = {
1256 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
1257 DMI_MATCH(DMI_PRODUCT_NAME, "C3W6_AP108_4G"),
1258 },
1259 },
1260 {
1261 /* Connect Tablet 9 */
1262 .driver_data = (void *)&connect_tablet9_data,
1263 .matches = {
1264 DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
1265 DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
1266 },
1267 },
1268 {
1269 /* CSL Panther Tab HD */
1270 .driver_data = (void *)&csl_panther_tab_hd_data,
1271 .matches = {
1272 DMI_MATCH(DMI_SYS_VENDOR, "CSL Computer GmbH & Co. KG"),
1273 DMI_MATCH(DMI_PRODUCT_NAME, "CSL Panther Tab HD"),
1274 },
1275 },
1276 {
1277 /* CUBE iwork8 Air */
1278 .driver_data = (void *)&cube_iwork8_air_data,
1279 .matches = {
1280 DMI_MATCH(DMI_SYS_VENDOR, "cube"),
1281 DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"),
1282 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
1283 },
1284 },
1285 {
1286 /* Cube KNote i1101 */
1287 .driver_data = (void *)&cube_knote_i1101_data,
1288 .matches = {
1289 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
1290 DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"),
1291 DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"),
1292 DMI_MATCH(DMI_PRODUCT_NAME, "i1101"),
1293 },
1294 },
1295 {
1296 /* DEXP Ursus 7W */
1297 .driver_data = (void *)&dexp_ursus_7w_data,
1298 .matches = {
1299 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1300 DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
1301 },
1302 },
1303 {
1304 /* DEXP Ursus KX210i */
1305 .driver_data = (void *)&dexp_ursus_kx210i_data,
1306 .matches = {
1307 DMI_MATCH(DMI_SYS_VENDOR, "INSYDE Corp."),
1308 DMI_MATCH(DMI_PRODUCT_NAME, "S107I"),
1309 },
1310 },
1311 {
1312 /* Digma Citi E200 */
1313 .driver_data = (void *)&digma_citi_e200_data,
1314 .matches = {
1315 DMI_MATCH(DMI_SYS_VENDOR, "Digma"),
1316 DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"),
1317 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
1318 },
1319 },
1320 {
1321 /* Estar Beauty HD (MID 7316R) */
1322 .driver_data = (void *)&estar_beauty_hd_data,
1323 .matches = {
1324 DMI_MATCH(DMI_SYS_VENDOR, "Estar"),
1325 DMI_MATCH(DMI_PRODUCT_NAME, "eSTAR BEAUTY HD Intel Quad core"),
1326 },
1327 },
1328 {
1329 /* GP-electronic T701 */
1330 .driver_data = (void *)&gp_electronic_t701_data,
1331 .matches = {
1332 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1333 DMI_MATCH(DMI_PRODUCT_NAME, "T701"),
1334 DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"),
1335 },
1336 },
1337 {
1338 /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
1339 .driver_data = (void *)&trekstor_surftab_wintron70_data,
1340 .matches = {
1341 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1342 DMI_MATCH(DMI_PRODUCT_NAME, "i71c"),
1343 DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"),
1344 },
1345 },
1346 {
1347 /* Irbis TW90 */
1348 .driver_data = (void *)&irbis_tw90_data,
1349 .matches = {
1350 DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"),
1351 DMI_MATCH(DMI_PRODUCT_NAME, "TW90"),
1352 },
1353 },
1354 {
1355 /* Irbis TW118 */
1356 .driver_data = (void *)&irbis_tw118_data,
1357 .matches = {
1358 DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"),
1359 DMI_MATCH(DMI_PRODUCT_NAME, "TW118"),
1360 },
1361 },
1362 {
1363 /* I.T.Works TW891 */
1364 .driver_data = (void *)&itworks_tw891_data,
1365 .matches = {
1366 DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
1367 DMI_MATCH(DMI_PRODUCT_NAME, "TW891"),
1368 },
1369 },
1370 {
1371 /* Jumper EZpad 6 Pro */
1372 .driver_data = (void *)&jumper_ezpad_6_pro_data,
1373 .matches = {
1374 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
1375 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
1376 DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
1377 /* Above matches are too generic, add bios-date match */
1378 DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"),
1379 },
1380 },
1381 {
1382 /* Jumper EZpad 6 Pro B */
1383 .driver_data = (void *)&jumper_ezpad_6_pro_b_data,
1384 .matches = {
1385 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
1386 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
1387 DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
1388 /* Above matches are too generic, add bios-date match */
1389 DMI_MATCH(DMI_BIOS_DATE, "04/24/2018"),
1390 },
1391 },
1392 {
1393 /* Jumper EZpad 6s Pro */
1394 .driver_data = (void *)&jumper_ezpad_6_pro_b_data,
1395 .matches = {
1396 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
1397 DMI_MATCH(DMI_PRODUCT_NAME, "Ezpad"),
1398 /* Above matches are too generic, add bios match */
1399 DMI_MATCH(DMI_BIOS_VERSION, "E.WSA116_8.E1.042.bin"),
1400 DMI_MATCH(DMI_BIOS_DATE, "01/08/2020"),
1401 },
1402 },
1403 {
1404 /* Jumper EZpad 6 m4 */
1405 .driver_data = (void *)&jumper_ezpad_6_m4_data,
1406 .matches = {
1407 DMI_MATCH(DMI_SYS_VENDOR, "jumper"),
1408 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
1409 /* Jumper8.S106x.A00C.1066 with the version dropped */
1410 DMI_MATCH(DMI_BIOS_VERSION, "Jumper8.S106x"),
1411 },
1412 },
1413 {
1414 /* Jumper EZpad 7 */
1415 .driver_data = (void *)&jumper_ezpad_7_data,
1416 .matches = {
1417 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
1418 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
1419 /* Jumper12x.WJ2012.bsBKRCP05 with the version dropped */
1420 DMI_MATCH(DMI_BIOS_VERSION, "Jumper12x.WJ2012.bsBKRCP"),
1421 },
1422 },
1423 {
1424 /* Jumper EZpad mini3 */
1425 .driver_data = (void *)&jumper_ezpad_mini3_data,
1426 .matches = {
1427 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1428 /* jumperx.T87.KFBNEEA02 with the version-nr dropped */
1429 DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
1430 },
1431 },
1432 {
1433 /* Juno Tablet */
1434 .driver_data = (void *)&gdix1002_upside_down_data,
1435 .matches = {
1436 DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
1437 /* Both product- and board-name being "Default string" is somewhat rare */
1438 DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
1439 DMI_MATCH(DMI_BOARD_NAME, "Default string"),
1440 /* Above matches are too generic, add partial bios-version match */
1441 DMI_MATCH(DMI_BIOS_VERSION, "JP2V1."),
1442 },
1443 },
1444 {
1445 /* Mediacom WinPad 7.0 W700 (same hw as Wintron surftab 7") */
1446 .driver_data = (void *)&trekstor_surftab_wintron70_data,
1447 .matches = {
1448 DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"),
1449 DMI_MATCH(DMI_PRODUCT_NAME, "WinPad 7 W10 - WPW700"),
1450 },
1451 },
1452 {
1453 /* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */
1454 .driver_data = (void *)&trekstor_primebook_c11_data,
1455 .matches = {
1456 DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"),
1457 DMI_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"),
1458 },
1459 },
1460 {
1461 /* MP Man Converter 9 */
1462 .driver_data = (void *)&mpman_converter9_data,
1463 .matches = {
1464 DMI_MATCH(DMI_SYS_VENDOR, "MPMAN"),
1465 DMI_MATCH(DMI_PRODUCT_NAME, "Converter9"),
1466 },
1467 },
1468 {
1469 /* MP Man MPWIN895CL */
1470 .driver_data = (void *)&mpman_mpwin895cl_data,
1471 .matches = {
1472 DMI_MATCH(DMI_SYS_VENDOR, "MPMAN"),
1473 DMI_MATCH(DMI_PRODUCT_NAME, "MPWIN8900CL"),
1474 },
1475 },
1476 {
1477 /* Myria MY8307 */
1478 .driver_data = (void *)&myria_my8307_data,
1479 .matches = {
1480 DMI_MATCH(DMI_SYS_VENDOR, "Complet Electro Serv"),
1481 DMI_MATCH(DMI_PRODUCT_NAME, "MY8307"),
1482 },
1483 },
1484 {
1485 /* Onda oBook 20 Plus */
1486 .driver_data = (void *)&onda_obook_20_plus_data,
1487 .matches = {
1488 DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
1489 DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
1490 },
1491 },
1492 {
1493 /* ONDA V80 plus v3 (P80PSBG9V3A01501) */
1494 .driver_data = (void *)&onda_v80_plus_v3_data,
1495 .matches = {
1496 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONDA"),
1497 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V80 PLUS")
1498 },
1499 },
1500 {
1501 /* ONDA V820w DualOS */
1502 .driver_data = (void *)&onda_v820w_32g_data,
1503 .matches = {
1504 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
1505 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS")
1506 },
1507 },
1508 {
1509 /* ONDA V891 v5 */
1510 .driver_data = (void *)&onda_v891_v5_data,
1511 .matches = {
1512 DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
1513 DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
1514 DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D869CJABNRBA06"),
1515 },
1516 },
1517 {
1518 /* ONDA V891w revision P891WBEBV1B00 aka v1 */
1519 .driver_data = (void *)&onda_v891w_v1_data,
1520 .matches = {
1521 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
1522 DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"),
1523 DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"),
1524 /* Exact match, different versions need different fw */
1525 DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
1526 },
1527 },
1528 {
1529 /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
1530 .driver_data = (void *)&onda_v891w_v3_data,
1531 .matches = {
1532 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1533 DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
1534 DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
1535 },
1536 },
1537 {
1538 /* Pipo W2S */
1539 .driver_data = (void *)&pipo_w2s_data,
1540 .matches = {
1541 DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
1542 DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
1543 },
1544 },
1545 {
1546 /* Pipo W11 */
1547 .driver_data = (void *)&pipo_w11_data,
1548 .matches = {
1549 DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
1550 DMI_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."),
1551 /* Above matches are too generic, add bios-ver match */
1552 DMI_MATCH(DMI_BIOS_VERSION, "JS-BI-10.6-SF133GR300-GA55B-024-F"),
1553 },
1554 },
1555 {
1556 /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
1557 .driver_data = (void *)&trekstor_surftab_wintron70_data,
1558 .matches = {
1559 DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"),
1560 DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"),
1561 /* Exact match, different versions need different fw */
1562 DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"),
1563 },
1564 },
1565 {
1566 /* Positivo C4128B */
1567 .driver_data = (void *)&positivo_c4128b_data,
1568 .matches = {
1569 DMI_MATCH(DMI_SYS_VENDOR, "Positivo Tecnologia SA"),
1570 DMI_MATCH(DMI_PRODUCT_NAME, "C4128B-1"),
1571 },
1572 },
1573 {
1574 /* Point of View mobii wintab p800w (v2.0) */
1575 .driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
1576 .matches = {
1577 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
1578 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
1579 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"),
1580 /* Above matches are too generic, add bios-date match */
1581 DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
1582 },
1583 },
1584 {
1585 /* Predia Basic tablet) */
1586 .driver_data = (void *)&predia_basic_data,
1587 .matches = {
1588 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1589 DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
1590 /* Above matches are too generic, add bios-version match */
1591 DMI_MATCH(DMI_BIOS_VERSION, "Mx.WT107.KUBNGEA"),
1592 },
1593 },
1594 {
1595 /* Point of View mobii wintab p800w (v2.1) */
1596 .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
1597 .matches = {
1598 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
1599 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
1600 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"),
1601 /* Above matches are too generic, add bios-date match */
1602 DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"),
1603 },
1604 },
1605 {
1606 /* Point of View mobii wintab p1006w (v1.0) */
1607 .driver_data = (void *)&pov_mobii_wintab_p1006w_v10_data,
1608 .matches = {
1609 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
1610 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
1611 /* Note 105b is Foxcon's USB/PCI vendor id */
1612 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"),
1613 DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
1614 },
1615 },
1616 {
1617 /* RCA Cambio W101 v2 */
1618 /* https://github.com/onitake/gsl-firmware/discussions/193 */
1619 .driver_data = (void *)&rca_cambio_w101_v2_data,
1620 .matches = {
1621 DMI_MATCH(DMI_SYS_VENDOR, "RCA"),
1622 DMI_MATCH(DMI_PRODUCT_NAME, "W101SA23T1"),
1623 },
1624 },
1625 {
1626 /* RWC NANOTE P8 */
1627 .driver_data = (void *)&rwc_nanote_p8_data,
1628 .matches = {
1629 DMI_MATCH(DMI_BOARD_VENDOR, "Default string"),
1630 DMI_MATCH(DMI_PRODUCT_NAME, "AY07J"),
1631 DMI_MATCH(DMI_PRODUCT_SKU, "0001")
1632 },
1633 },
1634 {
1635 /* RWC NANOTE NEXT */
1636 .driver_data = (void *)&rwc_nanote_next_data,
1637 .matches = {
1638 DMI_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."),
1639 DMI_MATCH(DMI_BOARD_NAME, "To be filled by O.E.M."),
1640 DMI_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
1641 /* Above matches are too generic, add bios-version match */
1642 DMI_MATCH(DMI_BIOS_VERSION, "S8A70R100-V005"),
1643 },
1644 },
1645 {
1646 /* SARY Tab 3 */
1647 .driver_data = (void *)&sary_tab_3_data,
1648 .matches = {
1649 DMI_MATCH(DMI_SYS_VENDOR, "SARY"),
1650 DMI_MATCH(DMI_PRODUCT_NAME, "C210C"),
1651 DMI_MATCH(DMI_PRODUCT_SKU, "TAB3"),
1652 },
1653 },
1654 {
1655 /* Schneider SCT101CTM */
1656 .driver_data = (void *)&schneider_sct101ctm_data,
1657 .matches = {
1658 DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
1659 DMI_MATCH(DMI_PRODUCT_NAME, "SCT101CTM"),
1660 },
1661 },
1662 {
1663 /* GlobalSpace SoLT IVW 11.6" */
1664 .driver_data = (void *)&globalspace_solt_ivw116_data,
1665 .matches = {
1666 DMI_MATCH(DMI_SYS_VENDOR, "Globalspace Tech Pvt Ltd"),
1667 DMI_MATCH(DMI_PRODUCT_NAME, "SolTIVW"),
1668 DMI_MATCH(DMI_PRODUCT_SKU, "PN20170413488"),
1669 },
1670 },
1671 {
1672 /* SUPI S10 */
1673 .driver_data = (void *)&gdix1001_y_inverted_data,
1674 .matches = {
1675 DMI_MATCH(DMI_SYS_VENDOR, "SUPI"),
1676 DMI_MATCH(DMI_PRODUCT_NAME, "S10"),
1677 },
1678 },
1679 {
1680 /* Techbite Arc 11.6 */
1681 .driver_data = (void *)&techbite_arc_11_6_data,
1682 .matches = {
1683 DMI_MATCH(DMI_SYS_VENDOR, "mPTech"),
1684 DMI_MATCH(DMI_PRODUCT_NAME, "techBite Arc 11.6"),
1685 DMI_MATCH(DMI_BOARD_NAME, "G8316_272B"),
1686 },
1687 },
1688 {
1689 /* Teclast Tbook 11 */
1690 .driver_data = (void *)&teclast_tbook11_data,
1691 .matches = {
1692 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
1693 DMI_MATCH(DMI_PRODUCT_NAME, "TbooK 11"),
1694 DMI_MATCH(DMI_PRODUCT_SKU, "E5A6_A1"),
1695 },
1696 },
1697 {
1698 /* Teclast X16 Plus */
1699 .driver_data = (void *)&teclast_x16_plus_data,
1700 .matches = {
1701 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
1702 DMI_MATCH(DMI_PRODUCT_NAME, "Default string"),
1703 DMI_MATCH(DMI_PRODUCT_SKU, "D3A5_A1"),
1704 },
1705 },
1706 {
1707 /* Teclast X3 Plus */
1708 .driver_data = (void *)&teclast_x3_plus_data,
1709 .matches = {
1710 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
1711 DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
1712 DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
1713 },
1714 },
1715 {
1716 /* Teclast X89 (Android version / BIOS) */
1717 .driver_data = (void *)&gdix1001_upside_down_data,
1718 .matches = {
1719 DMI_MATCH(DMI_BOARD_VENDOR, "WISKY"),
1720 DMI_MATCH(DMI_BOARD_NAME, "3G062i"),
1721 },
1722 },
1723 {
1724 /* Teclast X89 (Windows version / BIOS) */
1725 .driver_data = (void *)&gdix1001_upside_down_data,
1726 .matches = {
1727 /* tPAD is too generic, also match on bios date */
1728 DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
1729 DMI_MATCH(DMI_BOARD_NAME, "tPAD"),
1730 DMI_MATCH(DMI_BIOS_DATE, "12/19/2014"),
1731 },
1732 },
1733 {
1734 /* Teclast X98 Plus II */
1735 .driver_data = (void *)&teclast_x98plus2_data,
1736 .matches = {
1737 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
1738 DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
1739 },
1740 },
1741 {
1742 /* Teclast X98 Pro */
1743 .driver_data = (void *)&gdix1001_upside_down_data,
1744 .matches = {
1745 /*
1746 * Only match BIOS date, because the manufacturers
1747 * BIOS does not report the board name at all
1748 * (sometimes)...
1749 */
1750 DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
1751 DMI_MATCH(DMI_BIOS_DATE, "10/28/2015"),
1752 },
1753 },
1754 {
1755 /* Trekstor Primebook C11 */
1756 .driver_data = (void *)&trekstor_primebook_c11_data,
1757 .matches = {
1758 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1759 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"),
1760 },
1761 },
1762 {
1763 /* Trekstor Primebook C11B (same touchscreen as the C11) */
1764 .driver_data = (void *)&trekstor_primebook_c11_data,
1765 .matches = {
1766 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1767 DMI_MATCH(DMI_PRODUCT_NAME, "PRIMEBOOK C11B"),
1768 },
1769 },
1770 {
1771 /* Trekstor Primebook C13 */
1772 .driver_data = (void *)&trekstor_primebook_c13_data,
1773 .matches = {
1774 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1775 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
1776 },
1777 },
1778 {
1779 /* Trekstor Primetab T13B */
1780 .driver_data = (void *)&trekstor_primetab_t13b_data,
1781 .matches = {
1782 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1783 DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"),
1784 },
1785 },
1786 {
1787 /* TrekStor SurfTab duo W1 10.1 ST10432-10b */
1788 .driver_data = (void *)&trekstor_surftab_duo_w1_data,
1789 .matches = {
1790 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1791 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab duo W1 10.1 (VT4)"),
1792 },
1793 },
1794 {
1795 /* TrekStor SurfTab twin 10.1 ST10432-8 */
1796 .driver_data = (void *)&trekstor_surftab_twin_10_1_data,
1797 .matches = {
1798 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1799 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
1800 },
1801 },
1802 {
1803 /* Trekstor Surftab Wintron 7.0 ST70416-6 */
1804 .driver_data = (void *)&trekstor_surftab_wintron70_data,
1805 .matches = {
1806 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1807 DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"),
1808 /* Exact match, different versions need different fw */
1809 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"),
1810 },
1811 },
1812 {
1813 /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
1814 .driver_data = (void *)&trekstor_surftab_wintron70_data,
1815 .matches = {
1816 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1817 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab wintron 7.0 ST70416-6"),
1818 /* Exact match, different versions need different fw */
1819 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
1820 },
1821 },
1822 {
1823 /* Trekstor Yourbook C11B (same touchscreen as the Primebook C11) */
1824 .driver_data = (void *)&trekstor_primebook_c11_data,
1825 .matches = {
1826 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1827 DMI_MATCH(DMI_PRODUCT_NAME, "YOURBOOK C11B"),
1828 },
1829 },
1830 {
1831 /* Viglen Connect 10 */
1832 .driver_data = (void *)&viglen_connect_10_data,
1833 .matches = {
1834 DMI_MATCH(DMI_SYS_VENDOR, "Viglen Ltd."),
1835 DMI_MATCH(DMI_PRODUCT_NAME, "Connect 10'' Tablet PC"),
1836 },
1837 },
1838 {
1839 /* Vinga Twizzle J116 */
1840 .driver_data = (void *)&vinga_twizzle_j116_data,
1841 .matches = {
1842 DMI_MATCH(DMI_PRODUCT_NAME, "VINGA Twizzle J116"),
1843 },
1844 },
1845 {
1846 /* "WinBook TW100" */
1847 .driver_data = (void *)&gdix1001_upside_down_data,
1848 .matches = {
1849 DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
1850 DMI_MATCH(DMI_PRODUCT_NAME, "TW100")
1851 }
1852 },
1853 {
1854 /* WinBook TW700 */
1855 .driver_data = (void *)&gdix1001_upside_down_data,
1856 .matches = {
1857 DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
1858 DMI_MATCH(DMI_PRODUCT_NAME, "TW700")
1859 },
1860 },
1861 {
1862 /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
1863 .driver_data = (void *)&chuwi_vi8_data,
1864 .matches = {
1865 DMI_MATCH(DMI_SYS_VENDOR, "YOURS"),
1866 DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"),
1867 },
1868 },
1869 { }
1870 };
1871
1872 static struct ts_dmi_data *ts_data;
1873
ts_dmi_add_props(struct i2c_client * client)1874 static void ts_dmi_add_props(struct i2c_client *client)
1875 {
1876 struct device *dev = &client->dev;
1877 int error;
1878
1879 if (has_acpi_companion(dev) &&
1880 strstarts(client->name, ts_data->acpi_name)) {
1881 error = device_create_managed_software_node(dev, ts_data->properties, NULL);
1882 if (error)
1883 dev_err(dev, "failed to add properties: %d\n", error);
1884 }
1885 }
1886
ts_dmi_notifier_call(struct notifier_block * nb,unsigned long action,void * data)1887 static int ts_dmi_notifier_call(struct notifier_block *nb,
1888 unsigned long action, void *data)
1889 {
1890 struct device *dev = data;
1891 struct i2c_client *client;
1892
1893 switch (action) {
1894 case BUS_NOTIFY_ADD_DEVICE:
1895 client = i2c_verify_client(dev);
1896 if (client)
1897 ts_dmi_add_props(client);
1898 break;
1899
1900 default:
1901 break;
1902 }
1903
1904 return 0;
1905 }
1906
1907 #define MAX_CMDLINE_PROPS 16
1908
1909 static struct property_entry ts_cmdline_props[MAX_CMDLINE_PROPS + 1];
1910
1911 static struct ts_dmi_data ts_cmdline_data = {
1912 .properties = ts_cmdline_props,
1913 };
1914
ts_parse_props(char * str)1915 static int __init ts_parse_props(char *str)
1916 {
1917 /* Save the original str to show it on syntax errors */
1918 char orig_str[256];
1919 char *name, *value;
1920 u32 u32val;
1921 int i, ret;
1922
1923 strscpy(orig_str, str);
1924
1925 /*
1926 * str is part of the static_command_line from init/main.c and poking
1927 * holes in that by writing 0 to it is allowed, as is taking long
1928 * lasting references to it.
1929 */
1930 ts_cmdline_data.acpi_name = strsep(&str, ":");
1931
1932 for (i = 0; i < MAX_CMDLINE_PROPS; i++) {
1933 name = strsep(&str, ":");
1934 if (!name || !name[0])
1935 break;
1936
1937 /* Replace '=' with 0 and make value point past '=' or NULL */
1938 value = name;
1939 strsep(&value, "=");
1940 if (!value) {
1941 ts_cmdline_props[i] = PROPERTY_ENTRY_BOOL(name);
1942 } else if (isdigit(value[0])) {
1943 ret = kstrtou32(value, 0, &u32val);
1944 if (ret)
1945 goto syntax_error;
1946
1947 ts_cmdline_props[i] = PROPERTY_ENTRY_U32(name, u32val);
1948 } else {
1949 ts_cmdline_props[i] = PROPERTY_ENTRY_STRING(name, value);
1950 }
1951 }
1952
1953 if (!i || str)
1954 goto syntax_error;
1955
1956 ts_data = &ts_cmdline_data;
1957 return 1;
1958
1959 syntax_error:
1960 pr_err("Invalid '%s' value for 'i2c_touchscreen_props='\n", orig_str);
1961 return 1; /* "i2c_touchscreen_props=" is still a known parameter */
1962 }
1963 __setup("i2c_touchscreen_props=", ts_parse_props);
1964
1965 static struct notifier_block ts_dmi_notifier = {
1966 .notifier_call = ts_dmi_notifier_call,
1967 };
1968
ts_dmi_init(void)1969 static int __init ts_dmi_init(void)
1970 {
1971 const struct dmi_system_id *dmi_id;
1972 struct ts_dmi_data *ts_data_dmi;
1973 int error;
1974
1975 dmi_id = dmi_first_match(touchscreen_dmi_table);
1976 ts_data_dmi = dmi_id ? dmi_id->driver_data : NULL;
1977
1978 if (ts_data) {
1979 /*
1980 * Kernel cmdline provided data takes precedence, copy over
1981 * DMI efi_embedded_fw info if available.
1982 */
1983 if (ts_data_dmi)
1984 ts_data->embedded_fw = ts_data_dmi->embedded_fw;
1985 } else if (ts_data_dmi) {
1986 ts_data = ts_data_dmi;
1987 } else {
1988 return 0; /* Not an error */
1989 }
1990
1991 /* Some dmi table entries only provide an efi_embedded_fw_desc */
1992 if (!ts_data->properties)
1993 return 0;
1994
1995 error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
1996 if (error)
1997 pr_err("%s: failed to register i2c bus notifier: %d\n",
1998 __func__, error);
1999
2000 return error;
2001 }
2002
2003 /*
2004 * We are registering out notifier after i2c core is initialized and i2c bus
2005 * itself is ready (which happens at postcore initcall level), but before
2006 * ACPI starts enumerating devices (at subsys initcall level).
2007 */
2008 arch_initcall(ts_dmi_init);
2009