touchscreen_dmi.c 43.7 KB
Newer Older
1
// SPDX-License-Identifier: GPL-2.0-or-later
2
/*
3
 * Touchscreen driver DMI based configuration code
4 5 6 7 8 9 10 11 12 13
 *
 * Copyright (c) 2017 Red Hat Inc.
 *
 * Red Hat authors:
 * Hans de Goede <hdegoede@redhat.com>
 */

#include <linux/acpi.h>
#include <linux/device.h>
#include <linux/dmi.h>
14
#include <linux/efi_embedded_fw.h>
15 16 17 18 19
#include <linux/i2c.h>
#include <linux/notifier.h>
#include <linux/property.h>
#include <linux/string.h>

20
struct ts_dmi_data {
21 22
	/* The EFI embedded-fw code expects this to be the first member! */
	struct efi_embedded_fw_desc embedded_fw;
23
	const char *acpi_name;
24
	const struct property_entry *properties;
25 26
};

27 28 29 30 31
/* NOTE: Please keep all entries sorted alphabetically */

static const struct property_entry chuwi_hi8_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
32
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
33 34
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi8.fw"),
35 36 37
	{ }
};

38
static const struct ts_dmi_data chuwi_hi8_data = {
39 40
	.acpi_name      = "MSSL0001:00",
	.properties     = chuwi_hi8_props,
41 42
};

43 44 45 46 47 48 49 50 51 52 53 54 55 56
static const struct property_entry chuwi_hi8_air_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-hi8-air.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	{ }
};

static const struct ts_dmi_data chuwi_hi8_air_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= chuwi_hi8_air_props,
};

57
static const struct property_entry chuwi_hi8_pro_props[] = {
58 59
	PROPERTY_ENTRY_U32("touchscreen-min-x", 6),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
60 61
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
	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"),
64
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
65
	PROPERTY_ENTRY_BOOL("silead,home-button"),
66 67 68
	{ }
};

69
static const struct ts_dmi_data chuwi_hi8_pro_data = {
70 71 72 73 74 75 76 77 78
	.embedded_fw = {
		.name	= "silead/gsl3680-chuwi-hi8-pro.fw",
		.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
		.length	= 39864,
		.sha256	= { 0xc0, 0x88, 0xc5, 0xef, 0xd1, 0x70, 0x77, 0x59,
			    0x4e, 0xe9, 0xc4, 0xd8, 0x2e, 0xcd, 0xbf, 0x95,
			    0x32, 0xd9, 0x03, 0x28, 0x0d, 0x48, 0x9f, 0x92,
			    0x35, 0x37, 0xf6, 0x8b, 0x2a, 0xe4, 0x73, 0xff },
	},
79
	.acpi_name	= "MSSL1680:00",
80
	.properties	= chuwi_hi8_pro_props,
81 82
};

83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
static const struct property_entry chuwi_hi10_air_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1981),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1271),
	PROPERTY_ENTRY_U32("touchscreen-min-x", 99),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 9),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
	PROPERTY_ENTRY_U32("touchscreen-fuzz-x", 5),
	PROPERTY_ENTRY_U32("touchscreen-fuzz-y", 4),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10-air.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data chuwi_hi10_air_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= chuwi_hi10_air_props,
};

102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
static const struct property_entry chuwi_hi10_plus_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1914),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1283),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi10plus.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data chuwi_hi10_plus_data = {
	.acpi_name      = "MSSL0017:00",
	.properties     = chuwi_hi10_plus_props,
};

118
static const struct property_entry chuwi_vi8_props[] = {
119 120
	PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 6),
121 122 123 124
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1724),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-vi8.fw"),
125 126 127 128 129
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

130
static const struct ts_dmi_data chuwi_vi8_data = {
131 132 133 134
	.acpi_name      = "MSSL1680:00",
	.properties     = chuwi_vi8_props,
};

135 136 137 138 139 140 141 142 143 144 145 146
static const struct ts_dmi_data chuwi_vi8_plus_data = {
	.embedded_fw = {
		.name	= "chipone/icn8505-HAMP0002.fw",
		.prefix = { 0xb0, 0x07, 0x00, 0x00, 0xe4, 0x07, 0x00, 0x00 },
		.length	= 35012,
		.sha256	= { 0x93, 0xe5, 0x49, 0xe0, 0xb6, 0xa2, 0xb4, 0xb3,
			    0x88, 0x96, 0x34, 0x97, 0x5e, 0xa8, 0x13, 0x78,
			    0x72, 0x98, 0xb8, 0x29, 0xeb, 0x5c, 0xa7, 0xf1,
			    0x25, 0x13, 0x43, 0xf4, 0x30, 0x7c, 0xfc, 0x7c },
	},
};

147 148 149 150 151 152 153 154 155 156 157
static const struct property_entry chuwi_vi10_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 0),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 4),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1858),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-vi10.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

158
static const struct ts_dmi_data chuwi_vi10_data = {
159 160 161 162
	.acpi_name      = "MSSL0002:00",
	.properties     = chuwi_vi10_props,
};

163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
static const struct property_entry chuwi_surbook_mini_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 88),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 13),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 2040),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1524),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-surbook-mini.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
	{ }
};

static const struct ts_dmi_data chuwi_surbook_mini_data = {
	.acpi_name      = "MSSL1680:00",
	.properties     = chuwi_surbook_mini_props,
};

179 180
static const struct property_entry connect_tablet9_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 9),
181
	PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
182
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
183
	PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
184 185 186 187 188 189 190 191 192 193 194 195
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-connect-tablet9.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	{ }
};

static const struct ts_dmi_data connect_tablet9_data = {
	.acpi_name      = "MSSL1680:00",
	.properties     = connect_tablet9_props,
};

196
static const struct property_entry cube_iwork8_air_props[] = {
197 198 199 200
	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
201 202 203 204 205 206
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-cube-iwork8-air.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	{ }
};

207
static const struct ts_dmi_data cube_iwork8_air_data = {
208 209 210 211 212 213 214 215 216
	.embedded_fw = {
		.name	= "silead/gsl3670-cube-iwork8-air.fw",
		.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
		.length	= 38808,
		.sha256	= { 0xff, 0x62, 0x2d, 0xd1, 0x8a, 0x78, 0x04, 0x7b,
			    0x33, 0x06, 0xb0, 0x4f, 0x7f, 0x02, 0x08, 0x9c,
			    0x96, 0xd4, 0x9f, 0x04, 0xe1, 0x47, 0x25, 0x25,
			    0x60, 0x77, 0x41, 0x33, 0xeb, 0x12, 0x82, 0xfc },
	},
217
	.acpi_name	= "MSSL1680:00",
218
	.properties	= cube_iwork8_air_props,
219 220
};

221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
static const struct property_entry cube_knote_i1101_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
	PROPERTY_ENTRY_U32("touchscreen-min-y",  22),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1961),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1513),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-cube-knote-i1101.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data cube_knote_i1101_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= cube_knote_i1101_props,
};

237 238 239 240 241
static const struct property_entry dexp_ursus_7w_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 890),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 630),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-dexp-ursus-7w.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
242
	PROPERTY_ENTRY_BOOL("silead,home-button"),
243 244 245
	{ }
};

246
static const struct ts_dmi_data dexp_ursus_7w_data = {
247 248 249 250
	.acpi_name	= "MSSL1680:00",
	.properties	= dexp_ursus_7w_props,
};

251 252 253 254
static const struct property_entry digma_citi_e200_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
255
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-digma_citi_e200.fw"),
256
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
257
	PROPERTY_ENTRY_BOOL("silead,home-button"),
258 259 260
	{ }
};

261
static const struct ts_dmi_data digma_citi_e200_data = {
262
	.acpi_name	= "MSSL1680:00",
263
	.properties	= digma_citi_e200_props,
264 265
};

266 267 268 269 270 271 272 273 274 275
static const struct property_entry estar_beauty_hd_props[] = {
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
	{ }
};

static const struct ts_dmi_data estar_beauty_hd_data = {
	.acpi_name	= "GDIX1001:00",
	.properties	= estar_beauty_hd_props,
};

276 277 278
static const struct property_entry gp_electronic_t701_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
279 280
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
281
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-gp-electronic-t701.fw"),
282 283 284
	{ }
};

285
static const struct ts_dmi_data gp_electronic_t701_data = {
286 287 288 289
	.acpi_name	= "MSSL1680:00",
	.properties	= gp_electronic_t701_props,
};

290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307
static const struct property_entry irbis_tw90_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
	PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 14),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-irbis_tw90.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data irbis_tw90_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= irbis_tw90_props,
};

308 309 310 311 312 313 314 315 316 317 318 319 320 321 322
static const struct property_entry irbis_tw118_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 30),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1960),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1510),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-irbis-tw118.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	{ }
};

static const struct ts_dmi_data irbis_tw118_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= irbis_tw118_props,
};

323
static const struct property_entry itworks_tw891_props[] = {
324 325
	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
326
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
327
	PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
328
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
329
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
330
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
331
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
332 333 334
	{ }
};

335
static const struct ts_dmi_data itworks_tw891_data = {
336
	.acpi_name	= "MSSL1680:00",
337
	.properties	= itworks_tw891_props,
338 339
};

340 341 342 343
static const struct property_entry jumper_ezpad_6_pro_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"),
344 345 346 347 348
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

349
static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
350
	.acpi_name	= "MSSL1680:00",
351
	.properties	= jumper_ezpad_6_pro_props,
352 353
};

354 355 356 357 358 359 360 361 362 363 364 365 366 367 368
static const struct property_entry jumper_ezpad_6_pro_b_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro-b.fw"),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data jumper_ezpad_6_pro_b_data = {
	.acpi_name      = "MSSL1680:00",
	.properties     = jumper_ezpad_6_pro_b_props,
};

369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384
static const struct property_entry jumper_ezpad_6_m4_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1950),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1525),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-m4.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data jumper_ezpad_6_m4_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= jumper_ezpad_6_m4_props,
};

385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401
static const struct property_entry jumper_ezpad_7_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 4),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 2044),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1526),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-jumper-ezpad-7.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,stuck-controller-bug"),
	{ }
};

static const struct ts_dmi_data jumper_ezpad_7_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= jumper_ezpad_7_props,
};

402
static const struct property_entry jumper_ezpad_mini3_props[] = {
403 404
	PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
405
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
406
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
407
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
408 409
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
410 411 412
	{ }
};

413
static const struct ts_dmi_data jumper_ezpad_mini3_data = {
414
	.acpi_name	= "MSSL1680:00",
415
	.properties	= jumper_ezpad_mini3_props,
416 417
};

418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434
static const struct property_entry mpman_converter9_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 8),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1664),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-mpman-converter9.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	{ }
};

static const struct ts_dmi_data mpman_converter9_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= mpman_converter9_props,
};

435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451
static const struct property_entry mpman_mpwin895cl_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 3),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 9),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1150),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-mpman-mpwin895cl.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data mpman_mpwin895cl_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= mpman_mpwin895cl_props,
};

452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468
static const struct property_entry myria_my8307_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1720),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-myria-my8307.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data myria_my8307_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= myria_my8307_props,
};

469
static const struct property_entry onda_obook_20_plus_props[] = {
470 471
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
472 473
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
474
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
475 476
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
477
	PROPERTY_ENTRY_BOOL("silead,home-button"),
478 479 480
	{ }
};

481
static const struct ts_dmi_data onda_obook_20_plus_data = {
482
	.acpi_name	= "MSSL1680:00",
483
	.properties	= onda_obook_20_plus_props,
484 485
};

486 487 488 489 490 491
static const struct property_entry onda_v80_plus_v3_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 22),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1698),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
492
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v80-plus-v3.fw"),
493 494 495 496 497 498
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data onda_v80_plus_v3_data = {
499 500 501 502 503 504 505 506 507
	.embedded_fw = {
		.name	= "silead/gsl3676-onda-v80-plus-v3.fw",
		.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
		.length	= 37224,
		.sha256	= { 0x8f, 0xbd, 0x8f, 0x0c, 0x6b, 0xba, 0x5b, 0xf5,
			    0xa3, 0xc7, 0xa3, 0xc0, 0x4f, 0xcd, 0xdf, 0x32,
			    0xcc, 0xe4, 0x70, 0xd6, 0x46, 0x9c, 0xd7, 0xa7,
			    0x4b, 0x82, 0x3f, 0xab, 0xc7, 0x90, 0xea, 0x23 },
	},
508 509 510 511
	.acpi_name	= "MSSL1680:00",
	.properties	= onda_v80_plus_v3_props,
};

512 513 514 515
static const struct property_entry onda_v820w_32g_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1665),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
516
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-onda-v820w-32g.fw"),
517 518 519 520 521 522 523 524 525 526
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data onda_v820w_32g_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= onda_v820w_32g_props,
};

527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544
static const struct property_entry onda_v891_v5_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
	PROPERTY_ENTRY_STRING("firmware-name",
			      "gsl3676-onda-v891-v5.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data onda_v891_v5_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= onda_v891_v5_props,
};

545 546 547 548 549
static const struct property_entry onda_v891w_v1_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 46),
	PROPERTY_ENTRY_U32("touchscreen-min-y",  8),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1676),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1130),
550
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-onda-v891w-v1.fw"),
551 552 553 554 555
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

556
static const struct ts_dmi_data onda_v891w_v1_data = {
557
	.acpi_name	= "MSSL1680:00",
558
	.properties	= onda_v891w_v1_props,
559 560
};

561 562 563 564 565 566
static const struct property_entry onda_v891w_v3_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 35),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1625),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1135),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
567
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v891w-v3.fw"),
568 569 570 571 572 573 574 575 576 577
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data onda_v891w_v3_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= onda_v891w_v3_props,
};

578 579 580
static const struct property_entry pipo_w2s_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
581 582
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
583
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w2s.fw"),
584 585 586
	{ }
};

587
static const struct ts_dmi_data pipo_w2s_data = {
588 589 590 591 592 593 594 595 596
	.embedded_fw = {
		.name	= "silead/gsl1680-pipo-w2s.fw",
		.prefix = { 0xf0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00 },
		.length	= 39072,
		.sha256	= { 0xd0, 0x58, 0xc4, 0x7d, 0x55, 0x2d, 0x62, 0x18,
			    0xd1, 0x6a, 0x71, 0x73, 0x0b, 0x3f, 0xbe, 0x60,
			    0xbb, 0x45, 0x8c, 0x52, 0x27, 0xb7, 0x18, 0xf4,
			    0x31, 0x00, 0x6a, 0x49, 0x76, 0xd8, 0x7c, 0xd3 },
	},
597
	.acpi_name	= "MSSL1680:00",
598
	.properties	= pipo_w2s_props,
599 600
};

601 602 603 604 605
static const struct property_entry pipo_w11_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 15),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1532),
606
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w11.fw"),
607 608 609 610 611 612 613 614 615 616
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data pipo_w11_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= pipo_w11_props,
};

617 618 619 620 621
static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 32),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1692),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1146),
622
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
623
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
624
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
625 626 627 628
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

629
static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
630 631
	.acpi_name	= "MSSL1680:00",
	.properties	= pov_mobii_wintab_p800w_v20_props,
632 633
};

634
static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
635 636 637 638
	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1794),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
639
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
640
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p800w.fw"),
641
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
642 643 644 645
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

646
static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
647 648
	.acpi_name	= "MSSL1680:00",
	.properties	= pov_mobii_wintab_p800w_v21_props,
649 650
};

651 652 653 654 655 656
static const struct property_entry pov_mobii_wintab_p1006w_v10_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 3),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1984),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1520),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
657
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p1006w-v10.fw"),
658 659 660 661 662 663 664 665 666 667
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= pov_mobii_wintab_p1006w_v10_props,
};

668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684
static const struct property_entry predia_basic_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 3),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 10),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1144),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-predia-basic.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data predia_basic_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= predia_basic_props,
};

685 686 687 688 689 690
static const struct property_entry schneider_sct101ctm_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1715),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1140),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
691
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-schneider-sct101ctm.fw"),
692 693 694 695 696 697 698 699 700 701
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data schneider_sct101ctm_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= schneider_sct101ctm_props,
};

702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717
static const struct property_entry techbite_arc_11_6_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-min-x", 5),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 7),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1981),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1270),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-techbite-arc-11-6.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	{ }
};

static const struct ts_dmi_data techbite_arc_11_6_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= techbite_arc_11_6_props,
};

718 719 720 721
static const struct property_entry teclast_x3_plus_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1980),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1500),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"),
722 723 724 725 726
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

727
static const struct ts_dmi_data teclast_x3_plus_data = {
728
	.acpi_name	= "MSSL1680:00",
729
	.properties	= teclast_x3_plus_props,
730 731
};

732 733 734 735 736
static const struct property_entry teclast_x98plus2_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 2048),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
737
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-teclast_x98plus2.fw"),
738 739 740 741
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	{ }
};

742
static const struct ts_dmi_data teclast_x98plus2_data = {
743 744 745 746
	.acpi_name	= "MSSL1680:00",
	.properties	= teclast_x98plus2_props,
};

747 748 749 750
static const struct property_entry trekstor_primebook_c11_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1970),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1530),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
751
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c11.fw"),
752 753 754 755 756 757 758 759 760 761
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data trekstor_primebook_c11_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= trekstor_primebook_c11_props,
};

762 763 764
static const struct property_entry trekstor_primebook_c13_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
765
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c13.fw"),
766 767 768 769 770
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

771
static const struct ts_dmi_data trekstor_primebook_c13_data = {
772
	.acpi_name	= "MSSL1680:00",
773
	.properties	= trekstor_primebook_c13_props,
774 775
};

776 777 778
static const struct property_entry trekstor_primetab_t13b_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
779
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primetab-t13b.fw"),
780 781 782 783 784 785 786 787 788 789 790
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
	{ }
};

static const struct ts_dmi_data trekstor_primetab_t13b_data = {
	.acpi_name  = "MSSL1680:00",
	.properties = trekstor_primetab_t13b_props,
};

791
static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
792 793 794
	PROPERTY_ENTRY_U32("touchscreen-min-x", 20),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 0),
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1890),
795 796
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
	PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
797
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-surftab-twin-10-1-st10432-8.fw"),
798
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
799
	PROPERTY_ENTRY_BOOL("silead,home-button"),
800 801 802
	{ }
};

803
static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
804 805 806 807 808
	.acpi_name	= "MSSL1680:00",
	.properties	= trekstor_surftab_twin_10_1_props,
};

static const struct property_entry trekstor_surftab_wintron70_props[] = {
809 810
	PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
811 812
	PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
813
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-surftab-wintron70-st70416-6.fw"),
814 815 816 817 818
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

819
static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
820
	.acpi_name	= "MSSL1680:00",
821
	.properties	= trekstor_surftab_wintron70_props,
822 823
};

824 825 826 827 828 829 830 831 832 833 834 835 836 837
static const struct property_entry vinga_twizzle_j116_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1920),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-vinga-twizzle_j116.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data vinga_twizzle_j116_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= vinga_twizzle_j116_props,
};

838
/* NOTE: Please keep this table sorted alphabetically */
839
const struct dmi_system_id touchscreen_dmi_table[] = {
840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856
	{
		/* Chuwi Hi8 */
		.driver_data = (void *)&chuwi_hi8_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
			DMI_MATCH(DMI_PRODUCT_NAME, "S806"),
		},
	},
	{
		/* Chuwi Hi8 (H1D_S806_206) */
		.driver_data = (void *)&chuwi_hi8_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
			DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
			DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"),
		},
	},
857 858 859 860 861 862 863 864 865
	{
		/* Chuwi Hi8 Air (CWI543) */
		.driver_data = (void *)&chuwi_hi8_air_data,
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "Default string"),
			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Hi8 Air"),
		},
	},
866 867 868 869 870 871 872 873
	{
		/* Chuwi Hi8 Pro (CWI513) */
		.driver_data = (void *)&chuwi_hi8_pro_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
			DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"),
		},
	},
874 875 876 877
	{
		/* Chuwi Hi10 Air */
		.driver_data = (void *)&chuwi_hi10_air_data,
		.matches = {
878 879
			DMI_MATCH(DMI_SYS_VENDOR, "CHUWI INNOVATION AND TECHNOLOGY(SHENZHEN)CO.LTD"),
			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
880 881 882
			DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"),
		},
	},
883 884 885 886 887 888 889 890 891
	{
		/* Chuwi Hi10 Plus (CWI527) */
		.driver_data = (void *)&chuwi_hi10_plus_data,
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Hi10 plus tablet"),
			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
		},
	},
892 893 894 895 896 897 898 899 900
	{
		/* Chuwi Vi8 (CWI506) */
		.driver_data = (void *)&chuwi_vi8_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
			DMI_MATCH(DMI_PRODUCT_NAME, "i86"),
			DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"),
		},
	},
901 902 903 904 905 906 907 908 909
	{
		/* Chuwi Vi8 Plus (CWI519) */
		.driver_data = (void *)&chuwi_vi8_plus_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"),
			DMI_MATCH(DMI_PRODUCT_NAME, "D2D3_Vi8A1"),
			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
		},
	},
910 911 912 913 914 915 916 917 918 919
	{
		/* Chuwi Vi10 (CWI505) */
		.driver_data = (void *)&chuwi_vi10_data,
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
			DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"),
			DMI_MATCH(DMI_SYS_VENDOR, "ilife"),
			DMI_MATCH(DMI_PRODUCT_NAME, "S165"),
		},
	},
920 921 922 923 924 925 926 927
	{
		/* Chuwi Surbook Mini (CWI540) */
		.driver_data = (void *)&chuwi_surbook_mini_data,
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
			DMI_MATCH(DMI_PRODUCT_NAME, "C3W6_AP108_4G"),
		},
	},
928 929 930 931 932 933 934 935
	{
		/* Connect Tablet 9 */
		.driver_data = (void *)&connect_tablet9_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
		},
	},
936 937 938 939 940 941 942 943 944
	{
		/* CUBE iwork8 Air */
		.driver_data = (void *)&cube_iwork8_air_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "cube"),
			DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"),
			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
		},
	},
945 946 947 948 949 950 951 952 953 954
	{
		/* Cube KNote i1101 */
		.driver_data = (void *)&cube_knote_i1101_data,
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"),
			DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"),
			DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"),
			DMI_MATCH(DMI_PRODUCT_NAME, "i1101"),
		},
	},
955
	{
956 957
		/* DEXP Ursus 7W */
		.driver_data = (void *)&dexp_ursus_7w_data,
958 959
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
960 961 962 963 964 965 966 967 968 969 970 971
			DMI_MATCH(DMI_PRODUCT_NAME, "7W"),
		},
	},
	{
		/* Digma Citi E200 */
		.driver_data = (void *)&digma_citi_e200_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Digma"),
			DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"),
			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
		},
	},
972 973 974 975 976 977 978 979
	{
		/* Estar Beauty HD (MID 7316R) */
		.driver_data = (void *)&estar_beauty_hd_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Estar"),
			DMI_MATCH(DMI_PRODUCT_NAME, "eSTAR BEAUTY HD Intel Quad core"),
		},
	},
980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997
	{
		/* GP-electronic T701 */
		.driver_data = (void *)&gp_electronic_t701_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
			DMI_MATCH(DMI_PRODUCT_NAME, "T701"),
			DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"),
		},
	},
	{
		/* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */
		.driver_data = (void *)&trekstor_surftab_wintron70_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
			DMI_MATCH(DMI_PRODUCT_NAME, "i71c"),
			DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"),
		},
	},
998 999 1000 1001 1002 1003 1004 1005
	{
		/* Irbis TW90 */
		.driver_data = (void *)&irbis_tw90_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"),
			DMI_MATCH(DMI_PRODUCT_NAME, "TW90"),
		},
	},
1006 1007 1008 1009 1010 1011 1012 1013
	{
		/* Irbis TW118 */
		.driver_data = (void *)&irbis_tw118_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"),
			DMI_MATCH(DMI_PRODUCT_NAME, "TW118"),
		},
	},
1014 1015 1016 1017 1018 1019
	{
		/* I.T.Works TW891 */
		.driver_data = (void *)&itworks_tw891_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
			DMI_MATCH(DMI_PRODUCT_NAME, "TW891"),
1020 1021
		},
	},
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032
	{
		/* Jumper EZpad 6 Pro */
		.driver_data = (void *)&jumper_ezpad_6_pro_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
			DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
			DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
			/* Above matches are too generic, add bios-date match */
			DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"),
		},
	},
1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043
	{
		/* Jumper EZpad 6 Pro B */
		.driver_data = (void *)&jumper_ezpad_6_pro_b_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
			DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
			DMI_MATCH(DMI_BIOS_VERSION, "5.12"),
			/* Above matches are too generic, add bios-date match */
			DMI_MATCH(DMI_BIOS_DATE, "04/24/2018"),
		},
	},
1044 1045 1046 1047 1048 1049 1050 1051 1052 1053
	{
		/* Jumper EZpad 6 m4 */
		.driver_data = (void *)&jumper_ezpad_6_m4_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "jumper"),
			DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
			/* Jumper8.S106x.A00C.1066 with the version dropped */
			DMI_MATCH(DMI_BIOS_VERSION, "Jumper8.S106x"),
		},
	},
1054 1055 1056 1057 1058 1059 1060 1061 1062 1063
	{
		/* Jumper EZpad 7 */
		.driver_data = (void *)&jumper_ezpad_7_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Jumper"),
			DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"),
			/* Jumper12x.WJ2012.bsBKRCP05 with the version dropped */
			DMI_MATCH(DMI_BIOS_VERSION, "Jumper12x.WJ2012.bsBKRCP"),
		},
	},
1064
	{
1065 1066
		/* Jumper EZpad mini3 */
		.driver_data = (void *)&jumper_ezpad_mini3_data,
1067 1068
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
1069 1070
			/* jumperx.T87.KFBNEEA02 with the version-nr dropped */
			DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
1071 1072
		},
	},
1073 1074 1075 1076 1077 1078 1079 1080
	{
		/* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */
		.driver_data = (void *)&trekstor_primebook_c11_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"),
			DMI_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"),
		},
	},
1081 1082 1083 1084 1085 1086 1087 1088
	{
		/* MP Man Converter 9 */
		.driver_data = (void *)&mpman_converter9_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "MPMAN"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Converter9"),
		},
	},
1089 1090 1091 1092 1093 1094 1095 1096
	{
		/* MP Man MPWIN895CL */
		.driver_data = (void *)&mpman_mpwin895cl_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "MPMAN"),
			DMI_MATCH(DMI_PRODUCT_NAME, "MPWIN8900CL"),
		},
	},
1097 1098 1099 1100 1101 1102 1103 1104
	{
		/* Myria MY8307 */
		.driver_data = (void *)&myria_my8307_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Complet Electro Serv"),
			DMI_MATCH(DMI_PRODUCT_NAME, "MY8307"),
		},
	},
1105
	{
1106 1107
		/* Onda oBook 20 Plus */
		.driver_data = (void *)&onda_obook_20_plus_data,
1108
		.matches = {
1109 1110
			DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
			DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
1111 1112
		},
	},
1113 1114 1115 1116 1117 1118 1119 1120
	{
		/* ONDA V80 plus v3 (P80PSBG9V3A01501) */
		.driver_data = (void *)&onda_v80_plus_v3_data,
		.matches = {
			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONDA"),
			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V80 PLUS")
		},
	},
1121 1122 1123 1124 1125 1126 1127 1128
	{
		/* ONDA V820w DualOS */
		.driver_data = (void *)&onda_v820w_32g_data,
		.matches = {
			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS")
		},
	},
1129 1130 1131 1132 1133 1134 1135 1136 1137
	{
		/* ONDA V891 v5 */
		.driver_data = (void *)&onda_v891_v5_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
			DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
			DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D869CJABNRBA06"),
		},
	},
1138
	{
1139 1140
		/* ONDA V891w revision P891WBEBV1B00 aka v1 */
		.driver_data = (void *)&onda_v891w_v1_data,
1141
		.matches = {
1142 1143 1144
			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
			DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"),
			DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"),
1145
			/* Exact match, different versions need different fw */
1146
			DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
1147 1148
		},
	},
1149 1150 1151 1152 1153 1154 1155 1156 1157
	{
		/* ONDA V891w Dual OS P891DCF2V1A01274 64GB */
		.driver_data = (void *)&onda_v891w_v3_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
			DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"),
			DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"),
		},
	},
1158
	{
1159 1160
		/* Pipo W2S */
		.driver_data = (void *)&pipo_w2s_data,
1161
		.matches = {
1162 1163
			DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
1164 1165
		},
	},
1166 1167 1168 1169 1170 1171 1172
	{
		/* Pipo W11 */
		.driver_data = (void *)&pipo_w11_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."),
			/* Above matches are too generic, add bios-ver match */
1173
			DMI_MATCH(DMI_BIOS_VERSION, "JS-BI-10.6-SF133GR300-GA55B-024-F"),
1174 1175
		},
	},
1176 1177
	{
		/* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
1178
		.driver_data = (void *)&trekstor_surftab_wintron70_data,
1179 1180 1181 1182 1183 1184 1185
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"),
			DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"),
			/* Exact match, different versions need different fw */
			DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"),
		},
	},
1186
	{
1187 1188 1189 1190 1191 1192 1193 1194 1195 1196
		/* Point of View mobii wintab p800w (v2.0) */
		.driver_data = (void *)&pov_mobii_wintab_p800w_v20_data,
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
			DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
			DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"),
			/* Above matches are too generic, add bios-date match */
			DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"),
		},
	},
1197 1198 1199 1200 1201 1202 1203 1204 1205 1206
	{
		/* Predia Basic tablet) */
		.driver_data = (void *)&predia_basic_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
			DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
			/* Above matches are too generic, add bios-version match */
			DMI_MATCH(DMI_BIOS_VERSION, "Mx.WT107.KUBNGEA"),
		},
	},
1207 1208 1209
	{
		/* Point of View mobii wintab p800w (v2.1) */
		.driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
1210 1211 1212 1213 1214 1215 1216 1217
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
			DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
			DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"),
			/* Above matches are too generic, add bios-date match */
			DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"),
		},
	},
1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228
	{
		/* Point of View mobii wintab p1006w (v1.0) */
		.driver_data = (void *)&pov_mobii_wintab_p1006w_v10_data,
		.matches = {
			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"),
			/* Note 105b is Foxcon's USB/PCI vendor id */
			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"),
			DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"),
		},
	},
1229 1230 1231 1232 1233 1234 1235 1236
	{
		/* Schneider SCT101CTM */
		.driver_data = (void *)&schneider_sct101ctm_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
			DMI_MATCH(DMI_PRODUCT_NAME, "SCT101CTM"),
		},
	},
1237 1238 1239 1240 1241 1242 1243 1244 1245
	{
		/* Techbite Arc 11.6 */
		.driver_data = (void *)&techbite_arc_11_6_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "mPTech"),
			DMI_MATCH(DMI_PRODUCT_NAME, "techBite Arc 11.6"),
			DMI_MATCH(DMI_BOARD_NAME, "G8316_272B"),
		},
	},
1246
	{
1247 1248
		/* Teclast X3 Plus */
		.driver_data = (void *)&teclast_x3_plus_data,
1249
		.matches = {
1250 1251 1252
			DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
			DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
			DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
1253 1254
		},
	},
1255
	{
1256 1257
		/* Teclast X98 Plus II */
		.driver_data = (void *)&teclast_x98plus2_data,
1258
		.matches = {
1259 1260
			DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
			DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
1261 1262
		},
	},
1263 1264 1265 1266 1267 1268 1269 1270
	{
		/* Trekstor Primebook C11 */
		.driver_data = (void *)&trekstor_primebook_c11_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"),
		},
	},
1271 1272 1273 1274 1275 1276 1277 1278
	{
		/* Trekstor Primebook C11B (same touchscreen as the C11) */
		.driver_data = (void *)&trekstor_primebook_c11_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
			DMI_MATCH(DMI_PRODUCT_NAME, "PRIMEBOOK C11B"),
		},
	},
1279 1280 1281 1282 1283 1284 1285 1286
	{
		/* Trekstor Primebook C13 */
		.driver_data = (void *)&trekstor_primebook_c13_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
		},
	},
1287 1288 1289 1290 1291 1292 1293 1294
	{
		/* Trekstor Primetab T13B */
		.driver_data = (void *)&trekstor_primetab_t13b_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"),
		},
	},
1295
	{
1296 1297
		/* TrekStor SurfTab twin 10.1 ST10432-8 */
		.driver_data = (void *)&trekstor_surftab_twin_10_1_data,
1298
		.matches = {
1299 1300
			DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
			DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
1301 1302
		},
	},
1303
	{
1304 1305
		/* Trekstor Surftab Wintron 7.0 ST70416-6 */
		.driver_data = (void *)&trekstor_surftab_wintron70_data,
1306
		.matches = {
1307 1308 1309 1310
			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
			DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"),
			/* Exact match, different versions need different fw */
			DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"),
1311 1312
		},
	},
1313
	{
1314
		/* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
1315
		.driver_data = (void *)&trekstor_surftab_wintron70_data,
1316
		.matches = {
1317
			DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1318
			DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab wintron 7.0 ST70416-6"),
1319 1320
			/* Exact match, different versions need different fw */
			DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
1321 1322
		},
	},
1323 1324 1325 1326 1327 1328 1329 1330
	{
		/* Trekstor Yourbook C11B (same touchscreen as the Primebook C11) */
		.driver_data = (void *)&trekstor_primebook_c11_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
			DMI_MATCH(DMI_PRODUCT_NAME, "YOURBOOK C11B"),
		},
	},
1331 1332 1333 1334 1335 1336 1337
	{
		/* Vinga Twizzle J116 */
		.driver_data = (void *)&vinga_twizzle_j116_data,
		.matches = {
			DMI_MATCH(DMI_PRODUCT_NAME, "VINGA Twizzle J116"),
		},
	},
1338 1339 1340 1341 1342 1343 1344 1345
	{
		/* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */
		.driver_data = (void *)&chuwi_vi8_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "YOURS"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"),
		},
	},
1346
	{ }
1347 1348
};

1349
static const struct ts_dmi_data *ts_data;
1350

1351
static void ts_dmi_add_props(struct i2c_client *client)
1352
{
1353
	struct device *dev = &client->dev;
1354 1355 1356
	int error;

	if (has_acpi_companion(dev) &&
1357 1358
	    !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
		error = device_add_properties(dev, ts_data->properties);
1359 1360 1361 1362 1363
		if (error)
			dev_err(dev, "failed to add properties: %d\n", error);
	}
}

1364
static int ts_dmi_notifier_call(struct notifier_block *nb,
1365
				unsigned long action, void *data)
1366 1367
{
	struct device *dev = data;
1368
	struct i2c_client *client;
1369 1370 1371

	switch (action) {
	case BUS_NOTIFY_ADD_DEVICE:
1372 1373
		client = i2c_verify_client(dev);
		if (client)
1374
			ts_dmi_add_props(client);
1375 1376 1377 1378 1379 1380 1381 1382 1383
		break;

	default:
		break;
	}

	return 0;
}

1384 1385
static struct notifier_block ts_dmi_notifier = {
	.notifier_call = ts_dmi_notifier_call,
1386 1387
};

1388
static int __init ts_dmi_init(void)
1389
{
1390
	const struct dmi_system_id *dmi_id;
1391 1392
	int error;

1393
	dmi_id = dmi_first_match(touchscreen_dmi_table);
1394 1395 1396
	if (!dmi_id)
		return 0; /* Not an error */

1397
	ts_data = dmi_id->driver_data;
1398 1399 1400
	/* Some dmi table entries only provide an efi_embedded_fw_desc */
	if (!ts_data->properties)
		return 0;
1401

1402
	error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414
	if (error)
		pr_err("%s: failed to register i2c bus notifier: %d\n",
			__func__, error);

	return error;
}

/*
 * We are registering out notifier after i2c core is initialized and i2c bus
 * itself is ready (which happens at postcore initcall level), but before
 * ACPI starts enumerating devices (at subsys initcall level).
 */
1415
arch_initcall(ts_dmi_init);