diff options
| author | Magnus Damm <damm@opensource.se> | 2012-04-03 14:30:28 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-04-04 12:25:40 -0400 |
| commit | e6293d2f8a6cd427a1ef4ddecb16b1d5ae1929cd (patch) | |
| tree | b14fb66ac1395ec578bf8b250e266bd1cc6cbb48 /drivers/input/touchscreen | |
| parent | 0bf25a45386f284d591530ef174eaa9e44d84956 (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.c | 9 |
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[] = { | |||
| 255 | }; | 255 | }; |
| 256 | MODULE_DEVICE_TABLE(i2c, st1232_ts_id); | 256 | MODULE_DEVICE_TABLE(i2c, st1232_ts_id); |
| 257 | 257 | ||
| 258 | #ifdef CONFIG_OF | ||
| 259 | static const struct of_device_id st1232_ts_dt_ids[] __devinitconst = { | ||
| 260 | { .compatible = "sitronix,st1232", }, | ||
| 261 | { } | ||
| 262 | }; | ||
| 263 | MODULE_DEVICE_TABLE(of, st1232_ts_dt_ids); | ||
| 264 | #endif | ||
| 265 | |||
| 258 | static struct i2c_driver st1232_ts_driver = { | 266 | static struct i2c_driver st1232_ts_driver = { |
| 259 | .probe = st1232_ts_probe, | 267 | .probe = st1232_ts_probe, |
| 260 | .remove = __devexit_p(st1232_ts_remove), | 268 | .remove = __devexit_p(st1232_ts_remove), |
| @@ -262,6 +270,7 @@ static struct i2c_driver st1232_ts_driver = { | |||
| 262 | .driver = { | 270 | .driver = { |
| 263 | .name = ST1232_TS_NAME, | 271 | .name = ST1232_TS_NAME, |
| 264 | .owner = THIS_MODULE, | 272 | .owner = THIS_MODULE, |
| 273 | .of_match_table = of_match_ptr(st1232_ts_dt_ids), | ||
| 265 | #ifdef CONFIG_PM | 274 | #ifdef CONFIG_PM |
| 266 | .pm = &st1232_ts_pm_ops, | 275 | .pm = &st1232_ts_pm_ops, |
| 267 | #endif | 276 | #endif |
