Input: st1232 - remove obsolete platform device support
Commit 1fa59bda21
("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>
This commit is contained in:
Родитель
0f1cd81d4a
Коммит
4a1a57df97
|
@ -29,7 +29,6 @@
|
||||||
#include <linux/pm_qos.h>
|
#include <linux/pm_qos.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/platform_data/st1232_pdata.h>
|
|
||||||
|
|
||||||
#define ST1232_TS_NAME "st1232-ts"
|
#define ST1232_TS_NAME "st1232-ts"
|
||||||
|
|
||||||
|
@ -152,10 +151,9 @@ static void st1232_ts_power(struct st1232_ts_data *ts, bool poweron)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int st1232_ts_probe(struct i2c_client *client,
|
static int st1232_ts_probe(struct i2c_client *client,
|
||||||
const struct i2c_device_id *id)
|
const struct i2c_device_id *id)
|
||||||
{
|
{
|
||||||
struct st1232_ts_data *ts;
|
struct st1232_ts_data *ts;
|
||||||
struct st1232_pdata *pdata = dev_get_platdata(&client->dev);
|
|
||||||
struct input_dev *input_dev;
|
struct input_dev *input_dev;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
|
@ -180,13 +178,7 @@ static int st1232_ts_probe(struct i2c_client *client,
|
||||||
ts->client = client;
|
ts->client = client;
|
||||||
ts->input_dev = input_dev;
|
ts->input_dev = input_dev;
|
||||||
|
|
||||||
if (pdata)
|
ts->reset_gpio = of_get_gpio(client->dev.of_node, 0);
|
||||||
ts->reset_gpio = pdata->reset_gpio;
|
|
||||||
else if (client->dev.of_node)
|
|
||||||
ts->reset_gpio = of_get_gpio(client->dev.of_node, 0);
|
|
||||||
else
|
|
||||||
ts->reset_gpio = -ENODEV;
|
|
||||||
|
|
||||||
if (gpio_is_valid(ts->reset_gpio)) {
|
if (gpio_is_valid(ts->reset_gpio)) {
|
||||||
error = devm_gpio_request(&client->dev, ts->reset_gpio, NULL);
|
error = devm_gpio_request(&client->dev, ts->reset_gpio, NULL);
|
||||||
if (error) {
|
if (error) {
|
||||||
|
@ -281,13 +273,11 @@ static const struct i2c_device_id st1232_ts_id[] = {
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(i2c, st1232_ts_id);
|
MODULE_DEVICE_TABLE(i2c, st1232_ts_id);
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
|
||||||
static const struct of_device_id st1232_ts_dt_ids[] = {
|
static const struct of_device_id st1232_ts_dt_ids[] = {
|
||||||
{ .compatible = "sitronix,st1232", },
|
{ .compatible = "sitronix,st1232", },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, st1232_ts_dt_ids);
|
MODULE_DEVICE_TABLE(of, st1232_ts_dt_ids);
|
||||||
#endif
|
|
||||||
|
|
||||||
static struct i2c_driver st1232_ts_driver = {
|
static struct i2c_driver st1232_ts_driver = {
|
||||||
.probe = st1232_ts_probe,
|
.probe = st1232_ts_probe,
|
||||||
|
@ -295,7 +285,7 @@ static struct i2c_driver st1232_ts_driver = {
|
||||||
.id_table = st1232_ts_id,
|
.id_table = st1232_ts_id,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = ST1232_TS_NAME,
|
.name = ST1232_TS_NAME,
|
||||||
.of_match_table = of_match_ptr(st1232_ts_dt_ids),
|
.of_match_table = st1232_ts_dt_ids,
|
||||||
.pm = &st1232_ts_pm_ops,
|
.pm = &st1232_ts_pm_ops,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
|
||||||
#ifndef _LINUX_ST1232_PDATA_H
|
|
||||||
#define _LINUX_ST1232_PDATA_H
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Optional platform data
|
|
||||||
*
|
|
||||||
* Use this if you want the driver to drive the reset pin.
|
|
||||||
*/
|
|
||||||
struct st1232_pdata {
|
|
||||||
int reset_gpio;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
Загрузка…
Ссылка в новой задаче