Skip to content

Commit

Permalink
Input: st1232 - add device tree support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Magnus Damm authored and Dmitry Torokhov committed Apr 4, 2012
1 parent 0bf25a4 commit e6293d2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/input/touchscreen/st1232.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,22 @@ 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),
.id_table = st1232_ts_id,
.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
Expand Down

0 comments on commit e6293d2

Please sign in to comment.