touchscreen_dmi.c 38.3 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
static const struct property_entry gp_electronic_t701_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 960),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 640),
269 270
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
271
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-gp-electronic-t701.fw"),
272 273 274
	{ }
};

275
static const struct ts_dmi_data gp_electronic_t701_data = {
276 277 278 279
	.acpi_name	= "MSSL1680:00",
	.properties	= gp_electronic_t701_props,
};

280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297
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,
};

298
static const struct property_entry itworks_tw891_props[] = {
299 300
	PROPERTY_ENTRY_U32("touchscreen-min-x", 1),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 5),
301
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1600),
302
	PROPERTY_ENTRY_U32("touchscreen-size-y", 896),
303
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
304
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
305
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"),
306
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
307 308 309
	{ }
};

310
static const struct ts_dmi_data itworks_tw891_data = {
311
	.acpi_name	= "MSSL1680:00",
312
	.properties	= itworks_tw891_props,
313 314
};

315 316 317 318
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"),
319 320 321 322 323
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

324
static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
325
	.acpi_name	= "MSSL1680:00",
326
	.properties	= jumper_ezpad_6_pro_props,
327 328
};

329 330 331 332 333 334 335 336 337 338 339 340 341 342 343
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,
};

344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359
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,
};

360
static const struct property_entry jumper_ezpad_mini3_props[] = {
361 362
	PROPERTY_ENTRY_U32("touchscreen-min-x", 23),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 16),
363
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1700),
364
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1138),
365
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
366 367
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
368 369 370
	{ }
};

371
static const struct ts_dmi_data jumper_ezpad_mini3_data = {
372
	.acpi_name	= "MSSL1680:00",
373
	.properties	= jumper_ezpad_mini3_props,
374 375
};

376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
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,
};

393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409
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,
};

410
static const struct property_entry onda_obook_20_plus_props[] = {
411 412
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1728),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1148),
413 414
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"),
415
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
416 417
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"),
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
418
	PROPERTY_ENTRY_BOOL("silead,home-button"),
419 420 421
	{ }
};

422
static const struct ts_dmi_data onda_obook_20_plus_data = {
423
	.acpi_name	= "MSSL1680:00",
424
	.properties	= onda_obook_20_plus_props,
425 426
};

427 428 429 430 431 432
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"),
433
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v80-plus-v3.fw"),
434 435 436 437 438 439
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

static const struct ts_dmi_data onda_v80_plus_v3_data = {
440 441 442 443 444 445 446 447 448
	.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 },
	},
449 450 451 452
	.acpi_name	= "MSSL1680:00",
	.properties	= onda_v80_plus_v3_props,
};

453 454 455 456
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"),
457
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-onda-v820w-32g.fw"),
458 459 460 461 462 463 464 465 466 467
	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,
};

468 469 470 471 472
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),
473
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-onda-v891w-v1.fw"),
474 475 476 477 478
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

479
static const struct ts_dmi_data onda_v891w_v1_data = {
480
	.acpi_name	= "MSSL1680:00",
481
	.properties	= onda_v891w_v1_props,
482 483
};

484 485 486 487 488 489
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"),
490
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-v891w-v3.fw"),
491 492 493 494 495 496 497 498 499 500
	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,
};

501 502 503
static const struct property_entry pipo_w2s_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1660),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 880),
504 505
	PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"),
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
506
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w2s.fw"),
507 508 509
	{ }
};

510
static const struct ts_dmi_data pipo_w2s_data = {
511 512 513 514 515 516 517 518 519
	.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 },
	},
520
	.acpi_name	= "MSSL1680:00",
521
	.properties	= pipo_w2s_props,
522 523
};

524 525 526 527 528
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),
529
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-pipo-w11.fw"),
530 531 532 533 534 535 536 537 538 539
	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,
};

540 541 542 543 544
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),
545
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
546
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-pov-mobii-wintab-p800w-v20.fw"),
547
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
548 549 550 551
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

552
static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
553 554
	.acpi_name	= "MSSL1680:00",
	.properties	= pov_mobii_wintab_p800w_v20_props,
555 556
};

557
static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
558 559 560 561
	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),
562
	PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"),
563
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p800w.fw"),
564
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
565 566 567 568
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

569
static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
570 571
	.acpi_name	= "MSSL1680:00",
	.properties	= pov_mobii_wintab_p800w_v21_props,
572 573
};

574 575 576 577 578 579
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"),
580
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-pov-mobii-wintab-p1006w-v10.fw"),
581 582 583 584 585 586 587 588 589 590
	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,
};

591 592 593 594 595 596
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"),
597
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-schneider-sct101ctm.fw"),
598 599 600 601 602 603 604 605 606 607
	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,
};

608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623
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,
};

624 625 626 627
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"),
628 629 630 631 632
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

633
static const struct ts_dmi_data teclast_x3_plus_data = {
634
	.acpi_name	= "MSSL1680:00",
635
	.properties	= teclast_x3_plus_props,
636 637
};

638 639 640 641 642
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"),
643
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-teclast_x98plus2.fw"),
644 645 646 647
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	{ }
};

648
static const struct ts_dmi_data teclast_x98plus2_data = {
649 650 651 652
	.acpi_name	= "MSSL1680:00",
	.properties	= teclast_x98plus2_props,
};

653 654 655 656
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"),
657
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c11.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 trekstor_primebook_c11_data = {
	.acpi_name	= "MSSL1680:00",
	.properties	= trekstor_primebook_c11_props,
};

668 669 670
static const struct property_entry trekstor_primebook_c13_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 2624),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1920),
671
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primebook-c13.fw"),
672 673 674 675 676
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

677
static const struct ts_dmi_data trekstor_primebook_c13_data = {
678
	.acpi_name	= "MSSL1680:00",
679
	.properties	= trekstor_primebook_c13_props,
680 681
};

682 683 684
static const struct property_entry trekstor_primetab_t13b_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 2500),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1900),
685
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-trekstor-primetab-t13b.fw"),
686 687 688 689 690 691 692 693 694 695 696
	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,
};

697 698 699 700
static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
	PROPERTY_ENTRY_U32("touchscreen-size-x", 1900),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
	PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1),
701
	PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-surftab-twin-10-1-st10432-8.fw"),
702 703 704 705
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	{ }
};

706
static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
707 708 709 710 711
	.acpi_name	= "MSSL1680:00",
	.properties	= trekstor_surftab_twin_10_1_props,
};

static const struct property_entry trekstor_surftab_wintron70_props[] = {
712 713
	PROPERTY_ENTRY_U32("touchscreen-min-x", 12),
	PROPERTY_ENTRY_U32("touchscreen-min-y", 8),
714 715
	PROPERTY_ENTRY_U32("touchscreen-size-x", 884),
	PROPERTY_ENTRY_U32("touchscreen-size-y", 632),
716
	PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-surftab-wintron70-st70416-6.fw"),
717 718 719 720 721
	PROPERTY_ENTRY_U32("silead,max-fingers", 10),
	PROPERTY_ENTRY_BOOL("silead,home-button"),
	{ }
};

722
static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
723
	.acpi_name	= "MSSL1680:00",
724
	.properties	= trekstor_surftab_wintron70_props,
725 726
};

727
/* NOTE: Please keep this table sorted alphabetically */
728
const struct dmi_system_id touchscreen_dmi_table[] = {
729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745
	{
		/* 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"),
		},
	},
746 747 748 749 750 751 752 753 754
	{
		/* 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"),
		},
	},
755 756 757 758 759 760 761 762
	{
		/* 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"),
		},
	},
763 764 765 766
	{
		/* Chuwi Hi10 Air */
		.driver_data = (void *)&chuwi_hi10_air_data,
		.matches = {
767 768
			DMI_MATCH(DMI_SYS_VENDOR, "CHUWI INNOVATION AND TECHNOLOGY(SHENZHEN)CO.LTD"),
			DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
769 770 771
			DMI_MATCH(DMI_PRODUCT_SKU, "P1W6_C109D_B"),
		},
	},
772 773 774 775 776 777 778 779 780
	{
		/* 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"),
		},
	},
781 782 783 784 785 786 787 788 789
	{
		/* 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"),
		},
	},
790 791 792 793 794 795 796 797 798
	{
		/* 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"),
		},
	},
799 800 801 802 803 804 805 806 807 808
	{
		/* 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"),
		},
	},
809 810 811 812 813 814 815 816
	{
		/* 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"),
		},
	},
817 818 819 820 821 822 823 824
	{
		/* Connect Tablet 9 */
		.driver_data = (void *)&connect_tablet9_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Connect"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"),
		},
	},
825 826 827 828 829 830 831 832 833
	{
		/* 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"),
		},
	},
834 835 836 837 838 839 840 841 842 843
	{
		/* 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"),
		},
	},
844
	{
845 846
		/* DEXP Ursus 7W */
		.driver_data = (void *)&dexp_ursus_7w_data,
847 848
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878
			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"),
		},
	},
	{
		/* 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"),
		},
	},
879 880 881 882 883 884 885 886
	{
		/* Irbis TW90 */
		.driver_data = (void *)&irbis_tw90_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "IRBIS"),
			DMI_MATCH(DMI_PRODUCT_NAME, "TW90"),
		},
	},
887 888 889 890 891 892
	{
		/* 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"),
893 894
		},
	},
895 896 897 898 899 900 901 902 903 904 905
	{
		/* 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"),
		},
	},
906 907 908 909 910 911 912 913 914 915 916
	{
		/* 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"),
		},
	},
917 918 919 920 921 922 923 924 925 926
	{
		/* 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"),
		},
	},
927
	{
928 929
		/* Jumper EZpad mini3 */
		.driver_data = (void *)&jumper_ezpad_mini3_data,
930 931
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
932 933
			/* jumperx.T87.KFBNEEA02 with the version-nr dropped */
			DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"),
934 935
		},
	},
936 937 938 939 940 941 942 943
	{
		/* 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"),
		},
	},
944 945 946 947 948 949 950 951
	{
		/* MP Man MPWIN895CL */
		.driver_data = (void *)&mpman_mpwin895cl_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "MPMAN"),
			DMI_MATCH(DMI_PRODUCT_NAME, "MPWIN8900CL"),
		},
	},
952 953 954 955 956 957 958 959
	{
		/* Myria MY8307 */
		.driver_data = (void *)&myria_my8307_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Complet Electro Serv"),
			DMI_MATCH(DMI_PRODUCT_NAME, "MY8307"),
		},
	},
960
	{
961 962
		/* Onda oBook 20 Plus */
		.driver_data = (void *)&onda_obook_20_plus_data,
963
		.matches = {
964 965
			DMI_MATCH(DMI_SYS_VENDOR, "ONDA"),
			DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"),
966 967
		},
	},
968 969 970 971 972 973 974 975
	{
		/* 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")
		},
	},
976 977 978 979 980 981 982 983
	{
		/* 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")
		},
	},
984
	{
985 986
		/* ONDA V891w revision P891WBEBV1B00 aka v1 */
		.driver_data = (void *)&onda_v891w_v1_data,
987
		.matches = {
988 989 990
			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"),
			DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"),
			DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"),
991
			/* Exact match, different versions need different fw */
992
			DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"),
993 994
		},
	},
995 996 997 998 999 1000 1001 1002 1003
	{
		/* 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"),
		},
	},
1004
	{
1005 1006
		/* Pipo W2S */
		.driver_data = (void *)&pipo_w2s_data,
1007
		.matches = {
1008 1009
			DMI_MATCH(DMI_SYS_VENDOR, "PIPO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "W2S"),
1010 1011
		},
	},
1012 1013 1014 1015 1016 1017 1018
	{
		/* 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 */
1019
			DMI_MATCH(DMI_BIOS_VERSION, "JS-BI-10.6-SF133GR300-GA55B-024-F"),
1020 1021
		},
	},
1022 1023
	{
		/* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */
1024
		.driver_data = (void *)&trekstor_surftab_wintron70_data,
1025 1026 1027 1028 1029 1030 1031
		.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"),
		},
	},
1032
	{
1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045
		/* 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"),
		},
	},
	{
		/* Point of View mobii wintab p800w (v2.1) */
		.driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
1046 1047 1048 1049 1050 1051 1052 1053
		.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"),
		},
	},
1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064
	{
		/* 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"),
		},
	},
1065 1066 1067 1068 1069 1070 1071 1072
	{
		/* Schneider SCT101CTM */
		.driver_data = (void *)&schneider_sct101ctm_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Default string"),
			DMI_MATCH(DMI_PRODUCT_NAME, "SCT101CTM"),
		},
	},
1073 1074 1075 1076 1077 1078 1079 1080 1081
	{
		/* 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"),
		},
	},
1082
	{
1083 1084
		/* Teclast X3 Plus */
		.driver_data = (void *)&teclast_x3_plus_data,
1085
		.matches = {
1086 1087 1088
			DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
			DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"),
			DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"),
1089 1090
		},
	},
1091
	{
1092 1093
		/* Teclast X98 Plus II */
		.driver_data = (void *)&teclast_x98plus2_data,
1094
		.matches = {
1095 1096
			DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"),
			DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"),
1097 1098
		},
	},
1099 1100 1101 1102 1103 1104 1105 1106
	{
		/* Trekstor Primebook C11 */
		.driver_data = (void *)&trekstor_primebook_c11_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"),
		},
	},
1107 1108 1109 1110 1111 1112 1113 1114
	{
		/* 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"),
		},
	},
1115 1116 1117 1118 1119 1120 1121 1122
	{
		/* Trekstor Primebook C13 */
		.driver_data = (void *)&trekstor_primebook_c13_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"),
		},
	},
1123 1124 1125 1126 1127 1128 1129 1130
	{
		/* Trekstor Primetab T13B */
		.driver_data = (void *)&trekstor_primetab_t13b_data,
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"),
			DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"),
		},
	},
1131
	{
1132 1133
		/* TrekStor SurfTab twin 10.1 ST10432-8 */
		.driver_data = (void *)&trekstor_surftab_twin_10_1_data,
1134
		.matches = {
1135 1136
			DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
			DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"),
1137 1138
		},
	},
1139
	{
1140 1141
		/* Trekstor Surftab Wintron 7.0 ST70416-6 */
		.driver_data = (void *)&trekstor_surftab_wintron70_data,
1142
		.matches = {
1143 1144 1145 1146
			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"),
1147 1148
		},
	},
1149
	{
1150
		/* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */
1151
		.driver_data = (void *)&trekstor_surftab_wintron70_data,
1152
		.matches = {
1153
			DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"),
1154
			DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab wintron 7.0 ST70416-6"),
1155 1156
			/* Exact match, different versions need different fw */
			DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"),
1157 1158
		},
	},
1159 1160 1161 1162 1163 1164 1165 1166
	{
		/* 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"),
		},
	},
1167 1168 1169
	{ },
};

1170
static const struct ts_dmi_data *ts_data;
1171

1172
static void ts_dmi_add_props(struct i2c_client *client)
1173
{
1174
	struct device *dev = &client->dev;
1175 1176 1177
	int error;

	if (has_acpi_companion(dev) &&
1178 1179
	    !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
		error = device_add_properties(dev, ts_data->properties);
1180 1181 1182 1183 1184
		if (error)
			dev_err(dev, "failed to add properties: %d\n", error);
	}
}

1185
static int ts_dmi_notifier_call(struct notifier_block *nb,
1186
				unsigned long action, void *data)
1187 1188
{
	struct device *dev = data;
1189
	struct i2c_client *client;
1190 1191 1192

	switch (action) {
	case BUS_NOTIFY_ADD_DEVICE:
1193 1194
		client = i2c_verify_client(dev);
		if (client)
1195
			ts_dmi_add_props(client);
1196 1197 1198 1199 1200 1201 1202 1203 1204
		break;

	default:
		break;
	}

	return 0;
}

1205 1206
static struct notifier_block ts_dmi_notifier = {
	.notifier_call = ts_dmi_notifier_call,
1207 1208
};

1209
static int __init ts_dmi_init(void)
1210
{
1211
	const struct dmi_system_id *dmi_id;
1212 1213
	int error;

1214
	dmi_id = dmi_first_match(touchscreen_dmi_table);
1215 1216 1217
	if (!dmi_id)
		return 0; /* Not an error */

1218
	ts_data = dmi_id->driver_data;
1219 1220 1221
	/* Some dmi table entries only provide an efi_embedded_fw_desc */
	if (!ts_data->properties)
		return 0;
1222

1223
	error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235
	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).
 */
1236
arch_initcall(ts_dmi_init);