From: Stuart Longland <stuartl@vrt.com.au>
To: Roman Fietze <roman.fietze@telemotive.de>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Mark Rutland <mark.rutland@arm.com>,
Stuart Longland <stuartl@vrt.com.au>
Subject: [PATCH 1/2] drivers/rtc/rtc-isl12022.c: Device tree support
Date: Thu, 17 Jul 2014 07:31:01 +1000 [thread overview]
Message-ID: <1405546262-4333-2-git-send-email-stuartl@vrt.com.au> (raw)
In-Reply-To: <1405546262-4333-1-git-send-email-stuartl@vrt.com.au>
Add some support for configuring isl12020/isl12022 devices using the
Device Tree blob.
Signed-off-by: Stuart Longland <stuartl@vrt.com.au>
---
drivers/rtc/rtc-isl12022.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/rtc/rtc-isl12022.c b/drivers/rtc/rtc-isl12022.c
index 03b8911..59b0ea2 100644
--- a/drivers/rtc/rtc-isl12022.c
+++ b/drivers/rtc/rtc-isl12022.c
@@ -17,6 +17,8 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/err.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
#define DRV_VERSION "0.1"
@@ -271,6 +273,13 @@ static int isl12022_probe(struct i2c_client *client,
return PTR_ERR_OR_ZERO(isl12022->rtc);
}
+#ifdef CONFIG_OF
+static struct of_device_id isl12022_dt_match[] = {
+ { .compatible = "isl,isl12022" },
+ { },
+};
+#endif
+
static const struct i2c_device_id isl12022_id[] = {
{ "isl12022", 0 },
{ }
@@ -280,6 +289,7 @@ MODULE_DEVICE_TABLE(i2c, isl12022_id);
static struct i2c_driver isl12022_driver = {
.driver = {
.name = "rtc-isl12022",
+ .of_match_table = of_match_ptr(isl12022_dt_match),
},
.probe = isl12022_probe,
.id_table = isl12022_id,
--
1.8.5.5
next prev parent reply other threads:[~2014-07-16 21:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-16 2:28 Add device tree support to ISL12022 driver Stuart Longland
2014-07-16 2:28 ` [PATCH] drivers/rtc/rtc-isl12022.c: Device tree support Stuart Longland
2014-07-16 8:59 ` Mark Rutland
2014-07-16 9:35 ` Stuart Longland
2014-07-16 21:31 ` [REVISED PATCH] " Stuart Longland
2014-07-16 21:31 ` Stuart Longland [this message]
2014-07-16 21:31 ` [PATCH 2/2] devicetree: Document binding for isl12022 driver Stuart Longland
2014-07-21 23:25 ` [PATCH] drivers/rtc/rtc-isl12022.c: Device tree support Andrew Morton
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=1405546262-4333-2-git-send-email-stuartl@vrt.com.au \
--to=stuartl@vrt.com.au \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=roman.fietze@telemotive.de \
/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
Powered by JetHome