1
1
/*
2
- * Silead touchscreen driver DMI based configuration code
2
+ * Touchscreen driver DMI based configuration code
3
3
*
4
4
* Copyright (c) 2017 Red Hat Inc.
5
5
*
20
20
#include <linux/property.h>
21
21
#include <linux/string.h>
22
22
23
- struct silead_ts_dmi_data {
23
+ struct ts_dmi_data {
24
24
const char * acpi_name ;
25
25
const struct property_entry * properties ;
26
26
};
@@ -36,7 +36,7 @@ static const struct property_entry chuwi_hi8_props[] = {
36
36
{ }
37
37
};
38
38
39
- static const struct silead_ts_dmi_data chuwi_hi8_data = {
39
+ static const struct ts_dmi_data chuwi_hi8_data = {
40
40
.acpi_name = "MSSL0001:00" ,
41
41
.properties = chuwi_hi8_props ,
42
42
};
@@ -50,7 +50,7 @@ static const struct property_entry chuwi_hi8_pro_props[] = {
50
50
{ }
51
51
};
52
52
53
- static const struct silead_ts_dmi_data chuwi_hi8_pro_data = {
53
+ static const struct ts_dmi_data chuwi_hi8_pro_data = {
54
54
.acpi_name = "MSSL1680:00" ,
55
55
.properties = chuwi_hi8_pro_props ,
56
56
};
@@ -65,7 +65,7 @@ static const struct property_entry chuwi_vi8_props[] = {
65
65
{ }
66
66
};
67
67
68
- static const struct silead_ts_dmi_data chuwi_vi8_data = {
68
+ static const struct ts_dmi_data chuwi_vi8_data = {
69
69
.acpi_name = "MSSL1680:00" ,
70
70
.properties = chuwi_vi8_props ,
71
71
};
@@ -81,7 +81,7 @@ static const struct property_entry chuwi_vi10_props[] = {
81
81
{ }
82
82
};
83
83
84
- static const struct silead_ts_dmi_data chuwi_vi10_data = {
84
+ static const struct ts_dmi_data chuwi_vi10_data = {
85
85
.acpi_name = "MSSL0002:00" ,
86
86
.properties = chuwi_vi10_props ,
87
87
};
@@ -95,7 +95,7 @@ static const struct property_entry cube_iwork8_air_props[] = {
95
95
{ }
96
96
};
97
97
98
- static const struct silead_ts_dmi_data cube_iwork8_air_data = {
98
+ static const struct ts_dmi_data cube_iwork8_air_data = {
99
99
.acpi_name = "MSSL1680:00" ,
100
100
.properties = cube_iwork8_air_props ,
101
101
};
@@ -109,7 +109,7 @@ static const struct property_entry dexp_ursus_7w_props[] = {
109
109
{ }
110
110
};
111
111
112
- static const struct silead_ts_dmi_data dexp_ursus_7w_data = {
112
+ static const struct ts_dmi_data dexp_ursus_7w_data = {
113
113
.acpi_name = "MSSL1680:00" ,
114
114
.properties = dexp_ursus_7w_props ,
115
115
};
@@ -125,7 +125,7 @@ static const struct property_entry digma_citi_e200_props[] = {
125
125
{ }
126
126
};
127
127
128
- static const struct silead_ts_dmi_data digma_citi_e200_data = {
128
+ static const struct ts_dmi_data digma_citi_e200_data = {
129
129
.acpi_name = "MSSL1680:00" ,
130
130
.properties = digma_citi_e200_props ,
131
131
};
@@ -140,7 +140,7 @@ static const struct property_entry gp_electronic_t701_props[] = {
140
140
{ }
141
141
};
142
142
143
- static const struct silead_ts_dmi_data gp_electronic_t701_data = {
143
+ static const struct ts_dmi_data gp_electronic_t701_data = {
144
144
.acpi_name = "MSSL1680:00" ,
145
145
.properties = gp_electronic_t701_props ,
146
146
};
@@ -154,7 +154,7 @@ static const struct property_entry itworks_tw891_props[] = {
154
154
{ }
155
155
};
156
156
157
- static const struct silead_ts_dmi_data itworks_tw891_data = {
157
+ static const struct ts_dmi_data itworks_tw891_data = {
158
158
.acpi_name = "MSSL1680:00" ,
159
159
.properties = itworks_tw891_props ,
160
160
};
@@ -168,7 +168,7 @@ static const struct property_entry jumper_ezpad_6_pro_props[] = {
168
168
{ }
169
169
};
170
170
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 = {
172
172
.acpi_name = "MSSL1680:00" ,
173
173
.properties = jumper_ezpad_6_pro_props ,
174
174
};
@@ -182,7 +182,7 @@ static const struct property_entry jumper_ezpad_mini3_props[] = {
182
182
{ }
183
183
};
184
184
185
- static const struct silead_ts_dmi_data jumper_ezpad_mini3_data = {
185
+ static const struct ts_dmi_data jumper_ezpad_mini3_data = {
186
186
.acpi_name = "MSSL1680:00" ,
187
187
.properties = jumper_ezpad_mini3_props ,
188
188
};
@@ -199,7 +199,7 @@ static const struct property_entry onda_obook_20_plus_props[] = {
199
199
{ }
200
200
};
201
201
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 = {
203
203
.acpi_name = "MSSL1680:00" ,
204
204
.properties = onda_obook_20_plus_props ,
205
205
};
@@ -216,7 +216,7 @@ static const struct property_entry onda_v891w_v1_props[] = {
216
216
{ }
217
217
};
218
218
219
- static const struct silead_ts_dmi_data onda_v891w_v1_data = {
219
+ static const struct ts_dmi_data onda_v891w_v1_data = {
220
220
.acpi_name = "MSSL1680:00" ,
221
221
.properties = onda_v891w_v1_props ,
222
222
};
@@ -231,7 +231,7 @@ static const struct property_entry pipo_w2s_props[] = {
231
231
{ }
232
232
};
233
233
234
- static const struct silead_ts_dmi_data pipo_w2s_data = {
234
+ static const struct ts_dmi_data pipo_w2s_data = {
235
235
.acpi_name = "MSSL1680:00" ,
236
236
.properties = pipo_w2s_props ,
237
237
};
@@ -249,7 +249,7 @@ static const struct property_entry pov_mobii_wintab_p800w_v20_props[] = {
249
249
{ }
250
250
};
251
251
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 = {
253
253
.acpi_name = "MSSL1680:00" ,
254
254
.properties = pov_mobii_wintab_p800w_v20_props ,
255
255
};
@@ -264,7 +264,7 @@ static const struct property_entry pov_mobii_wintab_p800w_v21_props[] = {
264
264
{ }
265
265
};
266
266
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 = {
268
268
.acpi_name = "MSSL1680:00" ,
269
269
.properties = pov_mobii_wintab_p800w_v21_props ,
270
270
};
@@ -278,7 +278,7 @@ static const struct property_entry teclast_x3_plus_props[] = {
278
278
{ }
279
279
};
280
280
281
- static const struct silead_ts_dmi_data teclast_x3_plus_data = {
281
+ static const struct ts_dmi_data teclast_x3_plus_data = {
282
282
.acpi_name = "MSSL1680:00" ,
283
283
.properties = teclast_x3_plus_props ,
284
284
};
@@ -294,7 +294,7 @@ static const struct property_entry teclast_x98plus2_props[] = {
294
294
{ }
295
295
};
296
296
297
- static const struct silead_ts_dmi_data teclast_x98plus2_data = {
297
+ static const struct ts_dmi_data teclast_x98plus2_data = {
298
298
.acpi_name = "MSSL1680:00" ,
299
299
.properties = teclast_x98plus2_props ,
300
300
};
@@ -309,7 +309,7 @@ static const struct property_entry trekstor_primebook_c13_props[] = {
309
309
{ }
310
310
};
311
311
312
- static const struct silead_ts_dmi_data trekstor_primebook_c13_data = {
312
+ static const struct ts_dmi_data trekstor_primebook_c13_data = {
313
313
.acpi_name = "MSSL1680:00" ,
314
314
.properties = trekstor_primebook_c13_props ,
315
315
};
@@ -324,7 +324,7 @@ static const struct property_entry trekstor_surftab_twin_10_1_props[] = {
324
324
{ }
325
325
};
326
326
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 = {
328
328
.acpi_name = "MSSL1680:00" ,
329
329
.properties = trekstor_surftab_twin_10_1_props ,
330
330
};
@@ -339,13 +339,13 @@ static const struct property_entry trekstor_surftab_wintron70_props[] = {
339
339
{ }
340
340
};
341
341
342
- static const struct silead_ts_dmi_data trekstor_surftab_wintron70_data = {
342
+ static const struct ts_dmi_data trekstor_surftab_wintron70_data = {
343
343
.acpi_name = "MSSL1680:00" ,
344
344
.properties = trekstor_surftab_wintron70_props ,
345
345
};
346
346
347
347
/* 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 [] = {
349
349
{
350
350
/* Chuwi Hi8 */
351
351
.driver_data = (void * )& chuwi_hi8_data ,
@@ -586,22 +586,22 @@ static const struct dmi_system_id silead_ts_dmi_table[] = {
586
586
{ },
587
587
};
588
588
589
- static const struct silead_ts_dmi_data * silead_ts_data ;
589
+ static const struct ts_dmi_data * ts_data ;
590
590
591
- static void silead_ts_dmi_add_props (struct i2c_client * client )
591
+ static void ts_dmi_add_props (struct i2c_client * client )
592
592
{
593
593
struct device * dev = & client -> dev ;
594
594
int error ;
595
595
596
596
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 );
599
599
if (error )
600
600
dev_err (dev , "failed to add properties: %d\n" , error );
601
601
}
602
602
}
603
603
604
- static int silead_ts_dmi_notifier_call (struct notifier_block * nb ,
604
+ static int ts_dmi_notifier_call (struct notifier_block * nb ,
605
605
unsigned long action , void * data )
606
606
{
607
607
struct device * dev = data ;
@@ -611,7 +611,7 @@ static int silead_ts_dmi_notifier_call(struct notifier_block *nb,
611
611
case BUS_NOTIFY_ADD_DEVICE :
612
612
client = i2c_verify_client (dev );
613
613
if (client )
614
- silead_ts_dmi_add_props (client );
614
+ ts_dmi_add_props (client );
615
615
break ;
616
616
617
617
default :
@@ -621,22 +621,22 @@ static int silead_ts_dmi_notifier_call(struct notifier_block *nb,
621
621
return 0 ;
622
622
}
623
623
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 ,
626
626
};
627
627
628
- static int __init silead_ts_dmi_init (void )
628
+ static int __init ts_dmi_init (void )
629
629
{
630
630
const struct dmi_system_id * dmi_id ;
631
631
int error ;
632
632
633
- dmi_id = dmi_first_match (silead_ts_dmi_table );
633
+ dmi_id = dmi_first_match (touchscreen_dmi_table );
634
634
if (!dmi_id )
635
635
return 0 ; /* Not an error */
636
636
637
- silead_ts_data = dmi_id -> driver_data ;
637
+ ts_data = dmi_id -> driver_data ;
638
638
639
- error = bus_register_notifier (& i2c_bus_type , & silead_ts_dmi_notifier );
639
+ error = bus_register_notifier (& i2c_bus_type , & ts_dmi_notifier );
640
640
if (error )
641
641
pr_err ("%s: failed to register i2c bus notifier: %d\n" ,
642
642
__func__ , error );
@@ -649,4 +649,4 @@ static int __init silead_ts_dmi_init(void)
649
649
* itself is ready (which happens at postcore initcall level), but before
650
650
* ACPI starts enumerating devices (at subsys initcall level).
651
651
*/
652
- arch_initcall (silead_ts_dmi_init );
652
+ arch_initcall (ts_dmi_init );
0 commit comments