Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1578881 > unrolled thread
| Started by | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| First post | 2017-02-11 01:10 +0100 |
| Last post | 2017-02-11 18:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/3] Input: tsc2005 - add OF device table Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-11 01:10 +0100
Re: [PATCH 1/3] Input: tsc2005 - add OF device table Sebastian Reichel <sre@kernel.org> - 2017-02-11 18:10 +0100
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2017-02-11 01:10 +0100 |
| Subject | [PATCH 1/3] Input: tsc2005 - add OF device table |
| Message-ID | <t9tqh-203-11@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Sebastian Reichel <sre@kernel.org> |
|---|---|
| Date | 2017-02-11 18:10 +0100 |
| Message-ID | <t9Jlo-3na-19@gated-at.bofh.it> |
| In reply to | #1578881 |
[Multipart message — attachments visible in raw view] — view raw
Hi, On Fri, Feb 10, 2017 at 04:06:21PM -0800, Dmitry Torokhov wrote: > 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> Reviewed-By: Sebastian Reichel <sre@kernel.org> -- Sebastian
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web