input: st1232 device tree support
Subsystems (3)
PATCH 1/1 input: st1232 device tree support
From: Magnus Damm <[email protected]>
This patch enables DT support for the st1232 driver which is primarily used on the sh7372 Mackerel board.
Signed-off-by Magnus Damm <[email protected]>
---
drivers/input/touchscreen/st1232.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/input/touchscreen/st1232.c +7 -0
@@ -255,6 +255,12 @@ static const struct i2c_device_id st1232 };MODULE_DEVICE_TABLE (i2c, st1232_ts_id); +static const struct of_device_id st1232_ts_dt_ids[]__devinitconst = { + { .compatible ="sitronix,st1232" , }, + { } +}; +MODULE_DEVICE_TABLE (of, st1232_ts_dt_ids); +static struct i2c_driver st1232_ts_driver = { .probe = st1232_ts_probe, .remove =__devexit_p (st1232_ts_remove),
@@ -262,6 +268,7 @@ static struct i2c_driver st1232_ts_drive .driver = { .name = ST1232_TS_NAME, .owner = THIS_MODULE, + .of_match_table = st1232_ts_dt_ids,#ifdef CONFIG_PM .pm = &st1232_ts_pm_ops,#endif
Quoted 6 lines · Magnus Damm
From: Magnus Damm <[email protected]>
This patch enables DT support for the st1232 driver which is primarily used on the sh7372 Mackerel board.
Signed-off-by Magnus Damm <[email protected]>
Acked-by Arnd Bergmann <[email protected]>
Dmitry Torokhov
maintainerHi Magnus,
Quoted 14 lines · Magnus Damm
From: Magnus Damm <[email protected]>
This patch enables DT support for the st1232 driver which is primarily used on the sh7372 Mackerel board.
Signed-off-by Magnus Damm <[email protected]>---
drivers/input/touchscreen/st1232.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/input/touchscreen/st1232.c static const struct i2c_device_id st1232 · line 263
Quoted 9 lines
drivers/input/touchscreen/st1232.c +6
-0@@ -255,6 +255,12 @@ static const struct i2c_device_id st1232 };MODULE_DEVICE_TABLE (i2c, st1232_ts_id); +static const struct of_device_id st1232_ts_dt_ids[]__devinitconst = { + { .compatible ="sitronix,st1232" , }, + { } +}; +MODULE_DEVICE_TABLE (of, st1232_ts_dt_ids); +
Should it be guarder with "#ifdef CONFIG_OF" and then we'd do
.of_match_table = of_match_ptr(st1232_ts_dt_ids);
?
Thanks.
Quoted 11 lines
drivers/input/touchscreen/st1232.c +1
-0static struct i2c_driver st1232_ts_driver = { .probe = st1232_ts_probe, .remove =__devexit_p (st1232_ts_remove),@@ -262,6 +268,7 @@ static struct i2c_driver st1232_ts_drive .driver = { .name = ST1232_TS_NAME, .owner = THIS_MODULE, + .of_match_table = st1232_ts_dt_ids,#ifdef CONFIG_PM .pm = &st1232_ts_pm_ops,#endif
Signature · 1 line
Dmitry