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