blob: 6ec8923dec1a5f6d698d95b771e01312346c7817 [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>
Hans de Goede835e1b82020-01-15 17:35:53 +010014#include <linux/efi_embedded_fw.h>
Hans de Goedecef9dd82017-01-23 18:35:30 +010015#include <linux/i2c.h>
16#include <linux/notifier.h>
17#include <linux/property.h>
18#include <linux/string.h>
19
Hans de Goede74421782018-06-08 23:45:58 +020020struct ts_dmi_data {
Hans de Goede835e1b82020-01-15 17:35:53 +010021 /* The EFI embedded-fw code expects this to be the first member! */
22 struct efi_embedded_fw_desc embedded_fw;
Hans de Goedecef9dd82017-01-23 18:35:30 +010023 const char *acpi_name;
Hans de Goedeae311152017-03-22 16:55:53 +010024 const struct property_entry *properties;
Hans de Goedecef9dd82017-01-23 18:35:30 +010025};
26
Hans de Goede6a655a02018-06-08 23:45:56 +020027/* NOTE: Please keep all entries sorted alphabetically */
28
29static const struct property_entry chuwi_hi8_props[] = {
30 PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
31 PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
32 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
33 PROPERTY_ENTRY_BOOL("silead,home-button"),
34 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi8.fw"),
35 { }
36};
37
Hans de Goede74421782018-06-08 23:45:58 +020038static const struct ts_dmi_data chuwi_hi8_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +020039 .acpi_name = "MSSL0001:00",
40 .properties = chuwi_hi8_props,
41};
42
Kai Renzigbbb97d72019-02-03 19:34:23 +010043static 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
52static const struct ts_dmi_data chuwi_hi8_air_data = {
53 .acpi_name = "MSSL1680:00",
54 .properties = chuwi_hi8_air_props,
55};
56
Hans de Goede6a655a02018-06-08 23:45:56 +020057static const struct property_entry chuwi_hi8_pro_props[] = {
Hans de Goede41049162018-10-20 12:21:00 +020058 PROPERTY_ENTRY_U32("touchscreen-min-x", 6),
59 PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
Hans de Goede6a655a02018-06-08 23:45:56 +020060 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
61 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
62 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
63 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-hi8-pro.fw"),
Hans de Goede41049162018-10-20 12:21:00 +020064 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
Hans de Goede6a655a02018-06-08 23:45:56 +020065 PROPERTY_ENTRY_BOOL("silead,home-button"),
66 { }
67};
68
Hans de Goede74421782018-06-08 23:45:58 +020069static const struct ts_dmi_data chuwi_hi8_pro_data = {
Hans de Goede835e1b82020-01-15 17:35:53 +010070 .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 },
Hans de Goede6a655a02018-06-08 23:45:56 +020079 .acpi_name = "MSSL1680:00",
80 .properties = chuwi_hi8_pro_props,
81};
82
Christian Oderb98dc492019-03-03 14:47:27 +010083static 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
97static const struct ts_dmi_data chuwi_hi10_air_data = {
98 .acpi_name = "MSSL1680:00",
99 .properties = chuwi_hi10_air_props,
100};
101
Daniel Smith6baac532019-05-24 02:09:13 +0700102static 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
113static const struct ts_dmi_data chuwi_hi10_plus_data = {
114 .acpi_name = "MSSL0017:00",
115 .properties = chuwi_hi10_plus_props,
116};
117
Hans de Goede6a655a02018-06-08 23:45:56 +0200118static const struct property_entry chuwi_vi8_props[] = {
Hans de Goede41049162018-10-20 12:21:00 +0200119 PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
120 PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
Hans de Goede6a655a02018-06-08 23:45:56 +0200121 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"),
125 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
126 PROPERTY_ENTRY_BOOL("silead,home-button"),
127 { }
128};
129
Hans de Goede74421782018-06-08 23:45:58 +0200130static const struct ts_dmi_data chuwi_vi8_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200131 .acpi_name = "MSSL1680:00",
132 .properties = chuwi_vi8_props,
133};
134
Hans de Goedeb94b8072020-01-15 17:35:54 +0100135static 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
Hans de Goedeb4c86812018-06-08 23:45:57 +0200147static 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
Hans de Goede74421782018-06-08 23:45:58 +0200158static const struct ts_dmi_data chuwi_vi10_data = {
Hans de Goedeb4c86812018-06-08 23:45:57 +0200159 .acpi_name = "MSSL0002:00",
160 .properties = chuwi_vi10_props,
161};
162
Giang Lea0c80972019-08-03 21:12:22 +0700163static 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
174static const struct ts_dmi_data chuwi_surbook_mini_data = {
175 .acpi_name = "MSSL1680:00",
176 .properties = chuwi_surbook_mini_props,
177};
178
Hans de Goedec72d95e2018-07-01 11:32:56 +0200179static const struct property_entry connect_tablet9_props[] = {
180 PROPERTY_ENTRY_U32("touchscreen-min-x", 9),
Hans de Goede41049162018-10-20 12:21:00 +0200181 PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
Hans de Goedec72d95e2018-07-01 11:32:56 +0200182 PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
Hans de Goede41049162018-10-20 12:21:00 +0200183 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
Hans de Goedec72d95e2018-07-01 11:32:56 +0200184 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
191static const struct ts_dmi_data connect_tablet9_data = {
192 .acpi_name = "MSSL1680:00",
193 .properties = connect_tablet9_props,
194};
195
Hans de Goedeae311152017-03-22 16:55:53 +0100196static const struct property_entry cube_iwork8_air_props[] = {
Hans de Goede41049162018-10-20 12:21:00 +0200197 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),
Hans de Goedecef9dd82017-01-23 18:35:30 +0100201 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
Hans de Goede74421782018-06-08 23:45:58 +0200207static const struct ts_dmi_data cube_iwork8_air_data = {
Hans de Goede835e1b82020-01-15 17:35:53 +0100208 .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 },
Hans de Goedecef9dd82017-01-23 18:35:30 +0100217 .acpi_name = "MSSL1680:00",
218 .properties = cube_iwork8_air_props,
219};
220
youling257cda59152018-07-31 17:32:56 +0800221static 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
232static const struct ts_dmi_data cube_knote_i1101_data = {
233 .acpi_name = "MSSL1680:00",
234 .properties = cube_knote_i1101_props,
235};
236
Hans de Goede6b8e7d82017-03-22 16:55:54 +0100237static 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),
Hans de Goedeaaa40962017-10-19 09:17:28 +0200242 PROPERTY_ENTRY_BOOL("silead,home-button"),
Hans de Goede6b8e7d82017-03-22 16:55:54 +0100243 { }
244};
245
Hans de Goede74421782018-06-08 23:45:58 +0200246static const struct ts_dmi_data dexp_ursus_7w_data = {
Hans de Goede6b8e7d82017-03-22 16:55:54 +0100247 .acpi_name = "MSSL1680:00",
248 .properties = dexp_ursus_7w_props,
249};
250
Hans de Goede6a655a02018-06-08 23:45:56 +0200251static 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"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200255 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-digma_citi_e200.fw"),
Hans de Goede5b7bb3a2017-04-09 11:07:44 +0200256 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
Hans de Goedeaaa40962017-10-19 09:17:28 +0200257 PROPERTY_ENTRY_BOOL("silead,home-button"),
Hans de Goede5b7bb3a2017-04-09 11:07:44 +0200258 { }
259};
260
Hans de Goede74421782018-06-08 23:45:58 +0200261static const struct ts_dmi_data digma_citi_e200_data = {
Hans de Goede5b7bb3a2017-04-09 11:07:44 +0200262 .acpi_name = "MSSL1680:00",
Hans de Goede6a655a02018-06-08 23:45:56 +0200263 .properties = digma_citi_e200_props,
Hans de Goede5b7bb3a2017-04-09 11:07:44 +0200264};
265
Hans de Goeded9ca30b2017-05-07 14:35:15 +0200266static const struct property_entry gp_electronic_t701_props[] = {
267 PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
268 PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
Hans de Goede5c24c052017-10-19 09:44:14 +0200269 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
270 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200271 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-gp-electronic-t701.fw"),
Hans de Goeded9ca30b2017-05-07 14:35:15 +0200272 { }
273};
274
Hans de Goede74421782018-06-08 23:45:58 +0200275static const struct ts_dmi_data gp_electronic_t701_data = {
Hans de Goeded9ca30b2017-05-07 14:35:15 +0200276 .acpi_name = "MSSL1680:00",
277 .properties = gp_electronic_t701_props,
278};
279
Hans de Goedef078d052019-08-04 15:40:23 +0200280static 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
293static const struct ts_dmi_data irbis_tw90_data = {
294 .acpi_name = "MSSL1680:00",
295 .properties = irbis_tw90_props,
296};
297
Hans de Goede6a655a02018-06-08 23:45:56 +0200298static const struct property_entry itworks_tw891_props[] = {
Hans de Goede41049162018-10-20 12:21:00 +0200299 PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
300 PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
Hans de Goede6a655a02018-06-08 23:45:56 +0200301 PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
Hans de Goede41049162018-10-20 12:21:00 +0200302 PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
Hans de Goede6a655a02018-06-08 23:45:56 +0200303 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
304 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
305 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
Hans de Goede41049162018-10-20 12:21:00 +0200306 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
Hans de Goede6a655a02018-06-08 23:45:56 +0200307 { }
308};
309
Hans de Goede74421782018-06-08 23:45:58 +0200310static const struct ts_dmi_data itworks_tw891_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200311 .acpi_name = "MSSL1680:00",
312 .properties = itworks_tw891_props,
313};
314
315static 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"),
319 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
320 PROPERTY_ENTRY_BOOL("silead,home-button"),
321 { }
322};
323
Hans de Goede74421782018-06-08 23:45:58 +0200324static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200325 .acpi_name = "MSSL1680:00",
326 .properties = jumper_ezpad_6_pro_props,
327};
328
Benjamin Renz504a4352019-04-29 17:46:57 +0200329static 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
339static 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
Hans de Goedeee7b0d32019-11-12 15:17:11 +0100344static 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
355static const struct ts_dmi_data jumper_ezpad_6_m4_data = {
356 .acpi_name = "MSSL1680:00",
357 .properties = jumper_ezpad_6_m4_props,
358};
359
Hans de Goede6a655a02018-06-08 23:45:56 +0200360static const struct property_entry jumper_ezpad_mini3_props[] = {
Hans de Goede41049162018-10-20 12:21:00 +0200361 PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
362 PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
Hans de Goede6a655a02018-06-08 23:45:56 +0200363 PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
Hans de Goede41049162018-10-20 12:21:00 +0200364 PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
Hans de Goede6a655a02018-06-08 23:45:56 +0200365 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
366 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
367 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
368 { }
369};
370
Hans de Goede74421782018-06-08 23:45:58 +0200371static const struct ts_dmi_data jumper_ezpad_mini3_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200372 .acpi_name = "MSSL1680:00",
373 .properties = jumper_ezpad_mini3_props,
374};
375
Gabriel Lazare79e74a2019-03-15 15:31:14 +0200376static 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
388static const struct ts_dmi_data myria_my8307_data = {
389 .acpi_name = "MSSL1680:00",
390 .properties = myria_my8307_props,
391};
392
Hans de Goede6a655a02018-06-08 23:45:56 +0200393static const struct property_entry onda_obook_20_plus_props[] = {
394 PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
395 PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
396 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
397 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
398 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
399 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
400 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
401 PROPERTY_ENTRY_BOOL("silead,home-button"),
402 { }
403};
404
Hans de Goede74421782018-06-08 23:45:58 +0200405static const struct ts_dmi_data onda_obook_20_plus_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200406 .acpi_name = "MSSL1680:00",
407 .properties = onda_obook_20_plus_props,
408};
409
Hans de Goede01b6b7e2018-10-10 15:16:40 +0200410static 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"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200416 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v80-plus-v3.fw"),
Hans de Goede01b6b7e2018-10-10 15:16:40 +0200417 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
418 PROPERTY_ENTRY_BOOL("silead,home-button"),
419 { }
420};
421
422static const struct ts_dmi_data onda_v80_plus_v3_data = {
Hans de Goede835e1b82020-01-15 17:35:53 +0100423 .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 },
Hans de Goede01b6b7e2018-10-10 15:16:40 +0200432 .acpi_name = "MSSL1680:00",
433 .properties = onda_v80_plus_v3_props,
434};
435
Jun Bo Biee08f572018-07-01 17:47:14 -0400436static 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"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200440 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-onda-v820w-32g.fw"),
Jun Bo Biee08f572018-07-01 17:47:14 -0400441 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
442 PROPERTY_ENTRY_BOOL("silead,home-button"),
443 { }
444};
445
446static const struct ts_dmi_data onda_v820w_32g_data = {
447 .acpi_name = "MSSL1680:00",
448 .properties = onda_v820w_32g_props,
449};
450
Hans de Goede6a655a02018-06-08 23:45:56 +0200451static 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),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200456 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-onda-v891w-v1.fw"),
Hans de Goede6a655a02018-06-08 23:45:56 +0200457 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
458 PROPERTY_ENTRY_BOOL("silead,home-button"),
459 { }
460};
461
Hans de Goede74421782018-06-08 23:45:58 +0200462static const struct ts_dmi_data onda_v891w_v1_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200463 .acpi_name = "MSSL1680:00",
464 .properties = onda_v891w_v1_props,
465};
466
youling257c0d73082018-06-18 15:11:44 +0200467static 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"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200473 PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v891w-v3.fw"),
youling257c0d73082018-06-18 15:11:44 +0200474 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
475 PROPERTY_ENTRY_BOOL("silead,home-button"),
476 { }
477};
478
479static const struct ts_dmi_data onda_v891w_v3_data = {
480 .acpi_name = "MSSL1680:00",
481 .properties = onda_v891w_v3_props,
482};
483
Hans de Goede13fadfa2017-06-15 08:48:32 +0200484static const struct property_entry pipo_w2s_props[] = {
485 PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
486 PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
487 PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
488 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200489 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w2s.fw"),
Hans de Goede13fadfa2017-06-15 08:48:32 +0200490 { }
491};
492
Hans de Goede74421782018-06-08 23:45:58 +0200493static const struct ts_dmi_data pipo_w2s_data = {
Hans de Goede835e1b82020-01-15 17:35:53 +0100494 .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 },
Hans de Goede13fadfa2017-06-15 08:48:32 +0200503 .acpi_name = "MSSL1680:00",
504 .properties = pipo_w2s_props,
505};
506
Tim Jostenf95eafb2020-01-03 16:00:59 +0100507static 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),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200512 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w11.fw"),
Tim Jostenf95eafb2020-01-03 16:00:59 +0100513 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
514 PROPERTY_ENTRY_BOOL("silead,home-button"),
515 { }
516};
517
518static const struct ts_dmi_data pipo_w11_data = {
519 .acpi_name = "MSSL1680:00",
520 .properties = pipo_w11_props,
521};
522
Hans de Goede3cd33db2018-05-30 12:43:40 +0200523static 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),
528 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200529 PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
Hans de Goede3cd33db2018-05-30 12:43:40 +0200530 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
531 PROPERTY_ENTRY_BOOL("silead,home-button"),
532 { }
533};
534
Hans de Goede74421782018-06-08 23:45:58 +0200535static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
Hans de Goede3cd33db2018-05-30 12:43:40 +0200536 .acpi_name = "MSSL1680:00",
537 .properties = pov_mobii_wintab_p800w_v20_props,
538};
539
540static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
Hans de Goede41049162018-10-20 12:21:00 +0200541 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),
Hans de Goedef4d342c2017-06-15 08:48:31 +0200545 PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200546 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p800w.fw"),
Hans de Goede41049162018-10-20 12:21:00 +0200547 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
Hans de Goedeaaa40962017-10-19 09:17:28 +0200548 PROPERTY_ENTRY_BOOL("silead,home-button"),
Hans de Goedef4d342c2017-06-15 08:48:31 +0200549 { }
550};
551
Hans de Goede74421782018-06-08 23:45:58 +0200552static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
Hans de Goedef4d342c2017-06-15 08:48:31 +0200553 .acpi_name = "MSSL1680:00",
Hans de Goede3cd33db2018-05-30 12:43:40 +0200554 .properties = pov_mobii_wintab_p800w_v21_props,
Hans de Goedef4d342c2017-06-15 08:48:31 +0200555};
556
Hans de Goede8335ebc2018-12-20 22:21:50 +0100557static 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"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200563 PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p1006w-v10.fw"),
Hans de Goede8335ebc2018-12-20 22:21:50 +0100564 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
565 PROPERTY_ENTRY_BOOL("silead,home-button"),
566 { }
567};
568
569static 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
Daniel Gorbea Ainz3caa6f32019-10-23 20:53:23 +0200574static 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"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200580 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-schneider-sct101ctm.fw"),
Daniel Gorbea Ainz3caa6f32019-10-23 20:53:23 +0200581 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
582 PROPERTY_ENTRY_BOOL("silead,home-button"),
583 { }
584};
585
586static const struct ts_dmi_data schneider_sct101ctm_data = {
587 .acpi_name = "MSSL1680:00",
588 .properties = schneider_sct101ctm_props,
589};
590
Hans de Goede6a655a02018-06-08 23:45:56 +0200591static const struct property_entry teclast_x3_plus_props[] = {
Sergey Tshovrebov3fcf2b22017-10-27 12:27:07 +0200592 PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
593 PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
Hans de Goede6a655a02018-06-08 23:45:56 +0200594 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"),
Sergey Tshovrebov3fcf2b22017-10-27 12:27:07 +0200595 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
596 PROPERTY_ENTRY_BOOL("silead,home-button"),
597 { }
598};
599
Hans de Goede74421782018-06-08 23:45:58 +0200600static const struct ts_dmi_data teclast_x3_plus_data = {
Sergey Tshovrebov3fcf2b22017-10-27 12:27:07 +0200601 .acpi_name = "MSSL1680:00",
Hans de Goede6a655a02018-06-08 23:45:56 +0200602 .properties = teclast_x3_plus_props,
Hans de Goede2aeb2c32017-12-25 13:45:25 +0100603};
604
Paul Cercueila346aa22018-01-02 19:39:27 +0100605static 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"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200610 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-teclast_x98plus2.fw"),
Paul Cercueila346aa22018-01-02 19:39:27 +0100611 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
612 { }
613};
614
Hans de Goede74421782018-06-08 23:45:58 +0200615static const struct ts_dmi_data teclast_x98plus2_data = {
Paul Cercueila346aa22018-01-02 19:39:27 +0100616 .acpi_name = "MSSL1680:00",
617 .properties = teclast_x98plus2_props,
618};
619
Hans de Goedecacad0b2018-10-04 14:34:45 +0200620static 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"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200624 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c11.fw"),
Hans de Goedecacad0b2018-10-04 14:34:45 +0200625 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
626 PROPERTY_ENTRY_BOOL("silead,home-button"),
627 { }
628};
629
630static const struct ts_dmi_data trekstor_primebook_c11_data = {
631 .acpi_name = "MSSL1680:00",
632 .properties = trekstor_primebook_c11_props,
633};
634
Hans de Goede6a655a02018-06-08 23:45:56 +0200635static const struct property_entry trekstor_primebook_c13_props[] = {
636 PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
637 PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200638 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c13.fw"),
Hans de Goedeadf762d2018-05-30 12:43:41 +0200639 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
640 PROPERTY_ENTRY_BOOL("silead,home-button"),
641 { }
642};
643
Hans de Goede74421782018-06-08 23:45:58 +0200644static const struct ts_dmi_data trekstor_primebook_c13_data = {
Hans de Goedeadf762d2018-05-30 12:43:41 +0200645 .acpi_name = "MSSL1680:00",
Hans de Goede6a655a02018-06-08 23:45:56 +0200646 .properties = trekstor_primebook_c13_props,
Hans de Goedeadf762d2018-05-30 12:43:41 +0200647};
648
Marian Cepok30394a82018-10-08 09:25:05 +0200649static const struct property_entry trekstor_primetab_t13b_props[] = {
650 PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
651 PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200652 PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primetab-t13b.fw"),
Marian Cepok30394a82018-10-08 09:25:05 +0200653 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
654 PROPERTY_ENTRY_BOOL("silead,home-button"),
655 PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
656 { }
657};
658
659static const struct ts_dmi_data trekstor_primetab_t13b_data = {
660 .acpi_name = "MSSL1680:00",
661 .properties = trekstor_primetab_t13b_props,
662};
663
Hans de Goede6a655a02018-06-08 23:45:56 +0200664static 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),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200668 PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-surftab-twin-10-1-st10432-8.fw"),
Hans de Goede6a655a02018-06-08 23:45:56 +0200669 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
670 { }
671};
672
Hans de Goede74421782018-06-08 23:45:58 +0200673static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200674 .acpi_name = "MSSL1680:00",
675 .properties = trekstor_surftab_twin_10_1_props,
676};
677
678static const struct property_entry trekstor_surftab_wintron70_props[] = {
Hans de Goede41049162018-10-20 12:21:00 +0200679 PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
680 PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
Hans de Goede6a655a02018-06-08 23:45:56 +0200681 PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
682 PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200683 PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-surftab-wintron70-st70416-6.fw"),
Hans de Goede6a655a02018-06-08 23:45:56 +0200684 PROPERTY_ENTRY_U32("silead,max-fingers", 10),
685 PROPERTY_ENTRY_BOOL("silead,home-button"),
686 { }
687};
688
Hans de Goede74421782018-06-08 23:45:58 +0200689static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
Hans de Goede6a655a02018-06-08 23:45:56 +0200690 .acpi_name = "MSSL1680:00",
691 .properties = trekstor_surftab_wintron70_props,
692};
693
694/* NOTE: Please keep this table sorted alphabetically */
Hans de Goede835e1b82020-01-15 17:35:53 +0100695const struct dmi_system_id touchscreen_dmi_table[] = {
Hans de Goedecef9dd82017-01-23 18:35:30 +0100696 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200697 /* 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 },
713 {
Kai Renzigbbb97d72019-02-03 19:34:23 +0100714 /* 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 },
722 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200723 /* 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 },
730 {
Christian Oderb98dc492019-03-03 14:47:27 +0100731 /* Chuwi Hi10 Air */
732 .driver_data = (void *)&chuwi_hi10_air_data,
733 .matches = {
Christian Oder6d789e62019-06-12 14:40:53 +0200734 DMI_MATCH(DMI_SYS_VENDOR, "CHUWI INNOVATION AND TECHNOLOGY(SHENZHEN)CO.LTD"),
735 DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
Christian Oderb98dc492019-03-03 14:47:27 +0100736 DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"),
737 },
738 },
739 {
Daniel Smith6baac532019-05-24 02:09:13 +0700740 /* 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 },
748 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200749 /* 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 },
757 {
Hans de Goedeb94b8072020-01-15 17:35:54 +0100758 /* 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 },
766 {
Hans de Goedeb4c86812018-06-08 23:45:57 +0200767 /* 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 },
776 {
Giang Lea0c80972019-08-03 21:12:22 +0700777 /* 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 },
784 {
Hans de Goedec72d95e2018-07-01 11:32:56 +0200785 /* 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 },
792 {
Hans de Goedecef9dd82017-01-23 18:35:30 +0100793 /* 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 },
801 {
youling257cda59152018-07-31 17:32:56 +0800802 /* 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 },
811 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200812 /* DEXP Ursus 7W */
813 .driver_data = (void *)&dexp_ursus_7w_data,
Hans de Goedecef9dd82017-01-23 18:35:30 +0100814 .matches = {
815 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
Hans de Goede6a655a02018-06-08 23:45:56 +0200816 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 },
846 {
Hans de Goedef078d052019-08-04 15:40:23 +0200847 /* 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 },
854 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200855 /* 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"),
Hans de Goedecef9dd82017-01-23 18:35:30 +0100860 },
861 },
Hans de Goede6b8e7d82017-03-22 16:55:54 +0100862 {
Hans de Goede828615f2018-05-30 12:43:39 +0200863 /* 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 },
873 {
Benjamin Renz504a4352019-04-29 17:46:57 +0200874 /* 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 },
884 {
Hans de Goedeee7b0d32019-11-12 15:17:11 +0100885 /* 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 },
894 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200895 /* Jumper EZpad mini3 */
896 .driver_data = (void *)&jumper_ezpad_mini3_data,
Hans de Goede6b8e7d82017-03-22 16:55:54 +0100897 .matches = {
898 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
Hans de Goede6a655a02018-06-08 23:45:56 +0200899 /* jumperx.T87.KFBNEEA02 with the version-nr dropped */
900 DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
901 },
902 },
903 {
Hans de Goedef25b6302018-12-04 10:20:04 +0100904 /* 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 },
911 {
Gabriel Lazare79e74a2019-03-15 15:31:14 +0200912 /* 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 },
919 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200920 /* Onda oBook 20 Plus */
921 .driver_data = (void *)&onda_obook_20_plus_data,
922 .matches = {
923 DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
924 DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
925 },
926 },
927 {
Hans de Goede01b6b7e2018-10-10 15:16:40 +0200928 /* 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 },
935 {
Jun Bo Biee08f572018-07-01 17:47:14 -0400936 /* 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 },
943 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200944 /* ONDA V891w revision P891WBEBV1B00 aka v1 */
945 .driver_data = (void *)&onda_v891w_v1_data,
946 .matches = {
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"),
950 /* Exact match, different versions need different fw */
951 DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
952 },
953 },
954 {
youling257c0d73082018-06-18 15:11:44 +0200955 /* 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 },
963 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200964 /* Pipo W2S */
965 .driver_data = (void *)&pipo_w2s_data,
966 .matches = {
967 DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
968 DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
969 },
970 },
971 {
Tim Jostenf95eafb2020-01-03 16:00:59 +0100972 /* 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 */
Andy Shevchenkodf532c12020-01-09 17:34:05 +0200978 DMI_MATCH(DMI_BIOS_VERSION, "JS-BI-10.6-SF133GR300-GA55B-024-F"),
Tim Jostenf95eafb2020-01-03 16:00:59 +0100979 },
980 },
981 {
Hans de Goede6a655a02018-06-08 23:45:56 +0200982 /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
983 .driver_data = (void *)&trekstor_surftab_wintron70_data,
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 },
991 {
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,
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 },
1013 {
Hans de Goede8335ebc2018-12-20 22:21:50 +01001014 /* 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 },
1024 {
Daniel Gorbea Ainz3caa6f32019-10-23 20:53:23 +02001025 /* 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 },
1032 {
Hans de Goede6a655a02018-06-08 23:45:56 +02001033 /* Teclast X3 Plus */
1034 .driver_data = (void *)&teclast_x3_plus_data,
1035 .matches = {
1036 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
1037 DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
1038 DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
1039 },
1040 },
1041 {
1042 /* Teclast X98 Plus II */
1043 .driver_data = (void *)&teclast_x98plus2_data,
1044 .matches = {
1045 DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
1046 DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
1047 },
1048 },
1049 {
Hans de Goedecacad0b2018-10-04 14:34:45 +02001050 /* 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 },
1057 {
Hans de Goede37d960a2019-08-18 13:04:51 +02001058 /* 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 },
1065 {
Hans de Goede6a655a02018-06-08 23:45:56 +02001066 /* 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"),
Hans de Goede6b8e7d82017-03-22 16:55:54 +01001071 },
1072 },
Hans de Goede5b7bb3a2017-04-09 11:07:44 +02001073 {
Marian Cepok30394a82018-10-08 09:25:05 +02001074 /* 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 },
1081 {
Bernhard Übelackerf4c12d42017-11-26 19:32:58 +01001082 /* TrekStor SurfTab twin 10.1 ST10432-8 */
Hans de Goeded6b0d7d2018-06-08 23:45:55 +02001083 .driver_data = (void *)&trekstor_surftab_twin_10_1_data,
Bernhard Übelackerf4c12d42017-11-26 19:32:58 +01001084 .matches = {
1085 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1086 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
1087 },
1088 },
1089 {
Hans de Goede5b7bb3a2017-04-09 11:07:44 +02001090 /* Trekstor Surftab Wintron 7.0 ST70416-6 */
Hans de Goeded6b0d7d2018-06-08 23:45:55 +02001091 .driver_data = (void *)&trekstor_surftab_wintron70_data,
Hans de Goede5b7bb3a2017-04-09 11:07:44 +02001092 .matches = {
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"),
1097 },
1098 },
Hans de Goeded9ca30b2017-05-07 14:35:15 +02001099 {
Hans de Goede4245c152018-01-16 20:24:15 +01001100 /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
Hans de Goeded6b0d7d2018-06-08 23:45:55 +02001101 .driver_data = (void *)&trekstor_surftab_wintron70_data,
Hans de Goede4245c152018-01-16 20:24:15 +01001102 .matches = {
1103 DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
Andy Shevchenkodf532c12020-01-09 17:34:05 +02001104 DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab wintron 7.0 ST70416-6"),
Hans de Goede4245c152018-01-16 20:24:15 +01001105 /* Exact match, different versions need different fw */
1106 DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
1107 },
1108 },
1109 {
Hans de Goede24e2bb32018-03-09 15:03:58 +01001110 /* 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 },
Hans de Goedecef9dd82017-01-23 18:35:30 +01001117 { },
1118};
1119
Hans de Goede74421782018-06-08 23:45:58 +02001120static const struct ts_dmi_data *ts_data;
Dmitry Torokhovf22265b2017-04-03 20:25:14 -07001121
Hans de Goede74421782018-06-08 23:45:58 +02001122static void ts_dmi_add_props(struct i2c_client *client)
Hans de Goedecef9dd82017-01-23 18:35:30 +01001123{
Dmitry Torokhove1053962017-04-03 20:25:13 -07001124 struct device *dev = &client->dev;
Hans de Goedecef9dd82017-01-23 18:35:30 +01001125 int error;
1126
Hans de Goedecef9dd82017-01-23 18:35:30 +01001127 if (has_acpi_companion(dev) &&
Hans de Goede74421782018-06-08 23:45:58 +02001128 !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
1129 error = device_add_properties(dev, ts_data->properties);
Hans de Goedecef9dd82017-01-23 18:35:30 +01001130 if (error)
1131 dev_err(dev, "failed to add properties: %d\n", error);
1132 }
1133}
1134
Hans de Goede74421782018-06-08 23:45:58 +02001135static int ts_dmi_notifier_call(struct notifier_block *nb,
Andy Shevchenkodf532c12020-01-09 17:34:05 +02001136 unsigned long action, void *data)
Hans de Goedecef9dd82017-01-23 18:35:30 +01001137{
1138 struct device *dev = data;
Dmitry Torokhove1053962017-04-03 20:25:13 -07001139 struct i2c_client *client;
Hans de Goedecef9dd82017-01-23 18:35:30 +01001140
1141 switch (action) {
1142 case BUS_NOTIFY_ADD_DEVICE:
Dmitry Torokhove1053962017-04-03 20:25:13 -07001143 client = i2c_verify_client(dev);
1144 if (client)
Hans de Goede74421782018-06-08 23:45:58 +02001145 ts_dmi_add_props(client);
Hans de Goedecef9dd82017-01-23 18:35:30 +01001146 break;
1147
1148 default:
1149 break;
1150 }
1151
1152 return 0;
1153}
1154
Hans de Goede74421782018-06-08 23:45:58 +02001155static struct notifier_block ts_dmi_notifier = {
1156 .notifier_call = ts_dmi_notifier_call,
Hans de Goedecef9dd82017-01-23 18:35:30 +01001157};
1158
Hans de Goede74421782018-06-08 23:45:58 +02001159static int __init ts_dmi_init(void)
Hans de Goedecef9dd82017-01-23 18:35:30 +01001160{
Dmitry Torokhovf22265b2017-04-03 20:25:14 -07001161 const struct dmi_system_id *dmi_id;
Hans de Goedecef9dd82017-01-23 18:35:30 +01001162 int error;
1163
Hans de Goede74421782018-06-08 23:45:58 +02001164 dmi_id = dmi_first_match(touchscreen_dmi_table);
Dmitry Torokhovf22265b2017-04-03 20:25:14 -07001165 if (!dmi_id)
1166 return 0; /* Not an error */
1167
Hans de Goede74421782018-06-08 23:45:58 +02001168 ts_data = dmi_id->driver_data;
Hans de Goedeb94b8072020-01-15 17:35:54 +01001169 /* Some dmi table entries only provide an efi_embedded_fw_desc */
1170 if (!ts_data->properties)
1171 return 0;
Dmitry Torokhovf22265b2017-04-03 20:25:14 -07001172
Hans de Goede74421782018-06-08 23:45:58 +02001173 error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
Hans de Goedecef9dd82017-01-23 18:35:30 +01001174 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 */
Hans de Goede74421782018-06-08 23:45:58 +02001186arch_initcall(ts_dmi_init);