Skip to content

Commit 7442178

Browse files
jwrdegoedeandy-shev
authored andcommitted
platform/x86: Rename silead_dmi to touchscreen_dmi
Not only silead touchscreens need some extra info not available in the ACPI tables to work properly. X86 devices with a Chipone ICN8505 chip also need some DMI based extra configuration. There is no reason to have separate dmi config code per touchscreen controller vendor. This commit renames silead_dmi to a more generic touchscreen_dmi name (and Kconfig option) in preparation of adding info for tablets with an ICN8505 based touchscreen. Note there are no functional changes all code changes are limited to removing references to silead where these are no longer applicable. Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
1 parent b4c8681 commit 7442178

File tree

4 files changed

+47
-47
lines changed

4 files changed

+47
-47
lines changed

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12951,7 +12951,7 @@ L: linux-input@vger.kernel.org
1295112951
L: platform-driver-x86@vger.kernel.org
1295212952
S: Maintained
1295312953
F: drivers/input/touchscreen/silead.c
12954-
F: drivers/platform/x86/silead_dmi.c
12954+
F: drivers/platform/x86/touchscreen_dmi.c
1295512955

1295612956
SILICON MOTION SM712 FRAME BUFFER DRIVER
1295712957
M: Sudip Mukherjee <sudipm.mukherjee@gmail.com>

drivers/platform/x86/Kconfig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,16 +1196,16 @@ config INTEL_TURBO_MAX_3
11961196
This driver is only required when the system is not using Hardware
11971197
P-States (HWP). In HWP mode, priority can be read from ACPI tables.
11981198

1199-
config SILEAD_DMI
1200-
bool "Tablets with Silead touchscreens"
1199+
config TOUCHSCREEN_DMI
1200+
bool "DMI based touchscreen configuration info"
12011201
depends on ACPI && DMI && I2C=y && TOUCHSCREEN_SILEAD
12021202
---help---
1203-
Certain ACPI based tablets with Silead touchscreens do not have
1204-
enough data in ACPI tables for the touchscreen driver to handle
1205-
the touchscreen properly, as OEMs expected the data to be baked
1206-
into the tablet model specific version of the driver shipped
1207-
with the OS-image for the device. This option supplies the missing
1208-
information. Enable this for x86 tablets with Silead touchscreens.
1203+
Certain ACPI based tablets with e.g. Silead or Chipone touchscreens
1204+
do not have enough data in ACPI tables for the touchscreen driver to
1205+
handle the touchscreen properly, as OEMs expect the data to be baked
1206+
into the tablet model specific version of the driver shipped with the
1207+
the OS-image for the device. This option supplies the missing info.
1208+
Enable this for x86 tablets with Silead or Chipone touchscreens.
12091209

12101210
config INTEL_CHTDC_TI_PWRBTN
12111211
tristate "Intel Cherry Trail Dollar Cove TI power button driver"

drivers/platform/x86/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ obj-$(CONFIG_INTEL_SMARTCONNECT) += intel-smartconnect.o
7878
obj-$(CONFIG_PVPANIC) += pvpanic.o
7979
obj-$(CONFIG_ALIENWARE_WMI) += alienware-wmi.o
8080
obj-$(CONFIG_INTEL_PMC_IPC) += intel_pmc_ipc.o
81-
obj-$(CONFIG_SILEAD_DMI) += silead_dmi.o
81+
obj-$(CONFIG_TOUCHSCREEN_DMI) += touchscreen_dmi.o
8282
obj-$(CONFIG_SURFACE_PRO3_BUTTON) += surfacepro3_button.o
8383
obj-$(CONFIG_SURFACE_3_BUTTON) += surface3_button.o
8484
obj-$(CONFIG_INTEL_PUNIT_IPC) += intel_punit_ipc.o

drivers/platform/x86/silead_dmi.c renamed to drivers/platform/x86/touchscreen_dmi.c

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Silead touchscreen driver DMI based configuration code
2+
* Touchscreen driver DMI based configuration code
33
*
44
* Copyright (c) 2017 Red Hat Inc.
55
*
@@ -20,7 +20,7 @@
2020
#include <linux/property.h>
2121
#include <linux/string.h>
2222

23-
struct silead_ts_dmi_data {
23+
struct ts_dmi_data {
2424
const char *acpi_name;
2525
const struct property_entry *properties;
2626
};
@@ -36,7 +36,7 @@ static const struct property_entry chuwi_hi8_props[] = {
3636
{ }
3737
};
3838

39-
static const struct silead_ts_dmi_data chuwi_hi8_data = {
39+
static const struct ts_dmi_data chuwi_hi8_data = {
4040
.acpi_name = "MSSL0001:00",
4141
.properties = chuwi_hi8_props,
4242
};
@@ -50,7 +50,7 @@ static const struct property_entry chuwi_hi8_pro_props[] = {
5050
{ }
5151
};
5252

53-
static const struct silead_ts_dmi_data chuwi_hi8_pro_data = {
53+
static const struct ts_dmi_data chuwi_hi8_pro_data = {
5454
.acpi_name = "MSSL1680:00",
5555
.properties = chuwi_hi8_pro_props,
5656
};
@@ -65,7 +65,7 @@ static const struct property_entry chuwi_vi8_props[] = {
6565
{ }
6666
};
6767

68-
static const struct silead_ts_dmi_data chuwi_vi8_data = {
68+
static const struct ts_dmi_data chuwi_vi8_data = {
6969
.acpi_name = "MSSL1680:00",
7070
.properties = chuwi_vi8_props,
7171
};
@@ -81,7 +81,7 @@ static const struct property_entry chuwi_vi10_props[] = {
8181
{ }
8282
};
8383

84-
static const struct silead_ts_dmi_data chuwi_vi10_data = {
84+
static const struct ts_dmi_data chuwi_vi10_data = {
8585
.acpi_name = "MSSL0002:00",
8686
.properties = chuwi_vi10_props,
8787
};
@@ -95,7 +95,7 @@ static const struct property_entry cube_iwork8_air_props[] = {
9595
{ }
9696
};
9797

98-
static const struct silead_ts_dmi_data cube_iwork8_air_data = {
98+
static const struct ts_dmi_data cube_iwork8_air_data = {
9999
.acpi_name = "MSSL1680:00",
100100
.properties = cube_iwork8_air_props,
101101
};
@@ -109,7 +109,7 @@ static const struct property_entry dexp_ursus_7w_props[] = {
109109
{ }
110110
};
111111

112-
static const struct silead_ts_dmi_data dexp_ursus_7w_data = {
112+
static const struct ts_dmi_data dexp_ursus_7w_data = {
113113
.acpi_name = "MSSL1680:00",
114114
.properties = dexp_ursus_7w_props,
115115
};
@@ -125,7 +125,7 @@ static const struct property_entry digma_citi_e200_props[] = {
125125
{ }
126126
};
127127

128-
static const struct silead_ts_dmi_data digma_citi_e200_data = {
128+
static const struct ts_dmi_data digma_citi_e200_data = {
129129
.acpi_name = "MSSL1680:00",
130130
.properties = digma_citi_e200_props,
131131
};
@@ -140,7 +140,7 @@ static const struct property_entry gp_electronic_t701_props[] = {
140140
{ }
141141
};
142142

143-
static const struct silead_ts_dmi_data gp_electronic_t701_data = {
143+
static const struct ts_dmi_data gp_electronic_t701_data = {
144144
.acpi_name = "MSSL1680:00",
145145
.properties = gp_electronic_t701_props,
146146
};
@@ -154,7 +154,7 @@ static const struct property_entry itworks_tw891_props[] = {
154154
{ }
155155
};
156156

157-
static const struct silead_ts_dmi_data itworks_tw891_data = {
157+
static const struct ts_dmi_data itworks_tw891_data = {
158158
.acpi_name = "MSSL1680:00",
159159
.properties = itworks_tw891_props,
160160
};
@@ -168,7 +168,7 @@ static const struct property_entry jumper_ezpad_6_pro_props[] = {
168168
{ }
169169
};
170170

171-
static const struct silead_ts_dmi_data jumper_ezpad_6_pro_data = {
171+
static const struct ts_dmi_data jumper_ezpad_6_pro_data = {
172172
.acpi_name = "MSSL1680:00",
173173
.properties = jumper_ezpad_6_pro_props,
174174
};
@@ -182,7 +182,7 @@ static const struct property_entry jumper_ezpad_mini3_props[] = {
182182
{ }
183183
};
184184

185-
static const struct silead_ts_dmi_data jumper_ezpad_mini3_data = {
185+
static const struct ts_dmi_data jumper_ezpad_mini3_data = {
186186
.acpi_name = "MSSL1680:00",
187187
.properties = jumper_ezpad_mini3_props,
188188
};
@@ -199,7 +199,7 @@ static const struct property_entry onda_obook_20_plus_props[] = {
199199
{ }
200200
};
201201

202-
static const struct silead_ts_dmi_data onda_obook_20_plus_data = {
202+
static const struct ts_dmi_data onda_obook_20_plus_data = {
203203
.acpi_name = "MSSL1680:00",
204204
.properties = onda_obook_20_plus_props,
205205
};
@@ -216,7 +216,7 @@ static const struct property_entry onda_v891w_v1_props[] = {
216216
{ }
217217
};
218218

219-
static const struct silead_ts_dmi_data onda_v891w_v1_data = {
219+
static const struct ts_dmi_data onda_v891w_v1_data = {
220220
.acpi_name = "MSSL1680:00",
221221
.properties = onda_v891w_v1_props,
222222
};
@@ -231,7 +231,7 @@ static const struct property_entry pipo_w2s_props[] = {
231231
{ }
232232
};
233233

234-
static const struct silead_ts_dmi_data pipo_w2s_data = {
234+
static const struct ts_dmi_data pipo_w2s_data = {
235235
.acpi_name = "MSSL1680:00",
236236
.properties = pipo_w2s_props,
237237
};
@@ -249,7 +249,7 @@ static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
249249
{ }
250250
};
251251

252-
static const struct silead_ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
252+
static const struct ts_dmi_data pov_mobii_wintab_p800w_v20_data = {
253253
.acpi_name = "MSSL1680:00",
254254
.properties = pov_mobii_wintab_p800w_v20_props,
255255
};
@@ -264,7 +264,7 @@ static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
264264
{ }
265265
};
266266

267-
static const struct silead_ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
267+
static const struct ts_dmi_data pov_mobii_wintab_p800w_v21_data = {
268268
.acpi_name = "MSSL1680:00",
269269
.properties = pov_mobii_wintab_p800w_v21_props,
270270
};
@@ -278,7 +278,7 @@ static const struct property_entry teclast_x3_plus_props[] = {
278278
{ }
279279
};
280280

281-
static const struct silead_ts_dmi_data teclast_x3_plus_data = {
281+
static const struct ts_dmi_data teclast_x3_plus_data = {
282282
.acpi_name = "MSSL1680:00",
283283
.properties = teclast_x3_plus_props,
284284
};
@@ -294,7 +294,7 @@ static const struct property_entry teclast_x98plus2_props[] = {
294294
{ }
295295
};
296296

297-
static const struct silead_ts_dmi_data teclast_x98plus2_data = {
297+
static const struct ts_dmi_data teclast_x98plus2_data = {
298298
.acpi_name = "MSSL1680:00",
299299
.properties = teclast_x98plus2_props,
300300
};
@@ -309,7 +309,7 @@ static const struct property_entry trekstor_primebook_c13_props[] = {
309309
{ }
310310
};
311311

312-
static const struct silead_ts_dmi_data trekstor_primebook_c13_data = {
312+
static const struct ts_dmi_data trekstor_primebook_c13_data = {
313313
.acpi_name = "MSSL1680:00",
314314
.properties = trekstor_primebook_c13_props,
315315
};
@@ -324,7 +324,7 @@ static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
324324
{ }
325325
};
326326

327-
static const struct silead_ts_dmi_data trekstor_surftab_twin_10_1_data = {
327+
static const struct ts_dmi_data trekstor_surftab_twin_10_1_data = {
328328
.acpi_name = "MSSL1680:00",
329329
.properties = trekstor_surftab_twin_10_1_props,
330330
};
@@ -339,13 +339,13 @@ static const struct property_entry trekstor_surftab_wintron70_props[] = {
339339
{ }
340340
};
341341

342-
static const struct silead_ts_dmi_data trekstor_surftab_wintron70_data = {
342+
static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
343343
.acpi_name = "MSSL1680:00",
344344
.properties = trekstor_surftab_wintron70_props,
345345
};
346346

347347
/* NOTE: Please keep this table sorted alphabetically */
348-
static const struct dmi_system_id silead_ts_dmi_table[] = {
348+
static const struct dmi_system_id touchscreen_dmi_table[] = {
349349
{
350350
/* Chuwi Hi8 */
351351
.driver_data = (void *)&chuwi_hi8_data,
@@ -586,22 +586,22 @@ static const struct dmi_system_id silead_ts_dmi_table[] = {
586586
{ },
587587
};
588588

589-
static const struct silead_ts_dmi_data *silead_ts_data;
589+
static const struct ts_dmi_data *ts_data;
590590

591-
static void silead_ts_dmi_add_props(struct i2c_client *client)
591+
static void ts_dmi_add_props(struct i2c_client *client)
592592
{
593593
struct device *dev = &client->dev;
594594
int error;
595595

596596
if (has_acpi_companion(dev) &&
597-
!strncmp(silead_ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
598-
error = device_add_properties(dev, silead_ts_data->properties);
597+
!strncmp(ts_data->acpi_name, client->name, I2C_NAME_SIZE)) {
598+
error = device_add_properties(dev, ts_data->properties);
599599
if (error)
600600
dev_err(dev, "failed to add properties: %d\n", error);
601601
}
602602
}
603603

604-
static int silead_ts_dmi_notifier_call(struct notifier_block *nb,
604+
static int ts_dmi_notifier_call(struct notifier_block *nb,
605605
unsigned long action, void *data)
606606
{
607607
struct device *dev = data;
@@ -611,7 +611,7 @@ static int silead_ts_dmi_notifier_call(struct notifier_block *nb,
611611
case BUS_NOTIFY_ADD_DEVICE:
612612
client = i2c_verify_client(dev);
613613
if (client)
614-
silead_ts_dmi_add_props(client);
614+
ts_dmi_add_props(client);
615615
break;
616616

617617
default:
@@ -621,22 +621,22 @@ static int silead_ts_dmi_notifier_call(struct notifier_block *nb,
621621
return 0;
622622
}
623623

624-
static struct notifier_block silead_ts_dmi_notifier = {
625-
.notifier_call = silead_ts_dmi_notifier_call,
624+
static struct notifier_block ts_dmi_notifier = {
625+
.notifier_call = ts_dmi_notifier_call,
626626
};
627627

628-
static int __init silead_ts_dmi_init(void)
628+
static int __init ts_dmi_init(void)
629629
{
630630
const struct dmi_system_id *dmi_id;
631631
int error;
632632

633-
dmi_id = dmi_first_match(silead_ts_dmi_table);
633+
dmi_id = dmi_first_match(touchscreen_dmi_table);
634634
if (!dmi_id)
635635
return 0; /* Not an error */
636636

637-
silead_ts_data = dmi_id->driver_data;
637+
ts_data = dmi_id->driver_data;
638638

639-
error = bus_register_notifier(&i2c_bus_type, &silead_ts_dmi_notifier);
639+
error = bus_register_notifier(&i2c_bus_type, &ts_dmi_notifier);
640640
if (error)
641641
pr_err("%s: failed to register i2c bus notifier: %d\n",
642642
__func__, error);
@@ -649,4 +649,4 @@ static int __init silead_ts_dmi_init(void)
649649
* itself is ready (which happens at postcore initcall level), but before
650650
* ACPI starts enumerating devices (at subsys initcall level).
651651
*/
652-
arch_initcall(silead_ts_dmi_init);
652+
arch_initcall(ts_dmi_init);

0 commit comments

Comments
 (0)