Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 1 | /* |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 2 | * Touchscreen driver DMI based configuration code |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 3 | * |
| 4 | * Copyright (c) 2017 Red Hat Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * Red Hat authors: |
| 12 | * Hans de Goede <hdegoede@redhat.com> |
| 13 | */ |
| 14 | |
| 15 | #include <linux/acpi.h> |
| 16 | #include <linux/device.h> |
| 17 | #include <linux/dmi.h> |
| 18 | #include <linux/i2c.h> |
| 19 | #include <linux/notifier.h> |
| 20 | #include <linux/property.h> |
| 21 | #include <linux/string.h> |
| 22 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 23 | struct ts_dmi_data { |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 24 | const char *acpi_name; |
Hans de Goede | ae31115 | 2017-03-22 16:55:53 +0100 | [diff] [blame] | 25 | const struct property_entry *properties; |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 26 | }; |
| 27 | |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 28 | /* NOTE: Please keep all entries sorted alphabetically */ |
| 29 | |
| 30 | static const struct property_entry chuwi_hi8_props[] = { |
| 31 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1665), |
| 32 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1140), |
| 33 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
| 34 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 35 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-chuwi-hi8.fw"), |
| 36 | { } |
| 37 | }; |
| 38 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 39 | static const struct ts_dmi_data chuwi_hi8_data = { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 40 | .acpi_name = "MSSL0001:00", |
| 41 | .properties = chuwi_hi8_props, |
| 42 | }; |
| 43 | |
| 44 | static const struct property_entry chuwi_hi8_pro_props[] = { |
Hans de Goede | 4104916 | 2018-10-20 12:21:00 +0200 | [diff] [blame] | 45 | PROPERTY_ENTRY_U32("touchscreen-min-x", 6), |
| 46 | PROPERTY_ENTRY_U32("touchscreen-min-y", 3), |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 47 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1728), |
| 48 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1148), |
| 49 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
| 50 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-hi8-pro.fw"), |
Hans de Goede | 4104916 | 2018-10-20 12:21:00 +0200 | [diff] [blame] | 51 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 52 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 53 | { } |
| 54 | }; |
| 55 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 56 | static const struct ts_dmi_data chuwi_hi8_pro_data = { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 57 | .acpi_name = "MSSL1680:00", |
| 58 | .properties = chuwi_hi8_pro_props, |
| 59 | }; |
| 60 | |
| 61 | static const struct property_entry chuwi_vi8_props[] = { |
Hans de Goede | 4104916 | 2018-10-20 12:21:00 +0200 | [diff] [blame] | 62 | PROPERTY_ENTRY_U32("touchscreen-min-x", 4), |
| 63 | PROPERTY_ENTRY_U32("touchscreen-min-y", 6), |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 64 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1724), |
| 65 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1140), |
| 66 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
| 67 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-chuwi-vi8.fw"), |
| 68 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 69 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 70 | { } |
| 71 | }; |
| 72 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 73 | static const struct ts_dmi_data chuwi_vi8_data = { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 74 | .acpi_name = "MSSL1680:00", |
| 75 | .properties = chuwi_vi8_props, |
| 76 | }; |
| 77 | |
Hans de Goede | b4c8681 | 2018-06-08 23:45:57 +0200 | [diff] [blame] | 78 | static const struct property_entry chuwi_vi10_props[] = { |
| 79 | PROPERTY_ENTRY_U32("touchscreen-min-x", 0), |
| 80 | PROPERTY_ENTRY_U32("touchscreen-min-y", 4), |
| 81 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1858), |
| 82 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1280), |
| 83 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3680-chuwi-vi10.fw"), |
| 84 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 85 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 86 | { } |
| 87 | }; |
| 88 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 89 | static const struct ts_dmi_data chuwi_vi10_data = { |
Hans de Goede | b4c8681 | 2018-06-08 23:45:57 +0200 | [diff] [blame] | 90 | .acpi_name = "MSSL0002:00", |
| 91 | .properties = chuwi_vi10_props, |
| 92 | }; |
| 93 | |
Hans de Goede | c72d95e | 2018-07-01 11:32:56 +0200 | [diff] [blame] | 94 | static const struct property_entry connect_tablet9_props[] = { |
| 95 | PROPERTY_ENTRY_U32("touchscreen-min-x", 9), |
Hans de Goede | 4104916 | 2018-10-20 12:21:00 +0200 | [diff] [blame] | 96 | PROPERTY_ENTRY_U32("touchscreen-min-y", 10), |
Hans de Goede | c72d95e | 2018-07-01 11:32:56 +0200 | [diff] [blame] | 97 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1664), |
Hans de Goede | 4104916 | 2018-10-20 12:21:00 +0200 | [diff] [blame] | 98 | PROPERTY_ENTRY_U32("touchscreen-size-y", 880), |
Hans de Goede | c72d95e | 2018-07-01 11:32:56 +0200 | [diff] [blame] | 99 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), |
| 100 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
| 101 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-connect-tablet9.fw"), |
| 102 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 103 | { } |
| 104 | }; |
| 105 | |
| 106 | static const struct ts_dmi_data connect_tablet9_data = { |
| 107 | .acpi_name = "MSSL1680:00", |
| 108 | .properties = connect_tablet9_props, |
| 109 | }; |
| 110 | |
Hans de Goede | ae31115 | 2017-03-22 16:55:53 +0100 | [diff] [blame] | 111 | static const struct property_entry cube_iwork8_air_props[] = { |
Hans de Goede | 4104916 | 2018-10-20 12:21:00 +0200 | [diff] [blame] | 112 | PROPERTY_ENTRY_U32("touchscreen-min-x", 1), |
| 113 | PROPERTY_ENTRY_U32("touchscreen-min-y", 3), |
| 114 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1664), |
| 115 | PROPERTY_ENTRY_U32("touchscreen-size-y", 896), |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 116 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
| 117 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-cube-iwork8-air.fw"), |
| 118 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 119 | { } |
| 120 | }; |
| 121 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 122 | static const struct ts_dmi_data cube_iwork8_air_data = { |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 123 | .acpi_name = "MSSL1680:00", |
| 124 | .properties = cube_iwork8_air_props, |
| 125 | }; |
| 126 | |
youling257 | cda5915 | 2018-07-31 17:32:56 +0800 | [diff] [blame] | 127 | static const struct property_entry cube_knote_i1101_props[] = { |
| 128 | PROPERTY_ENTRY_U32("touchscreen-min-x", 20), |
| 129 | PROPERTY_ENTRY_U32("touchscreen-min-y", 22), |
| 130 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1961), |
| 131 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1513), |
| 132 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-cube-knote-i1101.fw"), |
| 133 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 134 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 135 | { } |
| 136 | }; |
| 137 | |
| 138 | static const struct ts_dmi_data cube_knote_i1101_data = { |
| 139 | .acpi_name = "MSSL1680:00", |
| 140 | .properties = cube_knote_i1101_props, |
| 141 | }; |
| 142 | |
Hans de Goede | 6b8e7d8 | 2017-03-22 16:55:54 +0100 | [diff] [blame] | 143 | static const struct property_entry dexp_ursus_7w_props[] = { |
| 144 | PROPERTY_ENTRY_U32("touchscreen-size-x", 890), |
| 145 | PROPERTY_ENTRY_U32("touchscreen-size-y", 630), |
| 146 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1686-dexp-ursus-7w.fw"), |
| 147 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
Hans de Goede | aaa4096 | 2017-10-19 09:17:28 +0200 | [diff] [blame] | 148 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
Hans de Goede | 6b8e7d8 | 2017-03-22 16:55:54 +0100 | [diff] [blame] | 149 | { } |
| 150 | }; |
| 151 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 152 | static const struct ts_dmi_data dexp_ursus_7w_data = { |
Hans de Goede | 6b8e7d8 | 2017-03-22 16:55:54 +0100 | [diff] [blame] | 153 | .acpi_name = "MSSL1680:00", |
| 154 | .properties = dexp_ursus_7w_props, |
| 155 | }; |
| 156 | |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 157 | static const struct property_entry digma_citi_e200_props[] = { |
| 158 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1980), |
| 159 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1500), |
| 160 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), |
Bernhard Übelacker | f4c12d4 | 2017-11-26 19:32:58 +0100 | [diff] [blame] | 161 | PROPERTY_ENTRY_STRING("firmware-name", |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 162 | "gsl1686-digma_citi_e200.fw"), |
Hans de Goede | 5b7bb3a | 2017-04-09 11:07:44 +0200 | [diff] [blame] | 163 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
Hans de Goede | aaa4096 | 2017-10-19 09:17:28 +0200 | [diff] [blame] | 164 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
Hans de Goede | 5b7bb3a | 2017-04-09 11:07:44 +0200 | [diff] [blame] | 165 | { } |
| 166 | }; |
| 167 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 168 | static const struct ts_dmi_data digma_citi_e200_data = { |
Hans de Goede | 5b7bb3a | 2017-04-09 11:07:44 +0200 | [diff] [blame] | 169 | .acpi_name = "MSSL1680:00", |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 170 | .properties = digma_citi_e200_props, |
Hans de Goede | 5b7bb3a | 2017-04-09 11:07:44 +0200 | [diff] [blame] | 171 | }; |
| 172 | |
Hans de Goede | d9ca30b | 2017-05-07 14:35:15 +0200 | [diff] [blame] | 173 | static const struct property_entry gp_electronic_t701_props[] = { |
| 174 | PROPERTY_ENTRY_U32("touchscreen-size-x", 960), |
| 175 | PROPERTY_ENTRY_U32("touchscreen-size-y", 640), |
Hans de Goede | 5c24c05 | 2017-10-19 09:44:14 +0200 | [diff] [blame] | 176 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"), |
| 177 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), |
Hans de Goede | d9ca30b | 2017-05-07 14:35:15 +0200 | [diff] [blame] | 178 | PROPERTY_ENTRY_STRING("firmware-name", |
| 179 | "gsl1680-gp-electronic-t701.fw"), |
| 180 | { } |
| 181 | }; |
| 182 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 183 | static const struct ts_dmi_data gp_electronic_t701_data = { |
Hans de Goede | d9ca30b | 2017-05-07 14:35:15 +0200 | [diff] [blame] | 184 | .acpi_name = "MSSL1680:00", |
| 185 | .properties = gp_electronic_t701_props, |
| 186 | }; |
| 187 | |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 188 | static const struct property_entry itworks_tw891_props[] = { |
Hans de Goede | 4104916 | 2018-10-20 12:21:00 +0200 | [diff] [blame] | 189 | PROPERTY_ENTRY_U32("touchscreen-min-x", 1), |
| 190 | PROPERTY_ENTRY_U32("touchscreen-min-y", 5), |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 191 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1600), |
Hans de Goede | 4104916 | 2018-10-20 12:21:00 +0200 | [diff] [blame] | 192 | PROPERTY_ENTRY_U32("touchscreen-size-y", 896), |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 193 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), |
| 194 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
| 195 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3670-itworks-tw891.fw"), |
Hans de Goede | 4104916 | 2018-10-20 12:21:00 +0200 | [diff] [blame] | 196 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 197 | { } |
| 198 | }; |
| 199 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 200 | static const struct ts_dmi_data itworks_tw891_data = { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 201 | .acpi_name = "MSSL1680:00", |
| 202 | .properties = itworks_tw891_props, |
| 203 | }; |
| 204 | |
| 205 | static const struct property_entry jumper_ezpad_6_pro_props[] = { |
| 206 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1980), |
| 207 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1500), |
| 208 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3692-jumper-ezpad-6-pro.fw"), |
| 209 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 210 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 211 | { } |
| 212 | }; |
| 213 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 214 | static const struct ts_dmi_data jumper_ezpad_6_pro_data = { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 215 | .acpi_name = "MSSL1680:00", |
| 216 | .properties = jumper_ezpad_6_pro_props, |
| 217 | }; |
| 218 | |
| 219 | static const struct property_entry jumper_ezpad_mini3_props[] = { |
Hans de Goede | 4104916 | 2018-10-20 12:21:00 +0200 | [diff] [blame] | 220 | PROPERTY_ENTRY_U32("touchscreen-min-x", 23), |
| 221 | PROPERTY_ENTRY_U32("touchscreen-min-y", 16), |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 222 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1700), |
Hans de Goede | 4104916 | 2018-10-20 12:21:00 +0200 | [diff] [blame] | 223 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1138), |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 224 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
| 225 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-jumper-ezpad-mini3.fw"), |
| 226 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 227 | { } |
| 228 | }; |
| 229 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 230 | static const struct ts_dmi_data jumper_ezpad_mini3_data = { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 231 | .acpi_name = "MSSL1680:00", |
| 232 | .properties = jumper_ezpad_mini3_props, |
| 233 | }; |
| 234 | |
| 235 | static const struct property_entry onda_obook_20_plus_props[] = { |
| 236 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1728), |
| 237 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1148), |
| 238 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"), |
| 239 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), |
| 240 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
| 241 | PROPERTY_ENTRY_STRING("firmware-name", "gsl3676-onda-obook-20-plus.fw"), |
| 242 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 243 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 244 | { } |
| 245 | }; |
| 246 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 247 | static const struct ts_dmi_data onda_obook_20_plus_data = { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 248 | .acpi_name = "MSSL1680:00", |
| 249 | .properties = onda_obook_20_plus_props, |
| 250 | }; |
| 251 | |
Hans de Goede | 01b6b7e | 2018-10-10 15:16:40 +0200 | [diff] [blame] | 252 | static const struct property_entry onda_v80_plus_v3_props[] = { |
| 253 | PROPERTY_ENTRY_U32("touchscreen-min-x", 22), |
| 254 | PROPERTY_ENTRY_U32("touchscreen-min-y", 15), |
| 255 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1698), |
| 256 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1140), |
| 257 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
| 258 | PROPERTY_ENTRY_STRING("firmware-name", |
| 259 | "gsl3676-onda-v80-plus-v3.fw"), |
| 260 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 261 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 262 | { } |
| 263 | }; |
| 264 | |
| 265 | static const struct ts_dmi_data onda_v80_plus_v3_data = { |
| 266 | .acpi_name = "MSSL1680:00", |
| 267 | .properties = onda_v80_plus_v3_props, |
| 268 | }; |
| 269 | |
Jun Bo Bi | ee08f57 | 2018-07-01 17:47:14 -0400 | [diff] [blame] | 270 | static const struct property_entry onda_v820w_32g_props[] = { |
| 271 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1665), |
| 272 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1140), |
| 273 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
| 274 | PROPERTY_ENTRY_STRING("firmware-name", |
| 275 | "gsl1680-onda-v820w-32g.fw"), |
| 276 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 277 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 278 | { } |
| 279 | }; |
| 280 | |
| 281 | static const struct ts_dmi_data onda_v820w_32g_data = { |
| 282 | .acpi_name = "MSSL1680:00", |
| 283 | .properties = onda_v820w_32g_props, |
| 284 | }; |
| 285 | |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 286 | static const struct property_entry onda_v891w_v1_props[] = { |
| 287 | PROPERTY_ENTRY_U32("touchscreen-min-x", 46), |
| 288 | PROPERTY_ENTRY_U32("touchscreen-min-y", 8), |
| 289 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1676), |
| 290 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1130), |
| 291 | PROPERTY_ENTRY_STRING("firmware-name", |
| 292 | "gsl3680-onda-v891w-v1.fw"), |
| 293 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 294 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 295 | { } |
| 296 | }; |
| 297 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 298 | static const struct ts_dmi_data onda_v891w_v1_data = { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 299 | .acpi_name = "MSSL1680:00", |
| 300 | .properties = onda_v891w_v1_props, |
| 301 | }; |
| 302 | |
youling257 | c0d7308 | 2018-06-18 15:11:44 +0200 | [diff] [blame] | 303 | static const struct property_entry onda_v891w_v3_props[] = { |
| 304 | PROPERTY_ENTRY_U32("touchscreen-min-x", 35), |
| 305 | PROPERTY_ENTRY_U32("touchscreen-min-y", 15), |
| 306 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1625), |
| 307 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1135), |
| 308 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), |
| 309 | PROPERTY_ENTRY_STRING("firmware-name", |
| 310 | "gsl3676-onda-v891w-v3.fw"), |
| 311 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 312 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 313 | { } |
| 314 | }; |
| 315 | |
| 316 | static const struct ts_dmi_data onda_v891w_v3_data = { |
| 317 | .acpi_name = "MSSL1680:00", |
| 318 | .properties = onda_v891w_v3_props, |
| 319 | }; |
| 320 | |
Hans de Goede | 13fadfa | 2017-06-15 08:48:32 +0200 | [diff] [blame] | 321 | static const struct property_entry pipo_w2s_props[] = { |
| 322 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1660), |
| 323 | PROPERTY_ENTRY_U32("touchscreen-size-y", 880), |
| 324 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"), |
| 325 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
| 326 | PROPERTY_ENTRY_STRING("firmware-name", |
| 327 | "gsl1680-pipo-w2s.fw"), |
| 328 | { } |
| 329 | }; |
| 330 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 331 | static const struct ts_dmi_data pipo_w2s_data = { |
Hans de Goede | 13fadfa | 2017-06-15 08:48:32 +0200 | [diff] [blame] | 332 | .acpi_name = "MSSL1680:00", |
| 333 | .properties = pipo_w2s_props, |
| 334 | }; |
| 335 | |
Hans de Goede | 3cd33db | 2018-05-30 12:43:40 +0200 | [diff] [blame] | 336 | static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = { |
| 337 | PROPERTY_ENTRY_U32("touchscreen-min-x", 32), |
| 338 | PROPERTY_ENTRY_U32("touchscreen-min-y", 16), |
| 339 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1692), |
| 340 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1146), |
| 341 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
| 342 | PROPERTY_ENTRY_STRING("firmware-name", |
| 343 | "gsl3680-pov-mobii-wintab-p800w-v20.fw"), |
| 344 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 345 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 346 | { } |
| 347 | }; |
| 348 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 349 | static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = { |
Hans de Goede | 3cd33db | 2018-05-30 12:43:40 +0200 | [diff] [blame] | 350 | .acpi_name = "MSSL1680:00", |
| 351 | .properties = pov_mobii_wintab_p800w_v20_props, |
| 352 | }; |
| 353 | |
| 354 | static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = { |
Hans de Goede | 4104916 | 2018-10-20 12:21:00 +0200 | [diff] [blame] | 355 | PROPERTY_ENTRY_U32("touchscreen-min-x", 1), |
| 356 | PROPERTY_ENTRY_U32("touchscreen-min-y", 8), |
| 357 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1794), |
| 358 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1148), |
Hans de Goede | f4d342c | 2017-06-15 08:48:31 +0200 | [diff] [blame] | 359 | PROPERTY_ENTRY_BOOL("touchscreen-swapped-x-y"), |
| 360 | PROPERTY_ENTRY_STRING("firmware-name", |
| 361 | "gsl3692-pov-mobii-wintab-p800w.fw"), |
Hans de Goede | 4104916 | 2018-10-20 12:21:00 +0200 | [diff] [blame] | 362 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
Hans de Goede | aaa4096 | 2017-10-19 09:17:28 +0200 | [diff] [blame] | 363 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
Hans de Goede | f4d342c | 2017-06-15 08:48:31 +0200 | [diff] [blame] | 364 | { } |
| 365 | }; |
| 366 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 367 | static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = { |
Hans de Goede | f4d342c | 2017-06-15 08:48:31 +0200 | [diff] [blame] | 368 | .acpi_name = "MSSL1680:00", |
Hans de Goede | 3cd33db | 2018-05-30 12:43:40 +0200 | [diff] [blame] | 369 | .properties = pov_mobii_wintab_p800w_v21_props, |
Hans de Goede | f4d342c | 2017-06-15 08:48:31 +0200 | [diff] [blame] | 370 | }; |
| 371 | |
Hans de Goede | 8335ebc | 2018-12-20 22:21:50 +0100 | [diff] [blame^] | 372 | static const struct property_entry pov_mobii_wintab_p1006w_v10_props[] = { |
| 373 | PROPERTY_ENTRY_U32("touchscreen-min-x", 1), |
| 374 | PROPERTY_ENTRY_U32("touchscreen-min-y", 3), |
| 375 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1984), |
| 376 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1520), |
| 377 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), |
| 378 | PROPERTY_ENTRY_STRING("firmware-name", |
| 379 | "gsl3692-pov-mobii-wintab-p1006w-v10.fw"), |
| 380 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 381 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 382 | { } |
| 383 | }; |
| 384 | |
| 385 | static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = { |
| 386 | .acpi_name = "MSSL1680:00", |
| 387 | .properties = pov_mobii_wintab_p1006w_v10_props, |
| 388 | }; |
| 389 | |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 390 | static const struct property_entry teclast_x3_plus_props[] = { |
Sergey Tshovrebov | 3fcf2b2 | 2017-10-27 12:27:07 +0200 | [diff] [blame] | 391 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1980), |
| 392 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1500), |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 393 | PROPERTY_ENTRY_STRING("firmware-name", "gsl1680-teclast-x3-plus.fw"), |
Sergey Tshovrebov | 3fcf2b2 | 2017-10-27 12:27:07 +0200 | [diff] [blame] | 394 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 395 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 396 | { } |
| 397 | }; |
| 398 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 399 | static const struct ts_dmi_data teclast_x3_plus_data = { |
Sergey Tshovrebov | 3fcf2b2 | 2017-10-27 12:27:07 +0200 | [diff] [blame] | 400 | .acpi_name = "MSSL1680:00", |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 401 | .properties = teclast_x3_plus_props, |
Hans de Goede | 2aeb2c3 | 2017-12-25 13:45:25 +0100 | [diff] [blame] | 402 | }; |
| 403 | |
Paul Cercueil | a346aa2 | 2018-01-02 19:39:27 +0100 | [diff] [blame] | 404 | static const struct property_entry teclast_x98plus2_props[] = { |
| 405 | PROPERTY_ENTRY_U32("touchscreen-size-x", 2048), |
| 406 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1280), |
| 407 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-x"), |
| 408 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), |
| 409 | PROPERTY_ENTRY_STRING("firmware-name", |
| 410 | "gsl1686-teclast_x98plus2.fw"), |
| 411 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 412 | { } |
| 413 | }; |
| 414 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 415 | static const struct ts_dmi_data teclast_x98plus2_data = { |
Paul Cercueil | a346aa2 | 2018-01-02 19:39:27 +0100 | [diff] [blame] | 416 | .acpi_name = "MSSL1680:00", |
| 417 | .properties = teclast_x98plus2_props, |
| 418 | }; |
| 419 | |
Hans de Goede | cacad0b | 2018-10-04 14:34:45 +0200 | [diff] [blame] | 420 | static const struct property_entry trekstor_primebook_c11_props[] = { |
| 421 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1970), |
| 422 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1530), |
| 423 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), |
| 424 | PROPERTY_ENTRY_STRING("firmware-name", |
| 425 | "gsl1680-trekstor-primebook-c11.fw"), |
| 426 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 427 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 428 | { } |
| 429 | }; |
| 430 | |
| 431 | static const struct ts_dmi_data trekstor_primebook_c11_data = { |
| 432 | .acpi_name = "MSSL1680:00", |
| 433 | .properties = trekstor_primebook_c11_props, |
| 434 | }; |
| 435 | |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 436 | static const struct property_entry trekstor_primebook_c13_props[] = { |
| 437 | PROPERTY_ENTRY_U32("touchscreen-size-x", 2624), |
| 438 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1920), |
Hans de Goede | adf762d | 2018-05-30 12:43:41 +0200 | [diff] [blame] | 439 | PROPERTY_ENTRY_STRING("firmware-name", |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 440 | "gsl1680-trekstor-primebook-c13.fw"), |
Hans de Goede | adf762d | 2018-05-30 12:43:41 +0200 | [diff] [blame] | 441 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 442 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 443 | { } |
| 444 | }; |
| 445 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 446 | static const struct ts_dmi_data trekstor_primebook_c13_data = { |
Hans de Goede | adf762d | 2018-05-30 12:43:41 +0200 | [diff] [blame] | 447 | .acpi_name = "MSSL1680:00", |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 448 | .properties = trekstor_primebook_c13_props, |
Hans de Goede | adf762d | 2018-05-30 12:43:41 +0200 | [diff] [blame] | 449 | }; |
| 450 | |
Marian Cepok | 30394a8 | 2018-10-08 09:25:05 +0200 | [diff] [blame] | 451 | static const struct property_entry trekstor_primetab_t13b_props[] = { |
| 452 | PROPERTY_ENTRY_U32("touchscreen-size-x", 2500), |
| 453 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1900), |
| 454 | PROPERTY_ENTRY_STRING("firmware-name", |
| 455 | "gsl1680-trekstor-primetab-t13b.fw"), |
| 456 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 457 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 458 | PROPERTY_ENTRY_BOOL("touchscreen-inverted-y"), |
| 459 | { } |
| 460 | }; |
| 461 | |
| 462 | static const struct ts_dmi_data trekstor_primetab_t13b_data = { |
| 463 | .acpi_name = "MSSL1680:00", |
| 464 | .properties = trekstor_primetab_t13b_props, |
| 465 | }; |
| 466 | |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 467 | static const struct property_entry trekstor_surftab_twin_10_1_props[] = { |
| 468 | PROPERTY_ENTRY_U32("touchscreen-size-x", 1900), |
| 469 | PROPERTY_ENTRY_U32("touchscreen-size-y", 1280), |
| 470 | PROPERTY_ENTRY_U32("touchscreen-inverted-y", 1), |
| 471 | PROPERTY_ENTRY_STRING("firmware-name", |
| 472 | "gsl3670-surftab-twin-10-1-st10432-8.fw"), |
| 473 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 474 | { } |
| 475 | }; |
| 476 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 477 | static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 478 | .acpi_name = "MSSL1680:00", |
| 479 | .properties = trekstor_surftab_twin_10_1_props, |
| 480 | }; |
| 481 | |
| 482 | static const struct property_entry trekstor_surftab_wintron70_props[] = { |
Hans de Goede | 4104916 | 2018-10-20 12:21:00 +0200 | [diff] [blame] | 483 | PROPERTY_ENTRY_U32("touchscreen-min-x", 12), |
| 484 | PROPERTY_ENTRY_U32("touchscreen-min-y", 8), |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 485 | PROPERTY_ENTRY_U32("touchscreen-size-x", 884), |
| 486 | PROPERTY_ENTRY_U32("touchscreen-size-y", 632), |
| 487 | PROPERTY_ENTRY_STRING("firmware-name", |
| 488 | "gsl1686-surftab-wintron70-st70416-6.fw"), |
| 489 | PROPERTY_ENTRY_U32("silead,max-fingers", 10), |
| 490 | PROPERTY_ENTRY_BOOL("silead,home-button"), |
| 491 | { } |
| 492 | }; |
| 493 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 494 | static const struct ts_dmi_data trekstor_surftab_wintron70_data = { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 495 | .acpi_name = "MSSL1680:00", |
| 496 | .properties = trekstor_surftab_wintron70_props, |
| 497 | }; |
| 498 | |
| 499 | /* NOTE: Please keep this table sorted alphabetically */ |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 500 | static const struct dmi_system_id touchscreen_dmi_table[] = { |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 501 | { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 502 | /* Chuwi Hi8 */ |
| 503 | .driver_data = (void *)&chuwi_hi8_data, |
| 504 | .matches = { |
| 505 | DMI_MATCH(DMI_SYS_VENDOR, "ilife"), |
| 506 | DMI_MATCH(DMI_PRODUCT_NAME, "S806"), |
| 507 | }, |
| 508 | }, |
| 509 | { |
| 510 | /* Chuwi Hi8 (H1D_S806_206) */ |
| 511 | .driver_data = (void *)&chuwi_hi8_data, |
| 512 | .matches = { |
| 513 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), |
| 514 | DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"), |
| 515 | DMI_MATCH(DMI_BIOS_VERSION, "H1D_S806_206"), |
| 516 | }, |
| 517 | }, |
| 518 | { |
| 519 | /* Chuwi Hi8 Pro (CWI513) */ |
| 520 | .driver_data = (void *)&chuwi_hi8_pro_data, |
| 521 | .matches = { |
| 522 | DMI_MATCH(DMI_SYS_VENDOR, "Hampoo"), |
| 523 | DMI_MATCH(DMI_PRODUCT_NAME, "X1D3_C806N"), |
| 524 | }, |
| 525 | }, |
| 526 | { |
| 527 | /* Chuwi Vi8 (CWI506) */ |
| 528 | .driver_data = (void *)&chuwi_vi8_data, |
| 529 | .matches = { |
| 530 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), |
| 531 | DMI_MATCH(DMI_PRODUCT_NAME, "i86"), |
| 532 | DMI_MATCH(DMI_BIOS_VERSION, "CHUWI.D86JLBNR"), |
| 533 | }, |
| 534 | }, |
| 535 | { |
Hans de Goede | b4c8681 | 2018-06-08 23:45:57 +0200 | [diff] [blame] | 536 | /* Chuwi Vi10 (CWI505) */ |
| 537 | .driver_data = (void *)&chuwi_vi10_data, |
| 538 | .matches = { |
| 539 | DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"), |
| 540 | DMI_MATCH(DMI_BOARD_NAME, "BYT-PF02"), |
| 541 | DMI_MATCH(DMI_SYS_VENDOR, "ilife"), |
| 542 | DMI_MATCH(DMI_PRODUCT_NAME, "S165"), |
| 543 | }, |
| 544 | }, |
| 545 | { |
Hans de Goede | c72d95e | 2018-07-01 11:32:56 +0200 | [diff] [blame] | 546 | /* Connect Tablet 9 */ |
| 547 | .driver_data = (void *)&connect_tablet9_data, |
| 548 | .matches = { |
| 549 | DMI_MATCH(DMI_SYS_VENDOR, "Connect"), |
| 550 | DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"), |
| 551 | }, |
| 552 | }, |
| 553 | { |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 554 | /* CUBE iwork8 Air */ |
| 555 | .driver_data = (void *)&cube_iwork8_air_data, |
| 556 | .matches = { |
| 557 | DMI_MATCH(DMI_SYS_VENDOR, "cube"), |
| 558 | DMI_MATCH(DMI_PRODUCT_NAME, "i1-TF"), |
| 559 | DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"), |
| 560 | }, |
| 561 | }, |
| 562 | { |
youling257 | cda5915 | 2018-07-31 17:32:56 +0800 | [diff] [blame] | 563 | /* Cube KNote i1101 */ |
| 564 | .driver_data = (void *)&cube_knote_i1101_data, |
| 565 | .matches = { |
| 566 | DMI_MATCH(DMI_BOARD_VENDOR, "Hampoo"), |
| 567 | DMI_MATCH(DMI_BOARD_NAME, "L1W6_I1101"), |
| 568 | DMI_MATCH(DMI_SYS_VENDOR, "ALLDOCUBE"), |
| 569 | DMI_MATCH(DMI_PRODUCT_NAME, "i1101"), |
| 570 | }, |
| 571 | }, |
| 572 | { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 573 | /* DEXP Ursus 7W */ |
| 574 | .driver_data = (void *)&dexp_ursus_7w_data, |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 575 | .matches = { |
| 576 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 577 | DMI_MATCH(DMI_PRODUCT_NAME, "7W"), |
| 578 | }, |
| 579 | }, |
| 580 | { |
| 581 | /* Digma Citi E200 */ |
| 582 | .driver_data = (void *)&digma_citi_e200_data, |
| 583 | .matches = { |
| 584 | DMI_MATCH(DMI_SYS_VENDOR, "Digma"), |
| 585 | DMI_MATCH(DMI_PRODUCT_NAME, "CITI E200"), |
| 586 | DMI_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"), |
| 587 | }, |
| 588 | }, |
| 589 | { |
| 590 | /* GP-electronic T701 */ |
| 591 | .driver_data = (void *)&gp_electronic_t701_data, |
| 592 | .matches = { |
| 593 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), |
| 594 | DMI_MATCH(DMI_PRODUCT_NAME, "T701"), |
| 595 | DMI_MATCH(DMI_BIOS_VERSION, "BYT70A.YNCHENG.WIN.007"), |
| 596 | }, |
| 597 | }, |
| 598 | { |
| 599 | /* I.T.Works TW701 (same hardware as the Trekstor ST70416-6) */ |
| 600 | .driver_data = (void *)&trekstor_surftab_wintron70_data, |
| 601 | .matches = { |
| 602 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), |
| 603 | DMI_MATCH(DMI_PRODUCT_NAME, "i71c"), |
| 604 | DMI_MATCH(DMI_BIOS_VERSION, "itWORKS.G.WI71C.JGBMRB"), |
| 605 | }, |
| 606 | }, |
| 607 | { |
| 608 | /* I.T.Works TW891 */ |
| 609 | .driver_data = (void *)&itworks_tw891_data, |
| 610 | .matches = { |
| 611 | DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."), |
| 612 | DMI_MATCH(DMI_PRODUCT_NAME, "TW891"), |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 613 | }, |
| 614 | }, |
Hans de Goede | 6b8e7d8 | 2017-03-22 16:55:54 +0100 | [diff] [blame] | 615 | { |
Hans de Goede | 828615f | 2018-05-30 12:43:39 +0200 | [diff] [blame] | 616 | /* Jumper EZpad 6 Pro */ |
| 617 | .driver_data = (void *)&jumper_ezpad_6_pro_data, |
| 618 | .matches = { |
| 619 | DMI_MATCH(DMI_SYS_VENDOR, "Jumper"), |
| 620 | DMI_MATCH(DMI_PRODUCT_NAME, "EZpad"), |
| 621 | DMI_MATCH(DMI_BIOS_VERSION, "5.12"), |
| 622 | /* Above matches are too generic, add bios-date match */ |
| 623 | DMI_MATCH(DMI_BIOS_DATE, "08/18/2017"), |
| 624 | }, |
| 625 | }, |
| 626 | { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 627 | /* Jumper EZpad mini3 */ |
| 628 | .driver_data = (void *)&jumper_ezpad_mini3_data, |
Hans de Goede | 6b8e7d8 | 2017-03-22 16:55:54 +0100 | [diff] [blame] | 629 | .matches = { |
| 630 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 631 | /* jumperx.T87.KFBNEEA02 with the version-nr dropped */ |
| 632 | DMI_MATCH(DMI_BIOS_VERSION, "jumperx.T87.KFBNEEA"), |
| 633 | }, |
| 634 | }, |
| 635 | { |
Hans de Goede | f25b630 | 2018-12-04 10:20:04 +0100 | [diff] [blame] | 636 | /* Mediacom Flexbook Edge 11 (same hw as TS Primebook C11) */ |
| 637 | .driver_data = (void *)&trekstor_primebook_c11_data, |
| 638 | .matches = { |
| 639 | DMI_MATCH(DMI_SYS_VENDOR, "MEDIACOM"), |
| 640 | DMI_MATCH(DMI_PRODUCT_NAME, "FlexBook edge11 - M-FBE11"), |
| 641 | }, |
| 642 | }, |
| 643 | { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 644 | /* Onda oBook 20 Plus */ |
| 645 | .driver_data = (void *)&onda_obook_20_plus_data, |
| 646 | .matches = { |
| 647 | DMI_MATCH(DMI_SYS_VENDOR, "ONDA"), |
| 648 | DMI_MATCH(DMI_PRODUCT_NAME, "OBOOK 20 PLUS"), |
| 649 | }, |
| 650 | }, |
| 651 | { |
Hans de Goede | 01b6b7e | 2018-10-10 15:16:40 +0200 | [diff] [blame] | 652 | /* ONDA V80 plus v3 (P80PSBG9V3A01501) */ |
| 653 | .driver_data = (void *)&onda_v80_plus_v3_data, |
| 654 | .matches = { |
| 655 | DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONDA"), |
| 656 | DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V80 PLUS") |
| 657 | }, |
| 658 | }, |
| 659 | { |
Jun Bo Bi | ee08f57 | 2018-07-01 17:47:14 -0400 | [diff] [blame] | 660 | /* ONDA V820w DualOS */ |
| 661 | .driver_data = (void *)&onda_v820w_32g_data, |
| 662 | .matches = { |
| 663 | DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"), |
| 664 | DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "V820w DualOS") |
| 665 | }, |
| 666 | }, |
| 667 | { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 668 | /* ONDA V891w revision P891WBEBV1B00 aka v1 */ |
| 669 | .driver_data = (void *)&onda_v891w_v1_data, |
| 670 | .matches = { |
| 671 | DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "ONDA"), |
| 672 | DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONDA Tablet"), |
| 673 | DMI_EXACT_MATCH(DMI_BOARD_VERSION, "V001"), |
| 674 | /* Exact match, different versions need different fw */ |
| 675 | DMI_EXACT_MATCH(DMI_BIOS_VERSION, "ONDA.W89EBBN08"), |
| 676 | }, |
| 677 | }, |
| 678 | { |
youling257 | c0d7308 | 2018-06-18 15:11:44 +0200 | [diff] [blame] | 679 | /* ONDA V891w Dual OS P891DCF2V1A01274 64GB */ |
| 680 | .driver_data = (void *)&onda_v891w_v3_data, |
| 681 | .matches = { |
| 682 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), |
| 683 | DMI_MATCH(DMI_PRODUCT_NAME, "ONDA Tablet"), |
| 684 | DMI_MATCH(DMI_BIOS_VERSION, "ONDA.D890HBBNR0A"), |
| 685 | }, |
| 686 | }, |
| 687 | { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 688 | /* Pipo W2S */ |
| 689 | .driver_data = (void *)&pipo_w2s_data, |
| 690 | .matches = { |
| 691 | DMI_MATCH(DMI_SYS_VENDOR, "PIPO"), |
| 692 | DMI_MATCH(DMI_PRODUCT_NAME, "W2S"), |
| 693 | }, |
| 694 | }, |
| 695 | { |
| 696 | /* Ployer Momo7w (same hardware as the Trekstor ST70416-6) */ |
| 697 | .driver_data = (void *)&trekstor_surftab_wintron70_data, |
| 698 | .matches = { |
| 699 | DMI_MATCH(DMI_SYS_VENDOR, "Shenzhen PLOYER"), |
| 700 | DMI_MATCH(DMI_PRODUCT_NAME, "MOMO7W"), |
| 701 | /* Exact match, different versions need different fw */ |
| 702 | DMI_MATCH(DMI_BIOS_VERSION, "MOMO.G.WI71C.MABMRBA02"), |
| 703 | }, |
| 704 | }, |
| 705 | { |
| 706 | /* Point of View mobii wintab p800w (v2.0) */ |
| 707 | .driver_data = (void *)&pov_mobii_wintab_p800w_v20_data, |
| 708 | .matches = { |
| 709 | DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), |
| 710 | DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"), |
| 711 | DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1014"), |
| 712 | /* Above matches are too generic, add bios-date match */ |
| 713 | DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"), |
| 714 | }, |
| 715 | }, |
| 716 | { |
| 717 | /* Point of View mobii wintab p800w (v2.1) */ |
| 718 | .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data, |
| 719 | .matches = { |
| 720 | DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), |
| 721 | DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"), |
| 722 | DMI_MATCH(DMI_BIOS_VERSION, "3BAIR1013"), |
| 723 | /* Above matches are too generic, add bios-date match */ |
| 724 | DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"), |
| 725 | }, |
| 726 | }, |
| 727 | { |
Hans de Goede | 8335ebc | 2018-12-20 22:21:50 +0100 | [diff] [blame^] | 728 | /* Point of View mobii wintab p1006w (v1.0) */ |
| 729 | .driver_data = (void *)&pov_mobii_wintab_p1006w_v10_data, |
| 730 | .matches = { |
| 731 | DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"), |
| 732 | DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "BayTrail"), |
| 733 | /* Note 105b is Foxcon's USB/PCI vendor id */ |
| 734 | DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "105B"), |
| 735 | DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"), |
| 736 | }, |
| 737 | }, |
| 738 | { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 739 | /* Teclast X3 Plus */ |
| 740 | .driver_data = (void *)&teclast_x3_plus_data, |
| 741 | .matches = { |
| 742 | DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"), |
| 743 | DMI_MATCH(DMI_PRODUCT_NAME, "X3 Plus"), |
| 744 | DMI_MATCH(DMI_BOARD_NAME, "X3 Plus"), |
| 745 | }, |
| 746 | }, |
| 747 | { |
| 748 | /* Teclast X98 Plus II */ |
| 749 | .driver_data = (void *)&teclast_x98plus2_data, |
| 750 | .matches = { |
| 751 | DMI_MATCH(DMI_SYS_VENDOR, "TECLAST"), |
| 752 | DMI_MATCH(DMI_PRODUCT_NAME, "X98 Plus II"), |
| 753 | }, |
| 754 | }, |
| 755 | { |
Hans de Goede | cacad0b | 2018-10-04 14:34:45 +0200 | [diff] [blame] | 756 | /* Trekstor Primebook C11 */ |
| 757 | .driver_data = (void *)&trekstor_primebook_c11_data, |
| 758 | .matches = { |
| 759 | DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"), |
| 760 | DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C11"), |
| 761 | }, |
| 762 | }, |
| 763 | { |
Hans de Goede | 6a655a0 | 2018-06-08 23:45:56 +0200 | [diff] [blame] | 764 | /* Trekstor Primebook C13 */ |
| 765 | .driver_data = (void *)&trekstor_primebook_c13_data, |
| 766 | .matches = { |
| 767 | DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"), |
| 768 | DMI_MATCH(DMI_PRODUCT_NAME, "Primebook C13"), |
Hans de Goede | 6b8e7d8 | 2017-03-22 16:55:54 +0100 | [diff] [blame] | 769 | }, |
| 770 | }, |
Hans de Goede | 5b7bb3a | 2017-04-09 11:07:44 +0200 | [diff] [blame] | 771 | { |
Marian Cepok | 30394a8 | 2018-10-08 09:25:05 +0200 | [diff] [blame] | 772 | /* Trekstor Primetab T13B */ |
| 773 | .driver_data = (void *)&trekstor_primetab_t13b_data, |
| 774 | .matches = { |
| 775 | DMI_MATCH(DMI_SYS_VENDOR, "TREKSTOR"), |
| 776 | DMI_MATCH(DMI_PRODUCT_NAME, "Primetab T13B"), |
| 777 | }, |
| 778 | }, |
| 779 | { |
Bernhard Übelacker | f4c12d4 | 2017-11-26 19:32:58 +0100 | [diff] [blame] | 780 | /* TrekStor SurfTab twin 10.1 ST10432-8 */ |
Hans de Goede | d6b0d7d | 2018-06-08 23:45:55 +0200 | [diff] [blame] | 781 | .driver_data = (void *)&trekstor_surftab_twin_10_1_data, |
Bernhard Übelacker | f4c12d4 | 2017-11-26 19:32:58 +0100 | [diff] [blame] | 782 | .matches = { |
| 783 | DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"), |
| 784 | DMI_MATCH(DMI_PRODUCT_NAME, "SurfTab twin 10.1"), |
| 785 | }, |
| 786 | }, |
| 787 | { |
Hans de Goede | 5b7bb3a | 2017-04-09 11:07:44 +0200 | [diff] [blame] | 788 | /* Trekstor Surftab Wintron 7.0 ST70416-6 */ |
Hans de Goede | d6b0d7d | 2018-06-08 23:45:55 +0200 | [diff] [blame] | 789 | .driver_data = (void *)&trekstor_surftab_wintron70_data, |
Hans de Goede | 5b7bb3a | 2017-04-09 11:07:44 +0200 | [diff] [blame] | 790 | .matches = { |
| 791 | DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), |
| 792 | DMI_MATCH(DMI_PRODUCT_NAME, "ST70416-6"), |
| 793 | /* Exact match, different versions need different fw */ |
| 794 | DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA04"), |
| 795 | }, |
| 796 | }, |
Hans de Goede | d9ca30b | 2017-05-07 14:35:15 +0200 | [diff] [blame] | 797 | { |
Hans de Goede | 4245c15 | 2018-01-16 20:24:15 +0100 | [diff] [blame] | 798 | /* Trekstor Surftab Wintron 7.0 ST70416-6, newer BIOS */ |
Hans de Goede | d6b0d7d | 2018-06-08 23:45:55 +0200 | [diff] [blame] | 799 | .driver_data = (void *)&trekstor_surftab_wintron70_data, |
Hans de Goede | 4245c15 | 2018-01-16 20:24:15 +0100 | [diff] [blame] | 800 | .matches = { |
| 801 | DMI_MATCH(DMI_SYS_VENDOR, "TrekStor"), |
| 802 | DMI_MATCH(DMI_PRODUCT_NAME, |
| 803 | "SurfTab wintron 7.0 ST70416-6"), |
| 804 | /* Exact match, different versions need different fw */ |
| 805 | DMI_MATCH(DMI_BIOS_VERSION, "TREK.G.WI71C.JGBMRBA05"), |
| 806 | }, |
| 807 | }, |
| 808 | { |
Hans de Goede | 24e2bb3 | 2018-03-09 15:03:58 +0100 | [diff] [blame] | 809 | /* Yours Y8W81, same case and touchscreen as Chuwi Vi8 */ |
| 810 | .driver_data = (void *)&chuwi_vi8_data, |
| 811 | .matches = { |
| 812 | DMI_MATCH(DMI_SYS_VENDOR, "YOURS"), |
| 813 | DMI_MATCH(DMI_PRODUCT_NAME, "Y8W81"), |
| 814 | }, |
| 815 | }, |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 816 | { }, |
| 817 | }; |
| 818 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 819 | static const struct ts_dmi_data *ts_data; |
Dmitry Torokhov | f22265b | 2017-04-03 20:25:14 -0700 | [diff] [blame] | 820 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 821 | static void ts_dmi_add_props(struct i2c_client *client) |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 822 | { |
Dmitry Torokhov | e105396 | 2017-04-03 20:25:13 -0700 | [diff] [blame] | 823 | struct device *dev = &client->dev; |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 824 | int error; |
| 825 | |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 826 | if (has_acpi_companion(dev) && |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 827 | !strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) { |
| 828 | error = device_add_properties(dev, ts_data->properties); |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 829 | if (error) |
| 830 | dev_err(dev, "failed to add properties: %d\n", error); |
| 831 | } |
| 832 | } |
| 833 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 834 | static int ts_dmi_notifier_call(struct notifier_block *nb, |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 835 | unsigned long action, void *data) |
| 836 | { |
| 837 | struct device *dev = data; |
Dmitry Torokhov | e105396 | 2017-04-03 20:25:13 -0700 | [diff] [blame] | 838 | struct i2c_client *client; |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 839 | |
| 840 | switch (action) { |
| 841 | case BUS_NOTIFY_ADD_DEVICE: |
Dmitry Torokhov | e105396 | 2017-04-03 20:25:13 -0700 | [diff] [blame] | 842 | client = i2c_verify_client(dev); |
| 843 | if (client) |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 844 | ts_dmi_add_props(client); |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 845 | break; |
| 846 | |
| 847 | default: |
| 848 | break; |
| 849 | } |
| 850 | |
| 851 | return 0; |
| 852 | } |
| 853 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 854 | static struct notifier_block ts_dmi_notifier = { |
| 855 | .notifier_call = ts_dmi_notifier_call, |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 856 | }; |
| 857 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 858 | static int __init ts_dmi_init(void) |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 859 | { |
Dmitry Torokhov | f22265b | 2017-04-03 20:25:14 -0700 | [diff] [blame] | 860 | const struct dmi_system_id *dmi_id; |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 861 | int error; |
| 862 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 863 | dmi_id = dmi_first_match(touchscreen_dmi_table); |
Dmitry Torokhov | f22265b | 2017-04-03 20:25:14 -0700 | [diff] [blame] | 864 | if (!dmi_id) |
| 865 | return 0; /* Not an error */ |
| 866 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 867 | ts_data = dmi_id->driver_data; |
Dmitry Torokhov | f22265b | 2017-04-03 20:25:14 -0700 | [diff] [blame] | 868 | |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 869 | error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier); |
Hans de Goede | cef9dd8 | 2017-01-23 18:35:30 +0100 | [diff] [blame] | 870 | if (error) |
| 871 | pr_err("%s: failed to register i2c bus notifier: %d\n", |
| 872 | __func__, error); |
| 873 | |
| 874 | return error; |
| 875 | } |
| 876 | |
| 877 | /* |
| 878 | * We are registering out notifier after i2c core is initialized and i2c bus |
| 879 | * itself is ready (which happens at postcore initcall level), but before |
| 880 | * ACPI starts enumerating devices (at subsys initcall level). |
| 881 | */ |
Hans de Goede | 7442178 | 2018-06-08 23:45:58 +0200 | [diff] [blame] | 882 | arch_initcall(ts_dmi_init); |