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