blob: 93177e6e5ecde34398f41ba41ed50b735e245a1b [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001// SPDX-License-Identifier: GPL-2.0-or-later
Hans de Goedecef9dd82017-01-23 18:35:30 +01002/*
Hans de Goede74421782018-06-08 23:45:58 +02003 * Touchscreen driver DMI based configuration code
Hans de Goedecef9dd82017-01-23 18:35:30 +01004 *
5 * Copyright (c) 2017 Red Hat Inc.
6 *
Hans de Goedecef9dd82017-01-23 18:35:30 +01007 * 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/i2c.h>
15#include <linux/notifier.h>
16#include <linux/property.h>
17#include <linux/string.h>
18
Hans de Goede74421782018-06-08 23:45:58 +020019struct ts_dmi_data {
Hans de Goedecef9dd82017-01-23 18:35:30 +010020 const char *acpi_name;
Hans de Goedeae311152017-03-22 16:55:53 +010021 const struct property_entry *properties;
Hans de Goedecef9dd82017-01-23 18:35:30 +010022};
23
Hans de Goede6a655a02018-06-08 23:45:56 +020024/* NOTE: Please keep all entries sorted alphabetically */
25
26static const struct property_entry chuwi_hi8_props[] = {
27 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
28 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
29 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
30 PROPERTY_ENTRY_BOOL("silead,home-button"),
31 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi8.fw"),
32 { }
33};
34
Hans de Goede74421782018-06-08 23:45:58 +020035static const struct ts_dmi_data chuwi_hi8_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +020036 .acpi_name = "MSSL0001:00",
37 .properties = chuwi_hi8_props,
38};
39
Kai Renzigbbb97d72019-02-03 19:34:23 +010040static const struct property_entry chuwi_hi8_air_props[] = {
41 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
42 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
43 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
44 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-hi8-air.fw"),
45 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
46 { }
47};
48
49static const struct ts_dmi_data chuwi_hi8_air_data = {
50 .acpi_name = "MSSL1680:00",
51 .properties = chuwi_hi8_air_props,
52};
53
Hans de Goede6a655a02018-06-08 23:45:56 +020054static const struct property_entry chuwi_hi8_pro_props[] = {
Hans de Goede41049162018-10-20 12:21:00 +020055 PROPERTY_ENTRY_U32("touchscreen-min-x", 6),
56 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
Hans de Goede6a655a02018-06-08 23:45:56 +020057 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
58 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
59 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
60 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-hi8-pro.fw"),
Hans de Goede41049162018-10-20 12:21:00 +020061 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
Hans de Goede6a655a02018-06-08 23:45:56 +020062 PROPERTY_ENTRY_BOOL("silead,home-button"),
63 { }
64};
65
Hans de Goede74421782018-06-08 23:45:58 +020066static const struct ts_dmi_data chuwi_hi8_pro_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +020067 .acpi_name = "MSSL1680:00",
68 .properties = chuwi_hi8_pro_props,
69};
70
Christian Oderb98dc492019-03-03 14:47:27 +010071static const struct property_entry chuwi_hi10_air_props[] = {
72 PROPERTY_ENTRY_U32("touchscreen-size-x", 1981),
73 PROPERTY_ENTRY_U32("touchscreen-size-y", 1271),
74 PROPERTY_ENTRY_U32("touchscreen-min-x", 99),
75 PROPERTY_ENTRY_U32("touchscreen-min-y", 9),
76 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
77 PROPERTY_ENTRY_U32("touchscreen-fuzz-x", 5),
78 PROPERTY_ENTRY_U32("touchscreen-fuzz-y", 4),
79 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10-air.fw"),
80 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
81 PROPERTY_ENTRY_BOOL("silead,home-button"),
82 { }
83};
84
85static const struct ts_dmi_data chuwi_hi10_air_data = {
86 .acpi_name = "MSSL1680:00",
87 .properties = chuwi_hi10_air_props,
88};
89
Daniel Smith6baac532019-05-24 02:09:13 +070090static const struct property_entry chuwi_hi10_plus_props[] = {
91 PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
92 PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
93 PROPERTY_ENTRY_U32("touchscreen-size-x", 1914),
94 PROPERTY_ENTRY_U32("touchscreen-size-y", 1283),
95 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10plus.fw"),
96 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
97 PROPERTY_ENTRY_BOOL("silead,home-button"),
98 { }
99};
100
101static const struct ts_dmi_data chuwi_hi10_plus_data = {
102 .acpi_name = "MSSL0017:00",
103 .properties = chuwi_hi10_plus_props,
104};
105
Hans de Goede6a655a02018-06-08 23:45:56 +0200106static const struct property_entry chuwi_vi8_props[] = {
Hans de Goede41049162018-10-20 12:21:00 +0200107 PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
108 PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
Hans de Goede6a655a02018-06-08 23:45:56 +0200109 PROPERTY_ENTRY_U32("touchscreen-size-x", 1724),
110 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
111 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
112 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-vi8.fw"),
113 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
114 PROPERTY_ENTRY_BOOL("silead,home-button"),
115 { }
116};
117
Hans de Goede74421782018-06-08 23:45:58 +0200118static const struct ts_dmi_data chuwi_vi8_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200119 .acpi_name = "MSSL1680:00",
120 .properties = chuwi_vi8_props,
121};
122
Hans de Goedeb4c86812018-06-08 23:45:57 +0200123static const struct property_entry chuwi_vi10_props[] = {
124 PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
125 PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
126 PROPERTY_ENTRY_U32("touchscreen-size-x", 1858),
127 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
128 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-vi10.fw"),
129 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
130 PROPERTY_ENTRY_BOOL("silead,home-button"),
131 { }
132};
133
Hans de Goede74421782018-06-08 23:45:58 +0200134static const struct ts_dmi_data chuwi_vi10_data = {
Hans de Goedeb4c86812018-06-08 23:45:57 +0200135 .acpi_name = "MSSL0002:00",
136 .properties = chuwi_vi10_props,
137};
138
Giang Lea0c80972019-08-03 21:12:22 +0700139static const struct property_entry chuwi_surbook_mini_props[] = {
140 PROPERTY_ENTRY_U32("touchscreen-min-x", 88),
141 PROPERTY_ENTRY_U32("touchscreen-min-y", 13),
142 PROPERTY_ENTRY_U32("touchscreen-size-x", 2040),
143 PROPERTY_ENTRY_U32("touchscreen-size-y", 1524),
144 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-surbook-mini.fw"),
145 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
146 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
147 { }
148};
149
150static const struct ts_dmi_data chuwi_surbook_mini_data = {
151 .acpi_name = "MSSL1680:00",
152 .properties = chuwi_surbook_mini_props,
153};
154
Hans de Goedec72d95e2018-07-01 11:32:56 +0200155static const struct property_entry connect_tablet9_props[] = {
156 PROPERTY_ENTRY_U32("touchscreen-min-x", 9),
Hans de Goede41049162018-10-20 12:21:00 +0200157 PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
Hans de Goedec72d95e2018-07-01 11:32:56 +0200158 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
Hans de Goede41049162018-10-20 12:21:00 +0200159 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
Hans de Goedec72d95e2018-07-01 11:32:56 +0200160 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
161 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
162 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-connect-tablet9.fw"),
163 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
164 { }
165};
166
167static const struct ts_dmi_data connect_tablet9_data = {
168 .acpi_name = "MSSL1680:00",
169 .properties = connect_tablet9_props,
170};
171
Hans de Goedeae311152017-03-22 16:55:53 +0100172static const struct property_entry cube_iwork8_air_props[] = {
Hans de Goede41049162018-10-20 12:21:00 +0200173 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
174 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
175 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
176 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
Hans de Goedecef9dd82017-01-23 18:35:30 +0100177 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
178 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-cube-iwork8-air.fw"),
179 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
180 { }
181};
182
Hans de Goede74421782018-06-08 23:45:58 +0200183static const struct ts_dmi_data cube_iwork8_air_data = {
Hans de Goedecef9dd82017-01-23 18:35:30 +0100184 .acpi_name = "MSSL1680:00",
185 .properties = cube_iwork8_air_props,
186};
187
youling257cda59152018-07-31 17:32:56 +0800188static const struct property_entry cube_knote_i1101_props[] = {
189 PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
190 PROPERTY_ENTRY_U32("touchscreen-min-y", 22),
191 PROPERTY_ENTRY_U32("touchscreen-size-x", 1961),
192 PROPERTY_ENTRY_U32("touchscreen-size-y", 1513),
193 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-cube-knote-i1101.fw"),
194 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
195 PROPERTY_ENTRY_BOOL("silead,home-button"),
196 { }
197};
198
199static const struct ts_dmi_data cube_knote_i1101_data = {
200 .acpi_name = "MSSL1680:00",
201 .properties = cube_knote_i1101_props,
202};
203
Hans de Goede6b8e7d82017-03-22 16:55:54 +0100204static const struct property_entry dexp_ursus_7w_props[] = {
205 PROPERTY_ENTRY_U32("touchscreen-size-x", 890),
206 PROPERTY_ENTRY_U32("touchscreen-size-y", 630),
207 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-dexp-ursus-7w.fw"),
208 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
Hans de Goedeaaa40962017-10-19 09:17:28 +0200209 PROPERTY_ENTRY_BOOL("silead,home-button"),
Hans de Goede6b8e7d82017-03-22 16:55:54 +0100210 { }
211};
212
Hans de Goede74421782018-06-08 23:45:58 +0200213static const struct ts_dmi_data dexp_ursus_7w_data = {
Hans de Goede6b8e7d82017-03-22 16:55:54 +0100214 .acpi_name = "MSSL1680:00",
215 .properties = dexp_ursus_7w_props,
216};
217
Hans de Goede6a655a02018-06-08 23:45:56 +0200218static const struct property_entry digma_citi_e200_props[] = {
219 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
220 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
221 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200222 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-digma_citi_e200.fw"),
Hans de Goede5b7bb3a2017-04-09 11:07:44 +0200223 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
Hans de Goedeaaa40962017-10-19 09:17:28 +0200224 PROPERTY_ENTRY_BOOL("silead,home-button"),
Hans de Goede5b7bb3a2017-04-09 11:07:44 +0200225 { }
226};
227
Hans de Goede74421782018-06-08 23:45:58 +0200228static const struct ts_dmi_data digma_citi_e200_data = {
Hans de Goede5b7bb3a2017-04-09 11:07:44 +0200229 .acpi_name = "MSSL1680:00",
Hans de Goede6a655a02018-06-08 23:45:56 +0200230 .properties = digma_citi_e200_props,
Hans de Goede5b7bb3a2017-04-09 11:07:44 +0200231};
232
Hans de Goeded9ca30b2017-05-07 14:35:15 +0200233static const struct property_entry gp_electronic_t701_props[] = {
234 PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
235 PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
Hans de Goede5c24c052017-10-19 09:44:14 +0200236 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
237 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200238 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-gp-electronic-t701.fw"),
Hans de Goeded9ca30b2017-05-07 14:35:15 +0200239 { }
240};
241
Hans de Goede74421782018-06-08 23:45:58 +0200242static const struct ts_dmi_data gp_electronic_t701_data = {
Hans de Goeded9ca30b2017-05-07 14:35:15 +0200243 .acpi_name = "MSSL1680:00",
244 .properties = gp_electronic_t701_props,
245};
246
Hans de Goedef078d052019-08-04 15:40:23 +0200247static const struct property_entry irbis_tw90_props[] = {
248 PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
249 PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
250 PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
251 PROPERTY_ENTRY_U32("touchscreen-min-y", 14),
252 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
253 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
254 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-irbis_tw90.fw"),
255 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
256 PROPERTY_ENTRY_BOOL("silead,home-button"),
257 { }
258};
259
260static const struct ts_dmi_data irbis_tw90_data = {
261 .acpi_name = "MSSL1680:00",
262 .properties = irbis_tw90_props,
263};
264
Hans de Goede6a655a02018-06-08 23:45:56 +0200265static const struct property_entry itworks_tw891_props[] = {
Hans de Goede41049162018-10-20 12:21:00 +0200266 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
267 PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
Hans de Goede6a655a02018-06-08 23:45:56 +0200268 PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
Hans de Goede41049162018-10-20 12:21:00 +0200269 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
Hans de Goede6a655a02018-06-08 23:45:56 +0200270 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
271 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
272 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
Hans de Goede41049162018-10-20 12:21:00 +0200273 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
Hans de Goede6a655a02018-06-08 23:45:56 +0200274 { }
275};
276
Hans de Goede74421782018-06-08 23:45:58 +0200277static const struct ts_dmi_data itworks_tw891_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200278 .acpi_name = "MSSL1680:00",
279 .properties = itworks_tw891_props,
280};
281
282static const struct property_entry jumper_ezpad_6_pro_props[] = {
283 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
284 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
285 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"),
286 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
287 PROPERTY_ENTRY_BOOL("silead,home-button"),
288 { }
289};
290
Hans de Goede74421782018-06-08 23:45:58 +0200291static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200292 .acpi_name = "MSSL1680:00",
293 .properties = jumper_ezpad_6_pro_props,
294};
295
Benjamin Renz504a4352019-04-29 17:46:57 +0200296static const struct property_entry jumper_ezpad_6_pro_b_props[] = {
297 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
298 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
299 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro-b.fw"),
300 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
301 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
302 PROPERTY_ENTRY_BOOL("silead,home-button"),
303 { }
304};
305
306static const struct ts_dmi_data jumper_ezpad_6_pro_b_data = {
307 .acpi_name = "MSSL1680:00",
308 .properties = jumper_ezpad_6_pro_b_props,
309};
310
Hans de Goedeee7b0d32019-11-12 15:17:11 +0100311static const struct property_entry jumper_ezpad_6_m4_props[] = {
312 PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
313 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
314 PROPERTY_ENTRY_U32("touchscreen-size-x", 1950),
315 PROPERTY_ENTRY_U32("touchscreen-size-y", 1525),
316 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-m4.fw"),
317 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
318 PROPERTY_ENTRY_BOOL("silead,home-button"),
319 { }
320};
321
322static const struct ts_dmi_data jumper_ezpad_6_m4_data = {
323 .acpi_name = "MSSL1680:00",
324 .properties = jumper_ezpad_6_m4_props,
325};
326
Hans de Goede6a655a02018-06-08 23:45:56 +0200327static const struct property_entry jumper_ezpad_mini3_props[] = {
Hans de Goede41049162018-10-20 12:21:00 +0200328 PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
329 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
Hans de Goede6a655a02018-06-08 23:45:56 +0200330 PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
Hans de Goede41049162018-10-20 12:21:00 +0200331 PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
Hans de Goede6a655a02018-06-08 23:45:56 +0200332 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
333 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
334 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
335 { }
336};
337
Hans de Goede74421782018-06-08 23:45:58 +0200338static const struct ts_dmi_data jumper_ezpad_mini3_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200339 .acpi_name = "MSSL1680:00",
340 .properties = jumper_ezpad_mini3_props,
341};
342
Gabriel Lazare79e74a2019-03-15 15:31:14 +0200343static const struct property_entry myria_my8307_props[] = {
344 PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
345 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
346 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
347 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
348 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
349 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-myria-my8307.fw"),
350 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
351 PROPERTY_ENTRY_BOOL("silead,home-button"),
352 { }
353};
354
355static const struct ts_dmi_data myria_my8307_data = {
356 .acpi_name = "MSSL1680:00",
357 .properties = myria_my8307_props,
358};
359
Hans de Goede6a655a02018-06-08 23:45:56 +0200360static const struct property_entry onda_obook_20_plus_props[] = {
361 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
362 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
363 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
364 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
365 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
366 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
367 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
368 PROPERTY_ENTRY_BOOL("silead,home-button"),
369 { }
370};
371
Hans de Goede74421782018-06-08 23:45:58 +0200372static const struct ts_dmi_data onda_obook_20_plus_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200373 .acpi_name = "MSSL1680:00",
374 .properties = onda_obook_20_plus_props,
375};
376
Hans de Goede01b6b7e2018-10-10 15:16:40 +0200377static const struct property_entry onda_v80_plus_v3_props[] = {
378 PROPERTY_ENTRY_U32("touchscreen-min-x", 22),
379 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
380 PROPERTY_ENTRY_U32("touchscreen-size-x", 1698),
381 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
382 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200383 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v80-plus-v3.fw"),
Hans de Goede01b6b7e2018-10-10 15:16:40 +0200384 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
385 PROPERTY_ENTRY_BOOL("silead,home-button"),
386 { }
387};
388
389static const struct ts_dmi_data onda_v80_plus_v3_data = {
390 .acpi_name = "MSSL1680:00",
391 .properties = onda_v80_plus_v3_props,
392};
393
Jun Bo Biee08f572018-07-01 17:47:14 -0400394static const struct property_entry onda_v820w_32g_props[] = {
395 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
396 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
397 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200398 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-onda-v820w-32g.fw"),
Jun Bo Biee08f572018-07-01 17:47:14 -0400399 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
400 PROPERTY_ENTRY_BOOL("silead,home-button"),
401 { }
402};
403
404static const struct ts_dmi_data onda_v820w_32g_data = {
405 .acpi_name = "MSSL1680:00",
406 .properties = onda_v820w_32g_props,
407};
408
Hans de Goede6a655a02018-06-08 23:45:56 +0200409static const struct property_entry onda_v891w_v1_props[] = {
410 PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
411 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
412 PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
413 PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200414 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-onda-v891w-v1.fw"),
Hans de Goede6a655a02018-06-08 23:45:56 +0200415 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
416 PROPERTY_ENTRY_BOOL("silead,home-button"),
417 { }
418};
419
Hans de Goede74421782018-06-08 23:45:58 +0200420static const struct ts_dmi_data onda_v891w_v1_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200421 .acpi_name = "MSSL1680:00",
422 .properties = onda_v891w_v1_props,
423};
424
youling257c0d73082018-06-18 15:11:44 +0200425static const struct property_entry onda_v891w_v3_props[] = {
426 PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
427 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
428 PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
429 PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
430 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200431 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v891w-v3.fw"),
youling257c0d73082018-06-18 15:11:44 +0200432 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
433 PROPERTY_ENTRY_BOOL("silead,home-button"),
434 { }
435};
436
437static const struct ts_dmi_data onda_v891w_v3_data = {
438 .acpi_name = "MSSL1680:00",
439 .properties = onda_v891w_v3_props,
440};
441
Hans de Goede13fadfa2017-06-15 08:48:32 +0200442static const struct property_entry pipo_w2s_props[] = {
443 PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
444 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
445 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
446 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200447 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w2s.fw"),
Hans de Goede13fadfa2017-06-15 08:48:32 +0200448 { }
449};
450
Hans de Goede74421782018-06-08 23:45:58 +0200451static const struct ts_dmi_data pipo_w2s_data = {
Hans de Goede13fadfa2017-06-15 08:48:32 +0200452 .acpi_name = "MSSL1680:00",
453 .properties = pipo_w2s_props,
454};
455
Tim Jostenf95eafb2020-01-03 16:00:59 +0100456static const struct property_entry pipo_w11_props[] = {
457 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
458 PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
459 PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
460 PROPERTY_ENTRY_U32("touchscreen-size-y", 1532),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200461 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w11.fw"),
Tim Jostenf95eafb2020-01-03 16:00:59 +0100462 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
463 PROPERTY_ENTRY_BOOL("silead,home-button"),
464 { }
465};
466
467static const struct ts_dmi_data pipo_w11_data = {
468 .acpi_name = "MSSL1680:00",
469 .properties = pipo_w11_props,
470};
471
Hans de Goede3cd33db2018-05-30 12:43:40 +0200472static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
473 PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
474 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
475 PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
476 PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
477 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200478 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
Hans de Goede3cd33db2018-05-30 12:43:40 +0200479 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
480 PROPERTY_ENTRY_BOOL("silead,home-button"),
481 { }
482};
483
Hans de Goede74421782018-06-08 23:45:58 +0200484static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
Hans de Goede3cd33db2018-05-30 12:43:40 +0200485 .acpi_name = "MSSL1680:00",
486 .properties = pov_mobii_wintab_p800w_v20_props,
487};
488
489static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
Hans de Goede41049162018-10-20 12:21:00 +0200490 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
491 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
492 PROPERTY_ENTRY_U32("touchscreen-size-x", 1794),
493 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
Hans de Goedef4d342c2017-06-15 08:48:31 +0200494 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200495 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p800w.fw"),
Hans de Goede41049162018-10-20 12:21:00 +0200496 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
Hans de Goedeaaa40962017-10-19 09:17:28 +0200497 PROPERTY_ENTRY_BOOL("silead,home-button"),
Hans de Goedef4d342c2017-06-15 08:48:31 +0200498 { }
499};
500
Hans de Goede74421782018-06-08 23:45:58 +0200501static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
Hans de Goedef4d342c2017-06-15 08:48:31 +0200502 .acpi_name = "MSSL1680:00",
Hans de Goede3cd33db2018-05-30 12:43:40 +0200503 .properties = pov_mobii_wintab_p800w_v21_props,
Hans de Goedef4d342c2017-06-15 08:48:31 +0200504};
505
Hans de Goede8335ebc2018-12-20 22:21:50 +0100506static const struct property_entry pov_mobii_wintab_p1006w_v10_props[] = {
507 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
508 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
509 PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
510 PROPERTY_ENTRY_U32("touchscreen-size-y", 1520),
511 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200512 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p1006w-v10.fw"),
Hans de Goede8335ebc2018-12-20 22:21:50 +0100513 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
514 PROPERTY_ENTRY_BOOL("silead,home-button"),
515 { }
516};
517
518static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = {
519 .acpi_name = "MSSL1680:00",
520 .properties = pov_mobii_wintab_p1006w_v10_props,
521};
522
Daniel Gorbea Ainz3caa6f32019-10-23 20:53:23 +0200523static const struct property_entry schneider_sct101ctm_props[] = {
524 PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
525 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
526 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
527 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
528 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200529 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-schneider-sct101ctm.fw"),
Daniel Gorbea Ainz3caa6f32019-10-23 20:53:23 +0200530 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
531 PROPERTY_ENTRY_BOOL("silead,home-button"),
532 { }
533};
534
535static const struct ts_dmi_data schneider_sct101ctm_data = {
536 .acpi_name = "MSSL1680:00",
537 .properties = schneider_sct101ctm_props,
538};
539
Hans de Goede6a655a02018-06-08 23:45:56 +0200540static const struct property_entry teclast_x3_plus_props[] = {
Sergey Tshovrebov3fcf2b22017-10-27 12:27:07 +0200541 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
542 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
Hans de Goede6a655a02018-06-08 23:45:56 +0200543 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"),
Sergey Tshovrebov3fcf2b22017-10-27 12:27:07 +0200544 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
545 PROPERTY_ENTRY_BOOL("silead,home-button"),
546 { }
547};
548
Hans de Goede74421782018-06-08 23:45:58 +0200549static const struct ts_dmi_data teclast_x3_plus_data = {
Sergey Tshovrebov3fcf2b22017-10-27 12:27:07 +0200550 .acpi_name = "MSSL1680:00",
Hans de Goede6a655a02018-06-08 23:45:56 +0200551 .properties = teclast_x3_plus_props,
Hans de Goede2aeb2c32017-12-25 13:45:25 +0100552};
553
Paul Cercueila346aa22018-01-02 19:39:27 +0100554static const struct property_entry teclast_x98plus2_props[] = {
555 PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
556 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
557 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
558 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200559 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-teclast_x98plus2.fw"),
Paul Cercueila346aa22018-01-02 19:39:27 +0100560 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
561 { }
562};
563
Hans de Goede74421782018-06-08 23:45:58 +0200564static const struct ts_dmi_data teclast_x98plus2_data = {
Paul Cercueila346aa22018-01-02 19:39:27 +0100565 .acpi_name = "MSSL1680:00",
566 .properties = teclast_x98plus2_props,
567};
568
Hans de Goedecacad0b2018-10-04 14:34:45 +0200569static const struct property_entry trekstor_primebook_c11_props[] = {
570 PROPERTY_ENTRY_U32("touchscreen-size-x", 1970),
571 PROPERTY_ENTRY_U32("touchscreen-size-y", 1530),
572 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200573 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c11.fw"),
Hans de Goedecacad0b2018-10-04 14:34:45 +0200574 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
575 PROPERTY_ENTRY_BOOL("silead,home-button"),
576 { }
577};
578
579static const struct ts_dmi_data trekstor_primebook_c11_data = {
580 .acpi_name = "MSSL1680:00",
581 .properties = trekstor_primebook_c11_props,
582};
583
Hans de Goede6a655a02018-06-08 23:45:56 +0200584static const struct property_entry trekstor_primebook_c13_props[] = {
585 PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
586 PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200587 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c13.fw"),
Hans de Goedeadf762d2018-05-30 12:43:41 +0200588 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
589 PROPERTY_ENTRY_BOOL("silead,home-button"),
590 { }
591};
592
Hans de Goede74421782018-06-08 23:45:58 +0200593static const struct ts_dmi_data trekstor_primebook_c13_data = {
Hans de Goedeadf762d2018-05-30 12:43:41 +0200594 .acpi_name = "MSSL1680:00",
Hans de Goede6a655a02018-06-08 23:45:56 +0200595 .properties = trekstor_primebook_c13_props,
Hans de Goedeadf762d2018-05-30 12:43:41 +0200596};
597
Marian Cepok30394a82018-10-08 09:25:05 +0200598static const struct property_entry trekstor_primetab_t13b_props[] = {
599 PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
600 PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200601 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primetab-t13b.fw"),
Marian Cepok30394a82018-10-08 09:25:05 +0200602 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
603 PROPERTY_ENTRY_BOOL("silead,home-button"),
604 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
605 { }
606};
607
608static const struct ts_dmi_data trekstor_primetab_t13b_data = {
609 .acpi_name = "MSSL1680:00",
610 .properties = trekstor_primetab_t13b_props,
611};
612
Hans de Goede6a655a02018-06-08 23:45:56 +0200613static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
614 PROPERTY_ENTRY_U32("touchscreen-size-x", 1900),
615 PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
616 PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200617 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-surftab-twin-10-1-st10432-8.fw"),
Hans de Goede6a655a02018-06-08 23:45:56 +0200618 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
619 { }
620};
621
Hans de Goede74421782018-06-08 23:45:58 +0200622static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200623 .acpi_name = "MSSL1680:00",
624 .properties = trekstor_surftab_twin_10_1_props,
625};
626
627static const struct property_entry trekstor_surftab_wintron70_props[] = {
Hans de Goede41049162018-10-20 12:21:00 +0200628 PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
629 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
Hans de Goede6a655a02018-06-08 23:45:56 +0200630 PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
631 PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200632 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-surftab-wintron70-st70416-6.fw"),
Hans de Goede6a655a02018-06-08 23:45:56 +0200633 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
634 PROPERTY_ENTRY_BOOL("silead,home-button"),
635 { }
636};
637
Hans de Goede74421782018-06-08 23:45:58 +0200638static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200639 .acpi_name = "MSSL1680:00",
640 .properties = trekstor_surftab_wintron70_props,
641};
642
643/* NOTE: Please keep this table sorted alphabetically */
Hans de Goede74421782018-06-08 23:45:58 +0200644static const struct dmi_system_id touchscreen_dmi_table[] = {
Hans de Goedecef9dd82017-01-23 18:35:30 +0100645 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200646 /* Chuwi Hi8 */
647 .driver_data = (void *)&chuwi_hi8_data,
648 .matches = {
649 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
650 DMI_MATCH(DMI_PRODUCT_NAME, "S806"),
651 },
652 },
653 {
654 /* Chuwi Hi8 (H1D_S806_206) */
655 .driver_data = (void *)&chuwi_hi8_data,
656 .matches = {
657 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
658 DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
659 DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"),
660 },
661 },
662 {
Kai Renzigbbb97d72019-02-03 19:34:23 +0100663 /* Chuwi Hi8 Air (CWI543) */
664 .driver_data = (void *)&chuwi_hi8_air_data,
665 .matches = {
666 DMI_MATCH(DMI_BOARD_VENDOR, "Default string"),
667 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
668 DMI_MATCH(DMI_PRODUCT_NAME, "Hi8 Air"),
669 },
670 },
671 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200672 /* Chuwi Hi8 Pro (CWI513) */
673 .driver_data = (void *)&chuwi_hi8_pro_data,
674 .matches = {
675 DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
676 DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
677 },
678 },
679 {
Christian Oderb98dc492019-03-03 14:47:27 +0100680 /* Chuwi Hi10 Air */
681 .driver_data = (void *)&chuwi_hi10_air_data,
682 .matches = {
Christian Oder6d789e62019-06-12 14:40:53 +0200683 DMI_MATCH(DMI_SYS_VENDOR, "CHUWI INNOVATION AND TECHNOLOGY(SHENZHEN)CO.LTD"),
684 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
Christian Oderb98dc492019-03-03 14:47:27 +0100685 DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"),
686 },
687 },
688 {
Daniel Smith6baac532019-05-24 02:09:13 +0700689 /* Chuwi Hi10 Plus (CWI527) */
690 .driver_data = (void *)&chuwi_hi10_plus_data,
691 .matches = {
692 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
693 DMI_MATCH(DMI_PRODUCT_NAME, "Hi10 plus tablet"),
694 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
695 },
696 },
697 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200698 /* Chuwi Vi8 (CWI506) */
699 .driver_data = (void *)&chuwi_vi8_data,
700 .matches = {
701 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
702 DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
703 DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
704 },
705 },
706 {
Hans de Goedeb4c86812018-06-08 23:45:57 +0200707 /* Chuwi Vi10 (CWI505) */
708 .driver_data = (void *)&chuwi_vi10_data,
709 .matches = {
710 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
711 DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"),
712 DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
713 DMI_MATCH(DMI_PRODUCT_NAME, "S165"),
714 },
715 },
716 {
Giang Lea0c80972019-08-03 21:12:22 +0700717 /* Chuwi Surbook Mini (CWI540) */
718 .driver_data = (void *)&chuwi_surbook_mini_data,
719 .matches = {
720 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
721 DMI_MATCH(DMI_PRODUCT_NAME, "C3W6_AP108_4G"),
722 },
723 },
724 {
Hans de Goedec72d95e2018-07-01 11:32:56 +0200725 /* Connect Tablet 9 */
726 .driver_data = (void *)&connect_tablet9_data,
727 .matches = {
728 DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
729 DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
730 },
731 },
732 {
Hans de Goedecef9dd82017-01-23 18:35:30 +0100733 /* CUBE iwork8 Air */
734 .driver_data = (void *)&cube_iwork8_air_data,
735 .matches = {
736 DMI_MATCH(DMI_SYS_VENDOR, "cube"),
737 DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"),
738 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
739 },
740 },
741 {
youling257cda59152018-07-31 17:32:56 +0800742 /* Cube KNote i1101 */
743 .driver_data = (void *)&cube_knote_i1101_data,
744 .matches = {
745 DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
746 DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"),
747 DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"),
748 DMI_MATCH(DMI_PRODUCT_NAME, "i1101"),
749 },
750 },
751 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200752 /* DEXP Ursus 7W */
753 .driver_data = (void *)&dexp_ursus_7w_data,
Hans de Goedecef9dd82017-01-23 18:35:30 +0100754 .matches = {
755 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
Hans de Goede6a655a02018-06-08 23:45:56 +0200756 DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
757 },
758 },
759 {
760 /* Digma Citi E200 */
761 .driver_data = (void *)&digma_citi_e200_data,
762 .matches = {
763 DMI_MATCH(DMI_SYS_VENDOR, "Digma"),
764 DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"),
765 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
766 },
767 },
768 {
769 /* GP-electronic T701 */
770 .driver_data = (void *)&gp_electronic_t701_data,
771 .matches = {
772 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
773 DMI_MATCH(DMI_PRODUCT_NAME, "T701"),
774 DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"),
775 },
776 },
777 {
778 /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
779 .driver_data = (void *)&trekstor_surftab_wintron70_data,
780 .matches = {
781 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
782 DMI_MATCH(DMI_PRODUCT_NAME, "i71c"),
783 DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"),
784 },
785 },
786 {
Hans de Goedef078d052019-08-04 15:40:23 +0200787 /* Irbis TW90 */
788 .driver_data = (void *)&irbis_tw90_data,
789 .matches = {
790 DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"),
791 DMI_MATCH(DMI_PRODUCT_NAME, "TW90"),
792 },
793 },
794 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200795 /* I.T.Works TW891 */
796 .driver_data = (void *)&itworks_tw891_data,
797 .matches = {
798 DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
799 DMI_MATCH(DMI_PRODUCT_NAME, "TW891"),
Hans de Goedecef9dd82017-01-23 18:35:30 +0100800 },
801 },
Hans de Goede6b8e7d82017-03-22 16:55:54 +0100802 {
Hans de Goede828615f2018-05-30 12:43:39 +0200803 /* Jumper EZpad 6 Pro */
804 .driver_data = (void *)&jumper_ezpad_6_pro_data,
805 .matches = {
806 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
807 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
808 DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
809 /* Above matches are too generic, add bios-date match */
810 DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"),
811 },
812 },
813 {
Benjamin Renz504a4352019-04-29 17:46:57 +0200814 /* Jumper EZpad 6 Pro B */
815 .driver_data = (void *)&jumper_ezpad_6_pro_b_data,
816 .matches = {
817 DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
818 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
819 DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
820 /* Above matches are too generic, add bios-date match */
821 DMI_MATCH(DMI_BIOS_DATE, "04/24/2018"),
822 },
823 },
824 {
Hans de Goedeee7b0d32019-11-12 15:17:11 +0100825 /* Jumper EZpad 6 m4 */
826 .driver_data = (void *)&jumper_ezpad_6_m4_data,
827 .matches = {
828 DMI_MATCH(DMI_SYS_VENDOR, "jumper"),
829 DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
830 /* Jumper8.S106x.A00C.1066 with the version dropped */
831 DMI_MATCH(DMI_BIOS_VERSION, "Jumper8.S106x"),
832 },
833 },
834 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200835 /* Jumper EZpad mini3 */
836 .driver_data = (void *)&jumper_ezpad_mini3_data,
Hans de Goede6b8e7d82017-03-22 16:55:54 +0100837 .matches = {
838 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
Hans de Goede6a655a02018-06-08 23:45:56 +0200839 /* jumperx.T87.KFBNEEA02 with the version-nr dropped */
840 DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
841 },
842 },
843 {
Hans de Goedef25b6302018-12-04 10:20:04 +0100844 /* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */
845 .driver_data = (void *)&trekstor_primebook_c11_data,
846 .matches = {
847 DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"),
848 DMI_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"),
849 },
850 },
851 {
Gabriel Lazare79e74a2019-03-15 15:31:14 +0200852 /* Myria MY8307 */
853 .driver_data = (void *)&myria_my8307_data,
854 .matches = {
855 DMI_MATCH(DMI_SYS_VENDOR, "Complet Electro Serv"),
856 DMI_MATCH(DMI_PRODUCT_NAME, "MY8307"),
857 },
858 },
859 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200860 /* Onda oBook 20 Plus */
861 .driver_data = (void *)&onda_obook_20_plus_data,
862 .matches = {
863 DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
864 DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
865 },
866 },
867 {
Hans de Goede01b6b7e2018-10-10 15:16:40 +0200868 /* ONDA V80 plus v3 (P80PSBG9V3A01501) */
869 .driver_data = (void *)&onda_v80_plus_v3_data,
870 .matches = {
871 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONDA"),
872 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V80 PLUS")
873 },
874 },
875 {
Jun Bo Biee08f572018-07-01 17:47:14 -0400876 /* ONDA V820w DualOS */
877 .driver_data = (void *)&onda_v820w_32g_data,
878 .matches = {
879 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
880 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS")
881 },
882 },
883 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200884 /* ONDA V891w revision P891WBEBV1B00 aka v1 */
885 .driver_data = (void *)&onda_v891w_v1_data,
886 .matches = {
887 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
888 DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"),
889 DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"),
890 /* Exact match, different versions need different fw */
891 DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
892 },
893 },
894 {
youling257c0d73082018-06-18 15:11:44 +0200895 /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
896 .driver_data = (void *)&onda_v891w_v3_data,
897 .matches = {
898 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
899 DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
900 DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
901 },
902 },
903 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200904 /* Pipo W2S */
905 .driver_data = (void *)&pipo_w2s_data,
906 .matches = {
907 DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
908 DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
909 },
910 },
911 {
Tim Jostenf95eafb2020-01-03 16:00:59 +0100912 /* Pipo W11 */
913 .driver_data = (void *)&pipo_w11_data,
914 .matches = {
915 DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
916 DMI_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."),
917 /* Above matches are too generic, add bios-ver match */
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200918 DMI_MATCH(DMI_BIOS_VERSION, "JS-BI-10.6-SF133GR300-GA55B-024-F"),
Tim Jostenf95eafb2020-01-03 16:00:59 +0100919 },
920 },
921 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200922 /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
923 .driver_data = (void *)&trekstor_surftab_wintron70_data,
924 .matches = {
925 DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"),
926 DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"),
927 /* Exact match, different versions need different fw */
928 DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"),
929 },
930 },
931 {
932 /* Point of View mobii wintab p800w (v2.0) */
933 .driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
934 .matches = {
935 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
936 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
937 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"),
938 /* Above matches are too generic, add bios-date match */
939 DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
940 },
941 },
942 {
943 /* Point of View mobii wintab p800w (v2.1) */
944 .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
945 .matches = {
946 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
947 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
948 DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"),
949 /* Above matches are too generic, add bios-date match */
950 DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"),
951 },
952 },
953 {
Hans de Goede8335ebc2018-12-20 22:21:50 +0100954 /* Point of View mobii wintab p1006w (v1.0) */
955 .driver_data = (void *)&pov_mobii_wintab_p1006w_v10_data,
956 .matches = {
957 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
958 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
959 /* Note 105b is Foxcon's USB/PCI vendor id */
960 DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"),
961 DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
962 },
963 },
964 {
Daniel Gorbea Ainz3caa6f32019-10-23 20:53:23 +0200965 /* Schneider SCT101CTM */
966 .driver_data = (void *)&schneider_sct101ctm_data,
967 .matches = {
968 DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
969 DMI_MATCH(DMI_PRODUCT_NAME, "SCT101CTM"),
970 },
971 },
972 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200973 /* Teclast X3 Plus */
974 .driver_data = (void *)&teclast_x3_plus_data,
975 .matches = {
976 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
977 DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
978 DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
979 },
980 },
981 {
982 /* Teclast X98 Plus II */
983 .driver_data = (void *)&teclast_x98plus2_data,
984 .matches = {
985 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
986 DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
987 },
988 },
989 {
Hans de Goedecacad0b2018-10-04 14:34:45 +0200990 /* Trekstor Primebook C11 */
991 .driver_data = (void *)&trekstor_primebook_c11_data,
992 .matches = {
993 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
994 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"),
995 },
996 },
997 {
Hans de Goede37d960a2019-08-18 13:04:51 +0200998 /* Trekstor Primebook C11B (same touchscreen as the C11) */
999 .driver_data = (void *)&trekstor_primebook_c11_data,
1000 .matches = {
1001 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1002 DMI_MATCH(DMI_PRODUCT_NAME, "PRIMEBOOK C11B"),
1003 },
1004 },
1005 {
Hans de Goede6a655a02018-06-08 23:45:56 +02001006 /* Trekstor Primebook C13 */
1007 .driver_data = (void *)&trekstor_primebook_c13_data,
1008 .matches = {
1009 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1010 DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
Hans de Goede6b8e7d82017-03-22 16:55:54 +01001011 },
1012 },
Hans de Goede5b7bb3a2017-04-09 11:07:44 +02001013 {
Marian Cepok30394a82018-10-08 09:25:05 +02001014 /* Trekstor Primetab T13B */
1015 .driver_data = (void *)&trekstor_primetab_t13b_data,
1016 .matches = {
1017 DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
1018 DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"),
1019 },
1020 },
1021 {
Bernhard Übelackerf4c12d42017-11-26 19:32:58 +01001022 /* TrekStor SurfTab twin 10.1 ST10432-8 */
Hans de Goeded6b0d7d2018-06-08 23:45:55 +02001023 .driver_data = (void *)&trekstor_surftab_twin_10_1_data,
Bernhard Übelackerf4c12d42017-11-26 19:32:58 +01001024 .matches = {
1025 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1026 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
1027 },
1028 },
1029 {
Hans de Goede5b7bb3a2017-04-09 11:07:44 +02001030 /* Trekstor Surftab Wintron 7.0 ST70416-6 */
Hans de Goeded6b0d7d2018-06-08 23:45:55 +02001031 .driver_data = (void *)&trekstor_surftab_wintron70_data,
Hans de Goede5b7bb3a2017-04-09 11:07:44 +02001032 .matches = {
1033 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1034 DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"),
1035 /* Exact match, different versions need different fw */
1036 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"),
1037 },
1038 },
Hans de Goeded9ca30b2017-05-07 14:35:15 +02001039 {
Hans de Goede4245c152018-01-16 20:24:15 +01001040 /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
Hans de Goeded6b0d7d2018-06-08 23:45:55 +02001041 .driver_data = (void *)&trekstor_surftab_wintron70_data,
Hans de Goede4245c152018-01-16 20:24:15 +01001042 .matches = {
1043 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +02001044 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab wintron 7.0 ST70416-6"),
Hans de Goede4245c152018-01-16 20:24:15 +01001045 /* Exact match, different versions need different fw */
1046 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
1047 },
1048 },
1049 {
Hans de Goede24e2bb32018-03-09 15:03:58 +01001050 /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
1051 .driver_data = (void *)&chuwi_vi8_data,
1052 .matches = {
1053 DMI_MATCH(DMI_SYS_VENDOR, "YOURS"),
1054 DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"),
1055 },
1056 },
Hans de Goedecef9dd82017-01-23 18:35:30 +01001057 { },
1058};
1059
Hans de Goede74421782018-06-08 23:45:58 +02001060static const struct ts_dmi_data *ts_data;
Dmitry Torokhovf22265b2017-04-03 20:25:14 -07001061
Hans de Goede74421782018-06-08 23:45:58 +02001062static void ts_dmi_add_props(struct i2c_client *client)
Hans de Goedecef9dd82017-01-23 18:35:30 +01001063{
Dmitry Torokhove1053962017-04-03 20:25:13 -07001064 struct device *dev = &client->dev;
Hans de Goedecef9dd82017-01-23 18:35:30 +01001065 int error;
1066
Hans de Goedecef9dd82017-01-23 18:35:30 +01001067 if (has_acpi_companion(dev) &&
Hans de Goede74421782018-06-08 23:45:58 +02001068 !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
1069 error = device_add_properties(dev, ts_data->properties);
Hans de Goedecef9dd82017-01-23 18:35:30 +01001070 if (error)
1071 dev_err(dev, "failed to add properties: %d\n", error);
1072 }
1073}
1074
Hans de Goede74421782018-06-08 23:45:58 +02001075static int ts_dmi_notifier_call(struct notifier_block *nb,
Andy Shevchenkodf532c12020-01-09 17:34:05 +02001076 unsigned long action, void *data)
Hans de Goedecef9dd82017-01-23 18:35:30 +01001077{
1078 struct device *dev = data;
Dmitry Torokhove1053962017-04-03 20:25:13 -07001079 struct i2c_client *client;
Hans de Goedecef9dd82017-01-23 18:35:30 +01001080
1081 switch (action) {
1082 case BUS_NOTIFY_ADD_DEVICE:
Dmitry Torokhove1053962017-04-03 20:25:13 -07001083 client = i2c_verify_client(dev);
1084 if (client)
Hans de Goede74421782018-06-08 23:45:58 +02001085 ts_dmi_add_props(client);
Hans de Goedecef9dd82017-01-23 18:35:30 +01001086 break;
1087
1088 default:
1089 break;
1090 }
1091
1092 return 0;
1093}
1094
Hans de Goede74421782018-06-08 23:45:58 +02001095static struct notifier_block ts_dmi_notifier = {
1096 .notifier_call = ts_dmi_notifier_call,
Hans de Goedecef9dd82017-01-23 18:35:30 +01001097};
1098
Hans de Goede74421782018-06-08 23:45:58 +02001099static int __init ts_dmi_init(void)
Hans de Goedecef9dd82017-01-23 18:35:30 +01001100{
Dmitry Torokhovf22265b2017-04-03 20:25:14 -07001101 const struct dmi_system_id *dmi_id;
Hans de Goedecef9dd82017-01-23 18:35:30 +01001102 int error;
1103
Hans de Goede74421782018-06-08 23:45:58 +02001104 dmi_id = dmi_first_match(touchscreen_dmi_table);
Dmitry Torokhovf22265b2017-04-03 20:25:14 -07001105 if (!dmi_id)
1106 return 0; /* Not an error */
1107
Hans de Goede74421782018-06-08 23:45:58 +02001108 ts_data = dmi_id->driver_data;
Dmitry Torokhovf22265b2017-04-03 20:25:14 -07001109
Hans de Goede74421782018-06-08 23:45:58 +02001110 error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
Hans de Goedecef9dd82017-01-23 18:35:30 +01001111 if (error)
1112 pr_err("%s: failed to register i2c bus notifier: %d\n",
1113 __func__, error);
1114
1115 return error;
1116}
1117
1118/*
1119 * We are registering out notifier after i2c core is initialized and i2c bus
1120 * itself is ready (which happens at postcore initcall level), but before
1121 * ACPI starts enumerating devices (at subsys initcall level).
1122 */
Hans de Goede74421782018-06-08 23:45:58 +02001123arch_initcall(ts_dmi_init);