All of lore.kernel.org
 help / color / mirror / Atom feed
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 v2 2/4] input: touchscreen: eeti: add device tree matching table
Date: Sat, 23 Jun 2018 17:45:31 +0200	[thread overview]
Message-ID: <20180623154533.26901-3-daniel@zonque.org> (raw)
In-Reply-To: <20180623154533.26901-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

  parent reply	other threads:[~2018-06-23 15:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-23 15:45 [PATCH v2 0/4] input: touchscreen: eeti: DT bindings and clean-ups Daniel Mack
2018-06-23 15:45 ` [PATCH v2 1/4] dt-bindings: input: touchscreen: add bindings for eeti touchscreen controller Daniel Mack
2018-06-25 20:25   ` Rob Herring
2018-06-23 15:45 ` Daniel Mack [this message]
2018-06-23 15:45 ` [PATCH v2 3/4] input: touchscreen: eeti: drop module parameters, parse DT properties Daniel Mack
2018-06-23 15:45 ` [PATCH v2 4/4] input: touchscreen: eeti: fix link to documentation and email address in header Daniel Mack
2018-07-02  7:55 ` [PATCH v2 0/4] input: touchscreen: eeti: DT bindings and clean-ups Daniel Mack
2018-07-04 15:47   ` Dmitry Torokhov

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=20180623154533.26901-3-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.