linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] Input: tsc2005 - add OF device table
@ 2017-02-11  0:06 Dmitry Torokhov
  2017-02-11  0:06 ` [PATCH 2/3] Input: tsc2004/5 - fix regulator handling Dmitry Torokhov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Dmitry Torokhov @ 2017-02-11  0:06 UTC (permalink / raw)
  To: linux-input
  Cc: Sebastian Reichel, Pali Rohár, Michael Welling, linux-kernel

To be prepared for SPI module loading using full compatible strings from
device tree, let's add OF module device table data.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/touchscreen/tsc2005.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

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 @@
  * GNU General Public License for more details.
  */
 
-#include <linux/module.h>
 #include <linux/input.h>
+#include <linux/module.h>
+#include <linux/of.h>
 #include <linux/spi/spi.h>
 #include <linux/regmap.h>
 #include "tsc200x-core.h"
@@ -77,9 +78,18 @@ static int tsc2005_remove(struct spi_device *spi)
 	return tsc200x_remove(&spi->dev);
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id tsc2005_of_match[] = {
+	{ .compatible = "ti,tsc2005" },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, tsc2005_of_match);
+#endif
+
 static struct spi_driver tsc2005_driver = {
 	.driver	= {
 		.name	= "tsc2005",
+		.of_match_table = of_match_ptr(tsc2005_of_match),
 		.pm	= &tsc200x_pm_ops,
 	},
 	.probe	= tsc2005_probe,
-- 
2.11.0.483.g087da7b7c-goog

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-02-11 17:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-11  0:06 [PATCH 1/3] Input: tsc2005 - add OF device table Dmitry Torokhov
2017-02-11  0:06 ` [PATCH 2/3] Input: tsc2004/5 - fix regulator handling Dmitry Torokhov
2017-02-11 17:02   ` Sebastian Reichel
2017-02-11  0:06 ` [PATCH 3/3] Input: tsc2004/5 - switch to using generic device properties Dmitry Torokhov
2017-02-11 17:37   ` Sebastian Reichel
2017-02-11 17:03 ` [PATCH 1/3] Input: tsc2005 - add OF device table Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).