summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2012-04-03 11:30:28 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-04-04 09:25:40 -0700
commite6293d2f8a6cd427a1ef4ddecb16b1d5ae1929cd (patch)
treeb14fb66ac1395ec578bf8b250e266bd1cc6cbb48 /drivers/input/touchscreen
parent0bf25a45386f284d591530ef174eaa9e44d84956 (diff)
Input: st1232 - add device tree support
This patch enables DT support for the st1232 driver which is primarily used on the sh7372 Mackerel board. [dtor@mail.ru: chnaged to use CONFIG_OF and of_match_ptr] Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r--drivers/input/touchscreen/st1232.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c
index cbbf71b2269..216fabb5acc 100644
--- a/drivers/input/touchscreen/st1232.c
+++ b/drivers/input/touchscreen/st1232.c
@@ -255,6 +255,14 @@ static const struct i2c_device_id st1232_ts_id[] = {
};
MODULE_DEVICE_TABLE(i2c, st1232_ts_id);
+#ifdef CONFIG_OF
+static const struct of_device_id st1232_ts_dt_ids[] __devinitconst = {
+ { .compatible = "sitronix,st1232", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, st1232_ts_dt_ids);
+#endif
+
static struct i2c_driver st1232_ts_driver = {
.probe = st1232_ts_probe,
.remove = __devexit_p(st1232_ts_remove),
@@ -262,6 +270,7 @@ static struct i2c_driver st1232_ts_driver = {
.driver = {
.name = ST1232_TS_NAME,
.owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(st1232_ts_dt_ids),
#ifdef CONFIG_PM
.pm = &st1232_ts_pm_ops,
#endif