Commit | Line | Data |
---|---|---|
2874c5fd | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
cef9dd85 | 2 | /* |
74421786 | 3 | * Touchscreen driver DMI based configuration code |
cef9dd85 HG |
4 | * |
5 | * Copyright (c) 2017 Red Hat Inc. | |
6 | * | |
cef9dd85 HG |
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> | |
835e1b86 | 14 | #include <linux/efi_embedded_fw.h> |
cef9dd85 HG |
15 | #include <linux/i2c.h> |
16 | #include <linux/notifier.h> | |
17 | #include <linux/property.h> | |
18 | #include <linux/string.h> | |
19 | ||
74421786 | 20 | struct ts_dmi_data { |
835e1b86 HG |
21 | /* The EFI embedded-fw code expects this to be the first member! */ |
22 | struct efi_embedded_fw_desc embedded_fw; | |
cef9dd85 | 23 | const char *acpi_name; |
ae311158 | 24 | const struct property_entry *properties; |
cef9dd85 HG |
25 | }; |
26 | ||
6a655a0d HG |
27 | /* NOTE: Please keep all entries sorted alphabetically */ |
28 | ||
29 | static const struct property_entry chuwi_hi8_props[] = { | |
30 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1665), | |
31 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1140), | |
cef9dd85 | 32 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
6a655a0d HG |
33 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
34 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi8.fw"), | |
cef9dd85 HG |
35 | { } |
36 | }; | |
37 | ||
74421786 | 38 | static const struct ts_dmi_data chuwi_hi8_data = { |
6a655a0d HG |
39 | .acpi_name = "MSSL0001:00", |
40 | .properties = chuwi_hi8_props, | |
cef9dd85 HG |
41 | }; |
42 | ||
bbb97d72 KR |
43 | static const struct property_entry chuwi_hi8_air_props[] = { |
44 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1728), | |
45 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1148), | |
46 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), | |
47 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-hi8-air.fw"), | |
48 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
49 | { } | |
50 | }; | |
51 | ||
52 | static const struct ts_dmi_data chuwi_hi8_air_data = { | |
53 | .acpi_name = "MSSL1680:00", | |
54 | .properties = chuwi_hi8_air_props, | |
55 | }; | |
56 | ||
6a655a0d | 57 | static const struct property_entry chuwi_hi8_pro_props[] = { |
4104916d HG |
58 | PROPERTY_ENTRY_U32("touchscreen-min-x", 6), |
59 | PROPERTY_ENTRY_U32("touchscreen-min-y", 3), | |
6a655a0d HG |
60 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1728), |
61 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1148), | |
cef9dd85 | 62 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
6a655a0d | 63 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-hi8-pro.fw"), |
4104916d | 64 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
6a655a0d | 65 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
cef9dd85 HG |
66 | { } |
67 | }; | |
68 | ||
74421786 | 69 | static const struct ts_dmi_data chuwi_hi8_pro_data = { |
835e1b86 HG |
70 | .embedded_fw = { |
71 | .name = "silead/gsl3680-chuwi-hi8-pro.fw", | |
72 | .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 }, | |
73 | .length = 39864, | |
74 | .sha256 = { 0xc0, 0x88, 0xc5, 0xef, 0xd1, 0x70, 0x77, 0x59, | |
75 | 0x4e, 0xe9, 0xc4, 0xd8, 0x2e, 0xcd, 0xbf, 0x95, | |
76 | 0x32, 0xd9, 0x03, 0x28, 0x0d, 0x48, 0x9f, 0x92, | |
77 | 0x35, 0x37, 0xf6, 0x8b, 0x2a, 0xe4, 0x73, 0xff }, | |
78 | }, | |
cef9dd85 | 79 | .acpi_name = "MSSL1680:00", |
6a655a0d | 80 | .properties = chuwi_hi8_pro_props, |
cef9dd85 HG |
81 | }; |
82 | ||
b98dc493 CO |
83 | static const struct property_entry chuwi_hi10_air_props[] = { |
84 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1981), | |
85 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1271), | |
86 | PROPERTY_ENTRY_U32("touchscreen-min-x", 99), | |
87 | PROPERTY_ENTRY_U32("touchscreen-min-y", 9), | |
88 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), | |
89 | PROPERTY_ENTRY_U32("touchscreen-fuzz-x", 5), | |
90 | PROPERTY_ENTRY_U32("touchscreen-fuzz-y", 4), | |
91 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10-air.fw"), | |
92 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
93 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
94 | { } | |
95 | }; | |
96 | ||
97 | static const struct ts_dmi_data chuwi_hi10_air_data = { | |
98 | .acpi_name = "MSSL1680:00", | |
99 | .properties = chuwi_hi10_air_props, | |
100 | }; | |
101 | ||
6baac53e DS |
102 | static const struct property_entry chuwi_hi10_plus_props[] = { |
103 | PROPERTY_ENTRY_U32("touchscreen-min-x", 0), | |
104 | PROPERTY_ENTRY_U32("touchscreen-min-y", 5), | |
105 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1914), | |
106 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1283), | |
107 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10plus.fw"), | |
108 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
109 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
110 | { } | |
111 | }; | |
112 | ||
113 | static const struct ts_dmi_data chuwi_hi10_plus_data = { | |
114 | .acpi_name = "MSSL0017:00", | |
115 | .properties = chuwi_hi10_plus_props, | |
116 | }; | |
117 | ||
6a655a0d | 118 | static const struct property_entry chuwi_vi8_props[] = { |
4104916d HG |
119 | PROPERTY_ENTRY_U32("touchscreen-min-x", 4), |
120 | PROPERTY_ENTRY_U32("touchscreen-min-y", 6), | |
6a655a0d HG |
121 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1724), |
122 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1140), | |
123 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), | |
124 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-vi8.fw"), | |
828615f8 HG |
125 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
126 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
127 | { } | |
128 | }; | |
129 | ||
74421786 | 130 | static const struct ts_dmi_data chuwi_vi8_data = { |
6a655a0d HG |
131 | .acpi_name = "MSSL1680:00", |
132 | .properties = chuwi_vi8_props, | |
133 | }; | |
134 | ||
b94b807e HG |
135 | static const struct ts_dmi_data chuwi_vi8_plus_data = { |
136 | .embedded_fw = { | |
137 | .name = "chipone/icn8505-HAMP0002.fw", | |
138 | .prefix = { 0xb0, 0x07, 0x00, 0x00, 0xe4, 0x07, 0x00, 0x00 }, | |
139 | .length = 35012, | |
140 | .sha256 = { 0x93, 0xe5, 0x49, 0xe0, 0xb6, 0xa2, 0xb4, 0xb3, | |
141 | 0x88, 0x96, 0x34, 0x97, 0x5e, 0xa8, 0x13, 0x78, | |
142 | 0x72, 0x98, 0xb8, 0x29, 0xeb, 0x5c, 0xa7, 0xf1, | |
143 | 0x25, 0x13, 0x43, 0xf4, 0x30, 0x7c, 0xfc, 0x7c }, | |
144 | }, | |
145 | }; | |
146 | ||
b4c86811 HG |
147 | static const struct property_entry chuwi_vi10_props[] = { |
148 | PROPERTY_ENTRY_U32("touchscreen-min-x", 0), | |
149 | PROPERTY_ENTRY_U32("touchscreen-min-y", 4), | |
150 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1858), | |
151 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1280), | |
152 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-vi10.fw"), | |
153 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
154 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
155 | { } | |
156 | }; | |
157 | ||
74421786 | 158 | static const struct ts_dmi_data chuwi_vi10_data = { |
b4c86811 HG |
159 | .acpi_name = "MSSL0002:00", |
160 | .properties = chuwi_vi10_props, | |
161 | }; | |
162 | ||
a0c80979 GL |
163 | static const struct property_entry chuwi_surbook_mini_props[] = { |
164 | PROPERTY_ENTRY_U32("touchscreen-min-x", 88), | |
165 | PROPERTY_ENTRY_U32("touchscreen-min-y", 13), | |
166 | PROPERTY_ENTRY_U32("touchscreen-size-x", 2040), | |
167 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1524), | |
168 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-surbook-mini.fw"), | |
169 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
170 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), | |
171 | { } | |
172 | }; | |
173 | ||
174 | static const struct ts_dmi_data chuwi_surbook_mini_data = { | |
175 | .acpi_name = "MSSL1680:00", | |
176 | .properties = chuwi_surbook_mini_props, | |
177 | }; | |
178 | ||
c72d95e5 HG |
179 | static const struct property_entry connect_tablet9_props[] = { |
180 | PROPERTY_ENTRY_U32("touchscreen-min-x", 9), | |
4104916d | 181 | PROPERTY_ENTRY_U32("touchscreen-min-y", 10), |
c72d95e5 | 182 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1664), |
4104916d | 183 | PROPERTY_ENTRY_U32("touchscreen-size-y", 880), |
c72d95e5 HG |
184 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), |
185 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), | |
186 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-connect-tablet9.fw"), | |
187 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
188 | { } | |
189 | }; | |
190 | ||
191 | static const struct ts_dmi_data connect_tablet9_data = { | |
192 | .acpi_name = "MSSL1680:00", | |
193 | .properties = connect_tablet9_props, | |
194 | }; | |
195 | ||
6a655a0d | 196 | static const struct property_entry cube_iwork8_air_props[] = { |
4104916d HG |
197 | PROPERTY_ENTRY_U32("touchscreen-min-x", 1), |
198 | PROPERTY_ENTRY_U32("touchscreen-min-y", 3), | |
199 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1664), | |
200 | PROPERTY_ENTRY_U32("touchscreen-size-y", 896), | |
6a655a0d HG |
201 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
202 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-cube-iwork8-air.fw"), | |
203 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
204 | { } | |
205 | }; | |
206 | ||
74421786 | 207 | static const struct ts_dmi_data cube_iwork8_air_data = { |
835e1b86 HG |
208 | .embedded_fw = { |
209 | .name = "silead/gsl3670-cube-iwork8-air.fw", | |
210 | .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 }, | |
211 | .length = 38808, | |
212 | .sha256 = { 0xff, 0x62, 0x2d, 0xd1, 0x8a, 0x78, 0x04, 0x7b, | |
213 | 0x33, 0x06, 0xb0, 0x4f, 0x7f, 0x02, 0x08, 0x9c, | |
214 | 0x96, 0xd4, 0x9f, 0x04, 0xe1, 0x47, 0x25, 0x25, | |
215 | 0x60, 0x77, 0x41, 0x33, 0xeb, 0x12, 0x82, 0xfc }, | |
216 | }, | |
828615f8 | 217 | .acpi_name = "MSSL1680:00", |
6a655a0d | 218 | .properties = cube_iwork8_air_props, |
828615f8 HG |
219 | }; |
220 | ||
cda5915d | 221 | static const struct property_entry cube_knote_i1101_props[] = { |
222 | PROPERTY_ENTRY_U32("touchscreen-min-x", 20), | |
223 | PROPERTY_ENTRY_U32("touchscreen-min-y", 22), | |
224 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1961), | |
225 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1513), | |
226 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-cube-knote-i1101.fw"), | |
227 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
228 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
229 | { } | |
230 | }; | |
231 | ||
232 | static const struct ts_dmi_data cube_knote_i1101_data = { | |
233 | .acpi_name = "MSSL1680:00", | |
234 | .properties = cube_knote_i1101_props, | |
235 | }; | |
236 | ||
6b8e7d8f HG |
237 | static const struct property_entry dexp_ursus_7w_props[] = { |
238 | PROPERTY_ENTRY_U32("touchscreen-size-x", 890), | |
239 | PROPERTY_ENTRY_U32("touchscreen-size-y", 630), | |
240 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-dexp-ursus-7w.fw"), | |
241 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
aaa40965 | 242 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
6b8e7d8f HG |
243 | { } |
244 | }; | |
245 | ||
74421786 | 246 | static const struct ts_dmi_data dexp_ursus_7w_data = { |
6b8e7d8f HG |
247 | .acpi_name = "MSSL1680:00", |
248 | .properties = dexp_ursus_7w_props, | |
249 | }; | |
250 | ||
6a655a0d HG |
251 | static const struct property_entry digma_citi_e200_props[] = { |
252 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1980), | |
253 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1500), | |
254 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), | |
df532c16 | 255 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-digma_citi_e200.fw"), |
5b7bb3a7 | 256 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
aaa40965 | 257 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
5b7bb3a7 HG |
258 | { } |
259 | }; | |
260 | ||
74421786 | 261 | static const struct ts_dmi_data digma_citi_e200_data = { |
5b7bb3a7 | 262 | .acpi_name = "MSSL1680:00", |
6a655a0d | 263 | .properties = digma_citi_e200_props, |
5b7bb3a7 HG |
264 | }; |
265 | ||
d9ca30b8 HG |
266 | static const struct property_entry gp_electronic_t701_props[] = { |
267 | PROPERTY_ENTRY_U32("touchscreen-size-x", 960), | |
268 | PROPERTY_ENTRY_U32("touchscreen-size-y", 640), | |
5c24c05e HG |
269 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"), |
270 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), | |
df532c16 | 271 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-gp-electronic-t701.fw"), |
d9ca30b8 HG |
272 | { } |
273 | }; | |
274 | ||
74421786 | 275 | static const struct ts_dmi_data gp_electronic_t701_data = { |
d9ca30b8 HG |
276 | .acpi_name = "MSSL1680:00", |
277 | .properties = gp_electronic_t701_props, | |
278 | }; | |
279 | ||
f078d053 HG |
280 | static const struct property_entry irbis_tw90_props[] = { |
281 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1720), | |
282 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1138), | |
283 | PROPERTY_ENTRY_U32("touchscreen-min-x", 8), | |
284 | PROPERTY_ENTRY_U32("touchscreen-min-y", 14), | |
285 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), | |
286 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), | |
287 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-irbis_tw90.fw"), | |
288 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
289 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
290 | { } | |
291 | }; | |
292 | ||
293 | static const struct ts_dmi_data irbis_tw90_data = { | |
294 | .acpi_name = "MSSL1680:00", | |
295 | .properties = irbis_tw90_props, | |
296 | }; | |
297 | ||
6a655a0d | 298 | static const struct property_entry itworks_tw891_props[] = { |
4104916d HG |
299 | PROPERTY_ENTRY_U32("touchscreen-min-x", 1), |
300 | PROPERTY_ENTRY_U32("touchscreen-min-y", 5), | |
6a655a0d | 301 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1600), |
4104916d | 302 | PROPERTY_ENTRY_U32("touchscreen-size-y", 896), |
6a655a0d | 303 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), |
13fadfa7 | 304 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
6a655a0d | 305 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"), |
4104916d | 306 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
13fadfa7 HG |
307 | { } |
308 | }; | |
309 | ||
74421786 | 310 | static const struct ts_dmi_data itworks_tw891_data = { |
13fadfa7 | 311 | .acpi_name = "MSSL1680:00", |
6a655a0d | 312 | .properties = itworks_tw891_props, |
13fadfa7 HG |
313 | }; |
314 | ||
6a655a0d HG |
315 | static const struct property_entry jumper_ezpad_6_pro_props[] = { |
316 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1980), | |
317 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1500), | |
318 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"), | |
3cd33db8 HG |
319 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
320 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
321 | { } | |
322 | }; | |
323 | ||
74421786 | 324 | static const struct ts_dmi_data jumper_ezpad_6_pro_data = { |
3cd33db8 | 325 | .acpi_name = "MSSL1680:00", |
6a655a0d | 326 | .properties = jumper_ezpad_6_pro_props, |
3cd33db8 HG |
327 | }; |
328 | ||
504a4351 BR |
329 | static const struct property_entry jumper_ezpad_6_pro_b_props[] = { |
330 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1980), | |
331 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1500), | |
332 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro-b.fw"), | |
333 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), | |
334 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
335 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
336 | { } | |
337 | }; | |
338 | ||
339 | static const struct ts_dmi_data jumper_ezpad_6_pro_b_data = { | |
340 | .acpi_name = "MSSL1680:00", | |
341 | .properties = jumper_ezpad_6_pro_b_props, | |
342 | }; | |
343 | ||
ee7b0d31 HG |
344 | static const struct property_entry jumper_ezpad_6_m4_props[] = { |
345 | PROPERTY_ENTRY_U32("touchscreen-min-x", 35), | |
346 | PROPERTY_ENTRY_U32("touchscreen-min-y", 15), | |
347 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1950), | |
348 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1525), | |
349 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-m4.fw"), | |
350 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
351 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
352 | { } | |
353 | }; | |
354 | ||
355 | static const struct ts_dmi_data jumper_ezpad_6_m4_data = { | |
356 | .acpi_name = "MSSL1680:00", | |
357 | .properties = jumper_ezpad_6_m4_props, | |
358 | }; | |
359 | ||
6a655a0d | 360 | static const struct property_entry jumper_ezpad_mini3_props[] = { |
4104916d HG |
361 | PROPERTY_ENTRY_U32("touchscreen-min-x", 23), |
362 | PROPERTY_ENTRY_U32("touchscreen-min-y", 16), | |
6a655a0d | 363 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1700), |
4104916d | 364 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1138), |
f4d342cf | 365 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
6a655a0d HG |
366 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"), |
367 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
4edfc540 HG |
368 | { } |
369 | }; | |
370 | ||
74421786 | 371 | static const struct ts_dmi_data jumper_ezpad_mini3_data = { |
4edfc540 | 372 | .acpi_name = "MSSL1680:00", |
6a655a0d | 373 | .properties = jumper_ezpad_mini3_props, |
4edfc540 HG |
374 | }; |
375 | ||
e79e74a5 GL |
376 | static const struct property_entry myria_my8307_props[] = { |
377 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1720), | |
378 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1140), | |
379 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"), | |
380 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), | |
381 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), | |
382 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-myria-my8307.fw"), | |
383 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
384 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
385 | { } | |
386 | }; | |
387 | ||
388 | static const struct ts_dmi_data myria_my8307_data = { | |
389 | .acpi_name = "MSSL1680:00", | |
390 | .properties = myria_my8307_props, | |
391 | }; | |
392 | ||
6a655a0d | 393 | static const struct property_entry onda_obook_20_plus_props[] = { |
485f2a58 HG |
394 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1728), |
395 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1148), | |
6a655a0d HG |
396 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"), |
397 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), | |
485f2a58 | 398 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
6a655a0d HG |
399 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"), |
400 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), | |
aaa40965 | 401 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
485f2a58 HG |
402 | { } |
403 | }; | |
404 | ||
74421786 | 405 | static const struct ts_dmi_data onda_obook_20_plus_data = { |
485f2a58 | 406 | .acpi_name = "MSSL1680:00", |
6a655a0d | 407 | .properties = onda_obook_20_plus_props, |
485f2a58 HG |
408 | }; |
409 | ||
01b6b7e6 HG |
410 | static const struct property_entry onda_v80_plus_v3_props[] = { |
411 | PROPERTY_ENTRY_U32("touchscreen-min-x", 22), | |
412 | PROPERTY_ENTRY_U32("touchscreen-min-y", 15), | |
413 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1698), | |
414 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1140), | |
415 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), | |
df532c16 | 416 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v80-plus-v3.fw"), |
01b6b7e6 HG |
417 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
418 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
419 | { } | |
420 | }; | |
421 | ||
422 | static const struct ts_dmi_data onda_v80_plus_v3_data = { | |
835e1b86 HG |
423 | .embedded_fw = { |
424 | .name = "silead/gsl3676-onda-v80-plus-v3.fw", | |
425 | .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 }, | |
426 | .length = 37224, | |
427 | .sha256 = { 0x8f, 0xbd, 0x8f, 0x0c, 0x6b, 0xba, 0x5b, 0xf5, | |
428 | 0xa3, 0xc7, 0xa3, 0xc0, 0x4f, 0xcd, 0xdf, 0x32, | |
429 | 0xcc, 0xe4, 0x70, 0xd6, 0x46, 0x9c, 0xd7, 0xa7, | |
430 | 0x4b, 0x82, 0x3f, 0xab, 0xc7, 0x90, 0xea, 0x23 }, | |
431 | }, | |
01b6b7e6 HG |
432 | .acpi_name = "MSSL1680:00", |
433 | .properties = onda_v80_plus_v3_props, | |
434 | }; | |
435 | ||
ee08f578 JBB |
436 | static const struct property_entry onda_v820w_32g_props[] = { |
437 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1665), | |
438 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1140), | |
439 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), | |
df532c16 | 440 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-onda-v820w-32g.fw"), |
ee08f578 JBB |
441 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
442 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
443 | { } | |
444 | }; | |
445 | ||
446 | static const struct ts_dmi_data onda_v820w_32g_data = { | |
447 | .acpi_name = "MSSL1680:00", | |
448 | .properties = onda_v820w_32g_props, | |
449 | }; | |
450 | ||
6a655a0d HG |
451 | static const struct property_entry onda_v891w_v1_props[] = { |
452 | PROPERTY_ENTRY_U32("touchscreen-min-x", 46), | |
453 | PROPERTY_ENTRY_U32("touchscreen-min-y", 8), | |
454 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1676), | |
455 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1130), | |
df532c16 | 456 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-onda-v891w-v1.fw"), |
3fcf2b2a ST |
457 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
458 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
459 | { } | |
460 | }; | |
461 | ||
74421786 | 462 | static const struct ts_dmi_data onda_v891w_v1_data = { |
3fcf2b2a | 463 | .acpi_name = "MSSL1680:00", |
6a655a0d | 464 | .properties = onda_v891w_v1_props, |
3fcf2b2a ST |
465 | }; |
466 | ||
c0d73088 | 467 | static const struct property_entry onda_v891w_v3_props[] = { |
468 | PROPERTY_ENTRY_U32("touchscreen-min-x", 35), | |
469 | PROPERTY_ENTRY_U32("touchscreen-min-y", 15), | |
470 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1625), | |
471 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1135), | |
472 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), | |
df532c16 | 473 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v891w-v3.fw"), |
c0d73088 | 474 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
475 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
476 | { } | |
477 | }; | |
478 | ||
479 | static const struct ts_dmi_data onda_v891w_v3_data = { | |
480 | .acpi_name = "MSSL1680:00", | |
481 | .properties = onda_v891w_v3_props, | |
482 | }; | |
483 | ||
6a655a0d HG |
484 | static const struct property_entry pipo_w2s_props[] = { |
485 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1660), | |
486 | PROPERTY_ENTRY_U32("touchscreen-size-y", 880), | |
170e9a53 | 487 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"), |
170e9a53 | 488 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
df532c16 | 489 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w2s.fw"), |
170e9a53 NB |
490 | { } |
491 | }; | |
492 | ||
74421786 | 493 | static const struct ts_dmi_data pipo_w2s_data = { |
835e1b86 HG |
494 | .embedded_fw = { |
495 | .name = "silead/gsl1680-pipo-w2s.fw", | |
496 | .prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 }, | |
497 | .length = 39072, | |
498 | .sha256 = { 0xd0, 0x58, 0xc4, 0x7d, 0x55, 0x2d, 0x62, 0x18, | |
499 | 0xd1, 0x6a, 0x71, 0x73, 0x0b, 0x3f, 0xbe, 0x60, | |
500 | 0xbb, 0x45, 0x8c, 0x52, 0x27, 0xb7, 0x18, 0xf4, | |
501 | 0x31, 0x00, 0x6a, 0x49, 0x76, 0xd8, 0x7c, 0xd3 }, | |
502 | }, | |
170e9a53 | 503 | .acpi_name = "MSSL1680:00", |
6a655a0d | 504 | .properties = pipo_w2s_props, |
170e9a53 NB |
505 | }; |
506 | ||
f95eafbf TJ |
507 | static const struct property_entry pipo_w11_props[] = { |
508 | PROPERTY_ENTRY_U32("touchscreen-min-x", 1), | |
509 | PROPERTY_ENTRY_U32("touchscreen-min-y", 15), | |
510 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1984), | |
511 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1532), | |
df532c16 | 512 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w11.fw"), |
f95eafbf TJ |
513 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
514 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
515 | { } | |
516 | }; | |
517 | ||
518 | static const struct ts_dmi_data pipo_w11_data = { | |
519 | .acpi_name = "MSSL1680:00", | |
520 | .properties = pipo_w11_props, | |
521 | }; | |
522 | ||
6a655a0d HG |
523 | static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = { |
524 | PROPERTY_ENTRY_U32("touchscreen-min-x", 32), | |
525 | PROPERTY_ENTRY_U32("touchscreen-min-y", 16), | |
526 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1692), | |
527 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1146), | |
d2d541e8 | 528 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
df532c16 | 529 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-pov-mobii-wintab-p800w-v20.fw"), |
6a655a0d | 530 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
d2d541e8 | 531 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
d2d541e8 MS |
532 | { } |
533 | }; | |
534 | ||
74421786 | 535 | static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = { |
6a655a0d HG |
536 | .acpi_name = "MSSL1680:00", |
537 | .properties = pov_mobii_wintab_p800w_v20_props, | |
d2d541e8 MS |
538 | }; |
539 | ||
6a655a0d | 540 | static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = { |
4104916d HG |
541 | PROPERTY_ENTRY_U32("touchscreen-min-x", 1), |
542 | PROPERTY_ENTRY_U32("touchscreen-min-y", 8), | |
543 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1794), | |
544 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1148), | |
f1905b98 | 545 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
df532c16 | 546 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p800w.fw"), |
4104916d | 547 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
f1905b98 HG |
548 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
549 | { } | |
550 | }; | |
551 | ||
74421786 | 552 | static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = { |
6a655a0d HG |
553 | .acpi_name = "MSSL1680:00", |
554 | .properties = pov_mobii_wintab_p800w_v21_props, | |
f1905b98 HG |
555 | }; |
556 | ||
8335ebc1 HG |
557 | static const struct property_entry pov_mobii_wintab_p1006w_v10_props[] = { |
558 | PROPERTY_ENTRY_U32("touchscreen-min-x", 1), | |
559 | PROPERTY_ENTRY_U32("touchscreen-min-y", 3), | |
560 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1984), | |
561 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1520), | |
562 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), | |
df532c16 | 563 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p1006w-v10.fw"), |
8335ebc1 HG |
564 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
565 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
566 | { } | |
567 | }; | |
568 | ||
569 | static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = { | |
570 | .acpi_name = "MSSL1680:00", | |
571 | .properties = pov_mobii_wintab_p1006w_v10_props, | |
572 | }; | |
573 | ||
3caa6f39 DGA |
574 | static const struct property_entry schneider_sct101ctm_props[] = { |
575 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1715), | |
576 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1140), | |
577 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"), | |
578 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), | |
579 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), | |
df532c16 | 580 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-schneider-sct101ctm.fw"), |
3caa6f39 DGA |
581 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
582 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
583 | { } | |
584 | }; | |
585 | ||
586 | static const struct ts_dmi_data schneider_sct101ctm_data = { | |
587 | .acpi_name = "MSSL1680:00", | |
588 | .properties = schneider_sct101ctm_props, | |
589 | }; | |
590 | ||
6a655a0d HG |
591 | static const struct property_entry teclast_x3_plus_props[] = { |
592 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1980), | |
593 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1500), | |
594 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"), | |
2aeb2c3a HG |
595 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
596 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
597 | { } | |
598 | }; | |
599 | ||
74421786 | 600 | static const struct ts_dmi_data teclast_x3_plus_data = { |
2aeb2c3a | 601 | .acpi_name = "MSSL1680:00", |
6a655a0d | 602 | .properties = teclast_x3_plus_props, |
2aeb2c3a HG |
603 | }; |
604 | ||
a346aa20 PC |
605 | static const struct property_entry teclast_x98plus2_props[] = { |
606 | PROPERTY_ENTRY_U32("touchscreen-size-x", 2048), | |
607 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1280), | |
608 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"), | |
609 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), | |
df532c16 | 610 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-teclast_x98plus2.fw"), |
a346aa20 PC |
611 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
612 | { } | |
613 | }; | |
614 | ||
74421786 | 615 | static const struct ts_dmi_data teclast_x98plus2_data = { |
a346aa20 PC |
616 | .acpi_name = "MSSL1680:00", |
617 | .properties = teclast_x98plus2_props, | |
618 | }; | |
619 | ||
cacad0b2 HG |
620 | static const struct property_entry trekstor_primebook_c11_props[] = { |
621 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1970), | |
622 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1530), | |
623 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), | |
df532c16 | 624 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c11.fw"), |
cacad0b2 HG |
625 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
626 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
627 | { } | |
628 | }; | |
629 | ||
630 | static const struct ts_dmi_data trekstor_primebook_c11_data = { | |
631 | .acpi_name = "MSSL1680:00", | |
632 | .properties = trekstor_primebook_c11_props, | |
633 | }; | |
634 | ||
6a655a0d HG |
635 | static const struct property_entry trekstor_primebook_c13_props[] = { |
636 | PROPERTY_ENTRY_U32("touchscreen-size-x", 2624), | |
637 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1920), | |
df532c16 | 638 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c13.fw"), |
c58a4f22 AP |
639 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
640 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
641 | { } | |
642 | }; | |
643 | ||
74421786 | 644 | static const struct ts_dmi_data trekstor_primebook_c13_data = { |
c58a4f22 | 645 | .acpi_name = "MSSL1680:00", |
6a655a0d | 646 | .properties = trekstor_primebook_c13_props, |
c58a4f22 AP |
647 | }; |
648 | ||
30394a8e MC |
649 | static const struct property_entry trekstor_primetab_t13b_props[] = { |
650 | PROPERTY_ENTRY_U32("touchscreen-size-x", 2500), | |
651 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1900), | |
df532c16 | 652 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primetab-t13b.fw"), |
30394a8e MC |
653 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
654 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
655 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), | |
656 | { } | |
657 | }; | |
658 | ||
659 | static const struct ts_dmi_data trekstor_primetab_t13b_data = { | |
660 | .acpi_name = "MSSL1680:00", | |
661 | .properties = trekstor_primetab_t13b_props, | |
662 | }; | |
663 | ||
6a655a0d HG |
664 | static const struct property_entry trekstor_surftab_twin_10_1_props[] = { |
665 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1900), | |
666 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1280), | |
667 | PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1), | |
df532c16 | 668 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-surftab-twin-10-1-st10432-8.fw"), |
6a655a0d HG |
669 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
670 | { } | |
671 | }; | |
672 | ||
74421786 | 673 | static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = { |
6a655a0d HG |
674 | .acpi_name = "MSSL1680:00", |
675 | .properties = trekstor_surftab_twin_10_1_props, | |
676 | }; | |
677 | ||
678 | static const struct property_entry trekstor_surftab_wintron70_props[] = { | |
4104916d HG |
679 | PROPERTY_ENTRY_U32("touchscreen-min-x", 12), |
680 | PROPERTY_ENTRY_U32("touchscreen-min-y", 8), | |
6a655a0d HG |
681 | PROPERTY_ENTRY_U32("touchscreen-size-x", 884), |
682 | PROPERTY_ENTRY_U32("touchscreen-size-y", 632), | |
df532c16 | 683 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-surftab-wintron70-st70416-6.fw"), |
adf762dc HG |
684 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
685 | PROPERTY_ENTRY_BOOL("silead,home-button"), | |
686 | { } | |
687 | }; | |
688 | ||
74421786 | 689 | static const struct ts_dmi_data trekstor_surftab_wintron70_data = { |
adf762dc | 690 | .acpi_name = "MSSL1680:00", |
6a655a0d | 691 | .properties = trekstor_surftab_wintron70_props, |
adf762dc HG |
692 | }; |
693 | ||
6a655a0d | 694 | /* NOTE: Please keep this table sorted alphabetically */ |
835e1b86 | 695 | const struct dmi_system_id touchscreen_dmi_table[] = { |
6a655a0d HG |
696 | { |
697 | /* Chuwi Hi8 */ | |
698 | .driver_data = (void *)&chuwi_hi8_data, | |
699 | .matches = { | |
700 | DMI_MATCH(DMI_SYS_VENDOR, "ilife"), | |
701 | DMI_MATCH(DMI_PRODUCT_NAME, "S806"), | |
702 | }, | |
703 | }, | |
704 | { | |
705 | /* Chuwi Hi8 (H1D_S806_206) */ | |
706 | .driver_data = (void *)&chuwi_hi8_data, | |
707 | .matches = { | |
708 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), | |
709 | DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"), | |
710 | DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"), | |
711 | }, | |
712 | }, | |
bbb97d72 KR |
713 | { |
714 | /* Chuwi Hi8 Air (CWI543) */ | |
715 | .driver_data = (void *)&chuwi_hi8_air_data, | |
716 | .matches = { | |
717 | DMI_MATCH(DMI_BOARD_VENDOR, "Default string"), | |
718 | DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"), | |
719 | DMI_MATCH(DMI_PRODUCT_NAME, "Hi8 Air"), | |
720 | }, | |
721 | }, | |
6a655a0d HG |
722 | { |
723 | /* Chuwi Hi8 Pro (CWI513) */ | |
724 | .driver_data = (void *)&chuwi_hi8_pro_data, | |
725 | .matches = { | |
726 | DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"), | |
727 | DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"), | |
728 | }, | |
729 | }, | |
b98dc493 CO |
730 | { |
731 | /* Chuwi Hi10 Air */ | |
732 | .driver_data = (void *)&chuwi_hi10_air_data, | |
733 | .matches = { | |
6d789e60 CO |
734 | DMI_MATCH(DMI_SYS_VENDOR, "CHUWI INNOVATION AND TECHNOLOGY(SHENZHEN)CO.LTD"), |
735 | DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"), | |
b98dc493 CO |
736 | DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"), |
737 | }, | |
738 | }, | |
6baac53e DS |
739 | { |
740 | /* Chuwi Hi10 Plus (CWI527) */ | |
741 | .driver_data = (void *)&chuwi_hi10_plus_data, | |
742 | .matches = { | |
743 | DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"), | |
744 | DMI_MATCH(DMI_PRODUCT_NAME, "Hi10 plus tablet"), | |
745 | DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"), | |
746 | }, | |
747 | }, | |
6a655a0d HG |
748 | { |
749 | /* Chuwi Vi8 (CWI506) */ | |
750 | .driver_data = (void *)&chuwi_vi8_data, | |
751 | .matches = { | |
752 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), | |
753 | DMI_MATCH(DMI_PRODUCT_NAME, "i86"), | |
754 | DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"), | |
755 | }, | |
756 | }, | |
b94b807e HG |
757 | { |
758 | /* Chuwi Vi8 Plus (CWI519) */ | |
759 | .driver_data = (void *)&chuwi_vi8_plus_data, | |
760 | .matches = { | |
761 | DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"), | |
762 | DMI_MATCH(DMI_PRODUCT_NAME, "D2D3_Vi8A1"), | |
763 | DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"), | |
764 | }, | |
765 | }, | |
b4c86811 HG |
766 | { |
767 | /* Chuwi Vi10 (CWI505) */ | |
768 | .driver_data = (void *)&chuwi_vi10_data, | |
769 | .matches = { | |
770 | DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"), | |
771 | DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"), | |
772 | DMI_MATCH(DMI_SYS_VENDOR, "ilife"), | |
773 | DMI_MATCH(DMI_PRODUCT_NAME, "S165"), | |
774 | }, | |
775 | }, | |
a0c80979 GL |
776 | { |
777 | /* Chuwi Surbook Mini (CWI540) */ | |
778 | .driver_data = (void *)&chuwi_surbook_mini_data, | |
779 | .matches = { | |
780 | DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"), | |
781 | DMI_MATCH(DMI_PRODUCT_NAME, "C3W6_AP108_4G"), | |
782 | }, | |
783 | }, | |
c72d95e5 HG |
784 | { |
785 | /* Connect Tablet 9 */ | |
786 | .driver_data = (void *)&connect_tablet9_data, | |
787 | .matches = { | |
788 | DMI_MATCH(DMI_SYS_VENDOR, "Connect"), | |
789 | DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"), | |
790 | }, | |
791 | }, | |
cef9dd85 HG |
792 | { |
793 | /* CUBE iwork8 Air */ | |
794 | .driver_data = (void *)&cube_iwork8_air_data, | |
795 | .matches = { | |
796 | DMI_MATCH(DMI_SYS_VENDOR, "cube"), | |
797 | DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"), | |
798 | DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"), | |
799 | }, | |
800 | }, | |
cda5915d | 801 | { |
802 | /* Cube KNote i1101 */ | |
803 | .driver_data = (void *)&cube_knote_i1101_data, | |
804 | .matches = { | |
805 | DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"), | |
806 | DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"), | |
807 | DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"), | |
808 | DMI_MATCH(DMI_PRODUCT_NAME, "i1101"), | |
809 | }, | |
810 | }, | |
cef9dd85 | 811 | { |
6a655a0d HG |
812 | /* DEXP Ursus 7W */ |
813 | .driver_data = (void *)&dexp_ursus_7w_data, | |
cef9dd85 HG |
814 | .matches = { |
815 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), | |
6a655a0d HG |
816 | DMI_MATCH(DMI_PRODUCT_NAME, "7W"), |
817 | }, | |
818 | }, | |
819 | { | |
820 | /* Digma Citi E200 */ | |
821 | .driver_data = (void *)&digma_citi_e200_data, | |
822 | .matches = { | |
823 | DMI_MATCH(DMI_SYS_VENDOR, "Digma"), | |
824 | DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"), | |
825 | DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"), | |
826 | }, | |
827 | }, | |
828 | { | |
829 | /* GP-electronic T701 */ | |
830 | .driver_data = (void *)&gp_electronic_t701_data, | |
831 | .matches = { | |
832 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), | |
833 | DMI_MATCH(DMI_PRODUCT_NAME, "T701"), | |
834 | DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"), | |
835 | }, | |
836 | }, | |
837 | { | |
838 | /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */ | |
839 | .driver_data = (void *)&trekstor_surftab_wintron70_data, | |
840 | .matches = { | |
841 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), | |
842 | DMI_MATCH(DMI_PRODUCT_NAME, "i71c"), | |
843 | DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"), | |
844 | }, | |
845 | }, | |
f078d053 HG |
846 | { |
847 | /* Irbis TW90 */ | |
848 | .driver_data = (void *)&irbis_tw90_data, | |
849 | .matches = { | |
850 | DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"), | |
851 | DMI_MATCH(DMI_PRODUCT_NAME, "TW90"), | |
852 | }, | |
853 | }, | |
6a655a0d HG |
854 | { |
855 | /* I.T.Works TW891 */ | |
856 | .driver_data = (void *)&itworks_tw891_data, | |
857 | .matches = { | |
858 | DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."), | |
859 | DMI_MATCH(DMI_PRODUCT_NAME, "TW891"), | |
cef9dd85 HG |
860 | }, |
861 | }, | |
828615f8 HG |
862 | { |
863 | /* Jumper EZpad 6 Pro */ | |
864 | .driver_data = (void *)&jumper_ezpad_6_pro_data, | |
865 | .matches = { | |
866 | DMI_MATCH(DMI_SYS_VENDOR, "Jumper"), | |
867 | DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"), | |
868 | DMI_MATCH(DMI_BIOS_VERSION, "5.12"), | |
869 | /* Above matches are too generic, add bios-date match */ | |
870 | DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"), | |
871 | }, | |
872 | }, | |
504a4351 BR |
873 | { |
874 | /* Jumper EZpad 6 Pro B */ | |
875 | .driver_data = (void *)&jumper_ezpad_6_pro_b_data, | |
876 | .matches = { | |
877 | DMI_MATCH(DMI_SYS_VENDOR, "Jumper"), | |
878 | DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"), | |
879 | DMI_MATCH(DMI_BIOS_VERSION, "5.12"), | |
880 | /* Above matches are too generic, add bios-date match */ | |
881 | DMI_MATCH(DMI_BIOS_DATE, "04/24/2018"), | |
882 | }, | |
883 | }, | |
ee7b0d31 HG |
884 | { |
885 | /* Jumper EZpad 6 m4 */ | |
886 | .driver_data = (void *)&jumper_ezpad_6_m4_data, | |
887 | .matches = { | |
888 | DMI_MATCH(DMI_SYS_VENDOR, "jumper"), | |
889 | DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"), | |
890 | /* Jumper8.S106x.A00C.1066 with the version dropped */ | |
891 | DMI_MATCH(DMI_BIOS_VERSION, "Jumper8.S106x"), | |
892 | }, | |
893 | }, | |
6b8e7d8f | 894 | { |
6a655a0d HG |
895 | /* Jumper EZpad mini3 */ |
896 | .driver_data = (void *)&jumper_ezpad_mini3_data, | |
6b8e7d8f HG |
897 | .matches = { |
898 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), | |
6a655a0d HG |
899 | /* jumperx.T87.KFBNEEA02 with the version-nr dropped */ |
900 | DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"), | |
6b8e7d8f HG |
901 | }, |
902 | }, | |
f25b6302 HG |
903 | { |
904 | /* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */ | |
905 | .driver_data = (void *)&trekstor_primebook_c11_data, | |
906 | .matches = { | |
907 | DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"), | |
908 | DMI_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"), | |
909 | }, | |
910 | }, | |
e79e74a5 GL |
911 | { |
912 | /* Myria MY8307 */ | |
913 | .driver_data = (void *)&myria_my8307_data, | |
914 | .matches = { | |
915 | DMI_MATCH(DMI_SYS_VENDOR, "Complet Electro Serv"), | |
916 | DMI_MATCH(DMI_PRODUCT_NAME, "MY8307"), | |
917 | }, | |
918 | }, | |
f4c12d4d | 919 | { |
6a655a0d HG |
920 | /* Onda oBook 20 Plus */ |
921 | .driver_data = (void *)&onda_obook_20_plus_data, | |
f4c12d4d | 922 | .matches = { |
6a655a0d HG |
923 | DMI_MATCH(DMI_SYS_VENDOR, "ONDA"), |
924 | DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"), | |
f4c12d4d BÜ |
925 | }, |
926 | }, | |
01b6b7e6 HG |
927 | { |
928 | /* ONDA V80 plus v3 (P80PSBG9V3A01501) */ | |
929 | .driver_data = (void *)&onda_v80_plus_v3_data, | |
930 | .matches = { | |
931 | DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONDA"), | |
932 | DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V80 PLUS") | |
933 | }, | |
934 | }, | |
ee08f578 JBB |
935 | { |
936 | /* ONDA V820w DualOS */ | |
937 | .driver_data = (void *)&onda_v820w_32g_data, | |
938 | .matches = { | |
939 | DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"), | |
940 | DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS") | |
941 | }, | |
942 | }, | |
5b7bb3a7 | 943 | { |
6a655a0d HG |
944 | /* ONDA V891w revision P891WBEBV1B00 aka v1 */ |
945 | .driver_data = (void *)&onda_v891w_v1_data, | |
5b7bb3a7 | 946 | .matches = { |
6a655a0d HG |
947 | DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"), |
948 | DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"), | |
949 | DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"), | |
5b7bb3a7 | 950 | /* Exact match, different versions need different fw */ |
6a655a0d | 951 | DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"), |
5b7bb3a7 HG |
952 | }, |
953 | }, | |
c0d73088 | 954 | { |
955 | /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */ | |
956 | .driver_data = (void *)&onda_v891w_v3_data, | |
957 | .matches = { | |
958 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), | |
959 | DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"), | |
960 | DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"), | |
961 | }, | |
962 | }, | |
4245c155 | 963 | { |
6a655a0d HG |
964 | /* Pipo W2S */ |
965 | .driver_data = (void *)&pipo_w2s_data, | |
4245c155 | 966 | .matches = { |
6a655a0d HG |
967 | DMI_MATCH(DMI_SYS_VENDOR, "PIPO"), |
968 | DMI_MATCH(DMI_PRODUCT_NAME, "W2S"), | |
4245c155 HG |
969 | }, |
970 | }, | |
f95eafbf TJ |
971 | { |
972 | /* Pipo W11 */ | |
973 | .driver_data = (void *)&pipo_w11_data, | |
974 | .matches = { | |
975 | DMI_MATCH(DMI_SYS_VENDOR, "PIPO"), | |
976 | DMI_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."), | |
977 | /* Above matches are too generic, add bios-ver match */ | |
df532c16 | 978 | DMI_MATCH(DMI_BIOS_VERSION, "JS-BI-10.6-SF133GR300-GA55B-024-F"), |
f95eafbf TJ |
979 | }, |
980 | }, | |
c3a73ed8 HG |
981 | { |
982 | /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */ | |
d6b0d7d8 | 983 | .driver_data = (void *)&trekstor_surftab_wintron70_data, |
c3a73ed8 HG |
984 | .matches = { |
985 | DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"), | |
986 | DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"), | |
987 | /* Exact match, different versions need different fw */ | |
988 | DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"), | |
989 | }, | |
990 | }, | |
f4d342cf | 991 | { |
3cd33db8 HG |
992 | /* Point of View mobii wintab p800w (v2.0) */ |
993 | .driver_data = (void *)&pov_mobii_wintab_p800w_v20_data, | |
994 | .matches = { | |
995 | DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), | |
996 | DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"), | |
997 | DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"), | |
998 | /* Above matches are too generic, add bios-date match */ | |
999 | DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"), | |
1000 | }, | |
1001 | }, | |
1002 | { | |
1003 | /* Point of View mobii wintab p800w (v2.1) */ | |
1004 | .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data, | |
f4d342cf HG |
1005 | .matches = { |
1006 | DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), | |
1007 | DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"), | |
1008 | DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"), | |
1009 | /* Above matches are too generic, add bios-date match */ | |
1010 | DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"), | |
1011 | }, | |
1012 | }, | |
8335ebc1 HG |
1013 | { |
1014 | /* Point of View mobii wintab p1006w (v1.0) */ | |
1015 | .driver_data = (void *)&pov_mobii_wintab_p1006w_v10_data, | |
1016 | .matches = { | |
1017 | DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"), | |
1018 | DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"), | |
1019 | /* Note 105b is Foxcon's USB/PCI vendor id */ | |
1020 | DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"), | |
1021 | DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"), | |
1022 | }, | |
1023 | }, | |
3caa6f39 DGA |
1024 | { |
1025 | /* Schneider SCT101CTM */ | |
1026 | .driver_data = (void *)&schneider_sct101ctm_data, | |
1027 | .matches = { | |
1028 | DMI_MATCH(DMI_SYS_VENDOR, "Default string"), | |
1029 | DMI_MATCH(DMI_PRODUCT_NAME, "SCT101CTM"), | |
1030 | }, | |
1031 | }, | |
4edfc540 | 1032 | { |
6a655a0d HG |
1033 | /* Teclast X3 Plus */ |
1034 | .driver_data = (void *)&teclast_x3_plus_data, | |
26ed9d1c | 1035 | .matches = { |
6a655a0d HG |
1036 | DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"), |
1037 | DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"), | |
1038 | DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"), | |
26ed9d1c | 1039 | }, |
1040 | }, | |
f1905b98 | 1041 | { |
6a655a0d HG |
1042 | /* Teclast X98 Plus II */ |
1043 | .driver_data = (void *)&teclast_x98plus2_data, | |
f1905b98 | 1044 | .matches = { |
6a655a0d HG |
1045 | DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"), |
1046 | DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"), | |
f1905b98 HG |
1047 | }, |
1048 | }, | |
cacad0b2 HG |
1049 | { |
1050 | /* Trekstor Primebook C11 */ | |
1051 | .driver_data = (void *)&trekstor_primebook_c11_data, | |
1052 | .matches = { | |
1053 | DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"), | |
1054 | DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"), | |
1055 | }, | |
1056 | }, | |
37d960a4 HG |
1057 | { |
1058 | /* Trekstor Primebook C11B (same touchscreen as the C11) */ | |
1059 | .driver_data = (void *)&trekstor_primebook_c11_data, | |
1060 | .matches = { | |
1061 | DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"), | |
1062 | DMI_MATCH(DMI_PRODUCT_NAME, "PRIMEBOOK C11B"), | |
1063 | }, | |
1064 | }, | |
2aeb2c3a HG |
1065 | { |
1066 | /* Trekstor Primebook C13 */ | |
1067 | .driver_data = (void *)&trekstor_primebook_c13_data, | |
1068 | .matches = { | |
1069 | DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"), | |
1070 | DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"), | |
1071 | }, | |
1072 | }, | |
30394a8e MC |
1073 | { |
1074 | /* Trekstor Primetab T13B */ | |
1075 | .driver_data = (void *)&trekstor_primetab_t13b_data, | |
1076 | .matches = { | |
1077 | DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"), | |
1078 | DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"), | |
1079 | }, | |
1080 | }, | |
a346aa20 | 1081 | { |
6a655a0d HG |
1082 | /* TrekStor SurfTab twin 10.1 ST10432-8 */ |
1083 | .driver_data = (void *)&trekstor_surftab_twin_10_1_data, | |
a346aa20 | 1084 | .matches = { |
6a655a0d HG |
1085 | DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"), |
1086 | DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"), | |
a346aa20 PC |
1087 | }, |
1088 | }, | |
c58a4f22 | 1089 | { |
6a655a0d HG |
1090 | /* Trekstor Surftab Wintron 7.0 ST70416-6 */ |
1091 | .driver_data = (void *)&trekstor_surftab_wintron70_data, | |
c58a4f22 | 1092 | .matches = { |
6a655a0d HG |
1093 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), |
1094 | DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"), | |
1095 | /* Exact match, different versions need different fw */ | |
1096 | DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"), | |
c58a4f22 AP |
1097 | }, |
1098 | }, | |
5488bfdf | 1099 | { |
6a655a0d | 1100 | /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */ |
d6b0d7d8 | 1101 | .driver_data = (void *)&trekstor_surftab_wintron70_data, |
5488bfdf | 1102 | .matches = { |
6a655a0d | 1103 | DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"), |
df532c16 | 1104 | DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab wintron 7.0 ST70416-6"), |
6a655a0d HG |
1105 | /* Exact match, different versions need different fw */ |
1106 | DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"), | |
5488bfdf HG |
1107 | }, |
1108 | }, | |
24e2bb31 HG |
1109 | { |
1110 | /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */ | |
1111 | .driver_data = (void *)&chuwi_vi8_data, | |
1112 | .matches = { | |
1113 | DMI_MATCH(DMI_SYS_VENDOR, "YOURS"), | |
1114 | DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"), | |
1115 | }, | |
1116 | }, | |
cef9dd85 HG |
1117 | { }, |
1118 | }; | |
1119 | ||
74421786 | 1120 | static const struct ts_dmi_data *ts_data; |
f22265b6 | 1121 | |
74421786 | 1122 | static void ts_dmi_add_props(struct i2c_client *client) |
cef9dd85 | 1123 | { |
e1053963 | 1124 | struct device *dev = &client->dev; |
cef9dd85 HG |
1125 | int error; |
1126 | ||
cef9dd85 | 1127 | if (has_acpi_companion(dev) && |
74421786 HG |
1128 | !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) { |
1129 | error = device_add_properties(dev, ts_data->properties); | |
cef9dd85 HG |
1130 | if (error) |
1131 | dev_err(dev, "failed to add properties: %d\n", error); | |
1132 | } | |
1133 | } | |
1134 | ||
74421786 | 1135 | static int ts_dmi_notifier_call(struct notifier_block *nb, |
df532c16 | 1136 | unsigned long action, void *data) |
cef9dd85 HG |
1137 | { |
1138 | struct device *dev = data; | |
e1053963 | 1139 | struct i2c_client *client; |
cef9dd85 HG |
1140 | |
1141 | switch (action) { | |
1142 | case BUS_NOTIFY_ADD_DEVICE: | |
e1053963 DT |
1143 | client = i2c_verify_client(dev); |
1144 | if (client) | |
74421786 | 1145 | ts_dmi_add_props(client); |
cef9dd85 HG |
1146 | break; |
1147 | ||
1148 | default: | |
1149 | break; | |
1150 | } | |
1151 | ||
1152 | return 0; | |
1153 | } | |
1154 | ||
74421786 HG |
1155 | static struct notifier_block ts_dmi_notifier = { |
1156 | .notifier_call = ts_dmi_notifier_call, | |
cef9dd85 HG |
1157 | }; |
1158 | ||
74421786 | 1159 | static int __init ts_dmi_init(void) |
cef9dd85 | 1160 | { |
f22265b6 | 1161 | const struct dmi_system_id *dmi_id; |
cef9dd85 HG |
1162 | int error; |
1163 | ||
74421786 | 1164 | dmi_id = dmi_first_match(touchscreen_dmi_table); |
f22265b6 DT |
1165 | if (!dmi_id) |
1166 | return 0; /* Not an error */ | |
1167 | ||
74421786 | 1168 | ts_data = dmi_id->driver_data; |
b94b807e HG |
1169 | /* Some dmi table entries only provide an efi_embedded_fw_desc */ |
1170 | if (!ts_data->properties) | |
1171 | return 0; | |
f22265b6 | 1172 | |
74421786 | 1173 | error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier); |
cef9dd85 HG |
1174 | if (error) |
1175 | pr_err("%s: failed to register i2c bus notifier: %d\n", | |
1176 | __func__, error); | |
1177 | ||
1178 | return error; | |
1179 | } | |
1180 | ||
1181 | /* | |
1182 | * We are registering out notifier after i2c core is initialized and i2c bus | |
1183 | * itself is ready (which happens at postcore initcall level), but before | |
1184 | * ACPI starts enumerating devices (at subsys initcall level). | |
1185 | */ | |
74421786 | 1186 | arch_initcall(ts_dmi_init); |