diff options
Diffstat (limited to 'drivers/input/touchscreen/tsc2005.c')
-rw-r--r-- | drivers/input/touchscreen/tsc2005.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index f2c5f0e47f77..e02b69f40ad8 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c | |||
@@ -18,8 +18,9 @@ | |||
18 | * GNU General Public License for more details. | 18 | * GNU General Public License for more details. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/module.h> | ||
22 | #include <linux/input.h> | 21 | #include <linux/input.h> |
22 | #include <linux/module.h> | ||
23 | #include <linux/of.h> | ||
23 | #include <linux/spi/spi.h> | 24 | #include <linux/spi/spi.h> |
24 | #include <linux/regmap.h> | 25 | #include <linux/regmap.h> |
25 | #include "tsc200x-core.h" | 26 | #include "tsc200x-core.h" |
@@ -77,9 +78,18 @@ static int tsc2005_remove(struct spi_device *spi) | |||
77 | return tsc200x_remove(&spi->dev); | 78 | return tsc200x_remove(&spi->dev); |
78 | } | 79 | } |
79 | 80 | ||
81 | #ifdef CONFIG_OF | ||
82 | static const struct of_device_id tsc2005_of_match[] = { | ||
83 | { .compatible = "ti,tsc2005" }, | ||
84 | { /* sentinel */ } | ||
85 | }; | ||
86 | MODULE_DEVICE_TABLE(of, tsc2005_of_match); | ||
87 | #endif | ||
88 | |||
80 | static struct spi_driver tsc2005_driver = { | 89 | static struct spi_driver tsc2005_driver = { |
81 | .driver = { | 90 | .driver = { |
82 | .name = "tsc2005", | 91 | .name = "tsc2005", |
92 | .of_match_table = of_match_ptr(tsc2005_of_match), | ||
83 | .pm = &tsc200x_pm_ops, | 93 | .pm = &tsc200x_pm_ops, |
84 | }, | 94 | }, |
85 | .probe = tsc2005_probe, | 95 | .probe = tsc2005_probe, |