diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2017-10-31 12:47:28 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-11-07 21:13:42 -0500 |
commit | 4a1a57df97636b9323c4221cc75a35694b6d34c7 (patch) | |
tree | db15849bcc99d2faa8743059452e9d24245e12cb | |
parent | 0f1cd81d4a50ca99fb0b5cd8f68584bc5acab081 (diff) |
Input: st1232 - remove obsolete platform device support
Commit 1fa59bda21c7fa36 ("ARM: shmobile: Remove legacy board code for
Armadillo-800 EVA"), removed the last user of st1232_pdata and the
"st1232-ts" platform device. All remaining users use DT.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/touchscreen/st1232.c | 16 | ||||
-rw-r--r-- | include/linux/platform_data/st1232_pdata.h | 14 |
2 files changed, 3 insertions, 27 deletions
diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c index be5615c6bf8f..d5dfa4053bbf 100644 --- a/drivers/input/touchscreen/st1232.c +++ b/drivers/input/touchscreen/st1232.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/pm_qos.h> | 29 | #include <linux/pm_qos.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/platform_data/st1232_pdata.h> | ||
33 | 32 | ||
34 | #define ST1232_TS_NAME "st1232-ts" | 33 | #define ST1232_TS_NAME "st1232-ts" |
35 | 34 | ||
@@ -152,10 +151,9 @@ static void st1232_ts_power(struct st1232_ts_data *ts, bool poweron) | |||
152 | } | 151 | } |
153 | 152 | ||
154 | static int st1232_ts_probe(struct i2c_client *client, | 153 | static int st1232_ts_probe(struct i2c_client *client, |
155 | const struct i2c_device_id *id) | 154 | const struct i2c_device_id *id) |
156 | { | 155 | { |
157 | struct st1232_ts_data *ts; | 156 | struct st1232_ts_data *ts; |
158 | struct st1232_pdata *pdata = dev_get_platdata(&client->dev); | ||
159 | struct input_dev *input_dev; | 157 | struct input_dev *input_dev; |
160 | int error; | 158 | int error; |
161 | 159 | ||
@@ -180,13 +178,7 @@ static int st1232_ts_probe(struct i2c_client *client, | |||
180 | ts->client = client; | 178 | ts->client = client; |
181 | ts->input_dev = input_dev; | 179 | ts->input_dev = input_dev; |
182 | 180 | ||
183 | if (pdata) | 181 | ts->reset_gpio = of_get_gpio(client->dev.of_node, 0); |
184 | ts->reset_gpio = pdata->reset_gpio; | ||
185 | else if (client->dev.of_node) | ||
186 | ts->reset_gpio = of_get_gpio(client->dev.of_node, 0); | ||
187 | else | ||
188 | ts->reset_gpio = -ENODEV; | ||
189 | |||
190 | if (gpio_is_valid(ts->reset_gpio)) { | 182 | if (gpio_is_valid(ts->reset_gpio)) { |
191 | error = devm_gpio_request(&client->dev, ts->reset_gpio, NULL); | 183 | error = devm_gpio_request(&client->dev, ts->reset_gpio, NULL); |
192 | if (error) { | 184 | if (error) { |
@@ -281,13 +273,11 @@ static const struct i2c_device_id st1232_ts_id[] = { | |||
281 | }; | 273 | }; |
282 | MODULE_DEVICE_TABLE(i2c, st1232_ts_id); | 274 | MODULE_DEVICE_TABLE(i2c, st1232_ts_id); |
283 | 275 | ||
284 | #ifdef CONFIG_OF | ||
285 | static const struct of_device_id st1232_ts_dt_ids[] = { | 276 | static const struct of_device_id st1232_ts_dt_ids[] = { |
286 | { .compatible = "sitronix,st1232", }, | 277 | { .compatible = "sitronix,st1232", }, |
287 | { } | 278 | { } |
288 | }; | 279 | }; |
289 | MODULE_DEVICE_TABLE(of, st1232_ts_dt_ids); | 280 | MODULE_DEVICE_TABLE(of, st1232_ts_dt_ids); |
290 | #endif | ||
291 | 281 | ||
292 | static struct i2c_driver st1232_ts_driver = { | 282 | static struct i2c_driver st1232_ts_driver = { |
293 | .probe = st1232_ts_probe, | 283 | .probe = st1232_ts_probe, |
@@ -295,7 +285,7 @@ static struct i2c_driver st1232_ts_driver = { | |||
295 | .id_table = st1232_ts_id, | 285 | .id_table = st1232_ts_id, |
296 | .driver = { | 286 | .driver = { |
297 | .name = ST1232_TS_NAME, | 287 | .name = ST1232_TS_NAME, |
298 | .of_match_table = of_match_ptr(st1232_ts_dt_ids), | 288 | .of_match_table = st1232_ts_dt_ids, |
299 | .pm = &st1232_ts_pm_ops, | 289 | .pm = &st1232_ts_pm_ops, |
300 | }, | 290 | }, |
301 | }; | 291 | }; |
diff --git a/include/linux/platform_data/st1232_pdata.h b/include/linux/platform_data/st1232_pdata.h deleted file mode 100644 index 1dcd23bee24e..000000000000 --- a/include/linux/platform_data/st1232_pdata.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
2 | #ifndef _LINUX_ST1232_PDATA_H | ||
3 | #define _LINUX_ST1232_PDATA_H | ||
4 | |||
5 | /* | ||
6 | * Optional platform data | ||
7 | * | ||
8 | * Use this if you want the driver to drive the reset pin. | ||
9 | */ | ||
10 | struct st1232_pdata { | ||
11 | int reset_gpio; | ||
12 | }; | ||
13 | |||
14 | #endif | ||