From: Daniel Mack <daniel@zonque.org>
To: dmitry.torokhov@gmail.com, robh+dt@kernel.org
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
Daniel Mack <daniel@zonque.org>
Subject: [PATCH 2/5] input: touchscreen: eeti: add device tree matching table
Date: Sun, 17 Jun 2018 13:46:56 +0200 [thread overview]
Message-ID: <20180617114659.367-2-daniel@zonque.org> (raw)
In-Reply-To: <20180617114659.367-1-daniel@zonque.org>
Provide a match table so that the driver can be used in devicetree setups.
More properties are added in a later patch.
Signed-off-by: Daniel Mack <daniel@zonque.org>
---
drivers/input/touchscreen/eeti_ts.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c
index 2facad75eb6d..cc4fd33f9d6d 100644
--- a/drivers/input/touchscreen/eeti_ts.c
+++ b/drivers/input/touchscreen/eeti_ts.c
@@ -32,6 +32,7 @@
#include <linux/i2c.h>
#include <linux/timer.h>
#include <linux/gpio/consumer.h>
+#include <linux/of.h>
#include <linux/slab.h>
#include <asm/unaligned.h>
@@ -262,10 +263,18 @@ static const struct i2c_device_id eeti_ts_id[] = {
};
MODULE_DEVICE_TABLE(i2c, eeti_ts_id);
+#ifdef CONFIG_OF
+static const struct of_device_id of_eeti_ts_match[] = {
+ { .compatible = "eeti,exc3000-i2c", },
+ { }
+};
+#endif
+
static struct i2c_driver eeti_ts_driver = {
.driver = {
.name = "eeti_ts",
.pm = &eeti_ts_pm,
+ .of_match_table = of_match_ptr(of_eeti_ts_match),
},
.probe = eeti_ts_probe,
.id_table = eeti_ts_id,
--
2.17.1
next prev parent reply other threads:[~2018-06-17 11:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-17 11:46 [PATCH 1/5] dt-bindings: input: touchscreen: add bindings for eeti touchscreen controller Daniel Mack
2018-06-17 11:46 ` Daniel Mack [this message]
2018-06-17 11:46 ` [PATCH 3/5] input: touchscreen: eeti: add support for DT properties to flip screen Daniel Mack
2018-06-22 18:59 ` Dmitry Torokhov
2018-06-23 15:41 ` Daniel Mack
2018-06-17 11:46 ` [PATCH 4/5] input: touchscreen: eeti: fix link to documentation in header Daniel Mack
2018-06-17 11:46 ` [PATCH 5/5] input: touchscreen: eeti: update email address Daniel Mack
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180617114659.367-2-daniel@zonque.org \
--to=daniel@zonque.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).