Commit e6293d2f authored by Magnus Damm's avatar Magnus Damm Committed by Dmitry Torokhov

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: default avatarMagnus Damm <damm@opensource.se>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 0bf25a45
...@@ -255,6 +255,14 @@ static const struct i2c_device_id st1232_ts_id[] = { ...@@ -255,6 +255,14 @@ 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[] __devinitconst = {
{ .compatible = "sitronix,st1232", },
{ }
};
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,
.remove = __devexit_p(st1232_ts_remove), .remove = __devexit_p(st1232_ts_remove),
...@@ -262,6 +270,7 @@ static struct i2c_driver st1232_ts_driver = { ...@@ -262,6 +270,7 @@ static struct i2c_driver st1232_ts_driver = {
.driver = { .driver = {
.name = ST1232_TS_NAME, .name = ST1232_TS_NAME,
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = of_match_ptr(st1232_ts_dt_ids),
#ifdef CONFIG_PM #ifdef CONFIG_PM
.pm = &st1232_ts_pm_ops, .pm = &st1232_ts_pm_ops,
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment