From: Alexander Clouter <alex-L4GPcECwBoDe9xe1eoZjHA@public.gmane.org>
To: Alessandro Zummo
<a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org>,
Hartley Sweeten
<hsweeten-3FF4nKcrg1dE2c76skzGb0EOCMrvLtNR@public.gmane.org>,
Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
Ryan Mallon <rmallon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Alexander Clouter <alex-L4GPcECwBoDe9xe1eoZjHA@public.gmane.org>
Subject: [PATCH 6/6] rtc: rtc-m48t86: add devicetree bindings
Date: Tue, 2 Apr 2013 00:22:45 +0100 [thread overview]
Message-ID: <1364858565-17192-7-git-send-email-alex@digriz.org.uk> (raw)
In-Reply-To: <1364858565-17192-1-git-send-email-alex-L4GPcECwBoDe9xe1eoZjHA@public.gmane.org>
Add devicetree bindings (and documentation) for rtc-m48t86.
Signed-off-by: Alexander Clouter <alex-L4GPcECwBoDe9xe1eoZjHA@public.gmane.org>
---
Documentation/devicetree/bindings/rtc/rtc-m48t86.txt | 17 +++++++++++++++++
drivers/rtc/rtc-m48t86.c | 12 ++++++++++--
2 files changed, 27 insertions(+), 2 deletions(-)
create mode 100644 Documentation/devicetree/bindings/rtc/rtc-m48t86.txt
diff --git a/Documentation/devicetree/bindings/rtc/rtc-m48t86.txt b/Documentation/devicetree/bindings/rtc/rtc-m48t86.txt
new file mode 100644
index 0000000..375ea56
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-m48t86.txt
@@ -0,0 +1,17 @@
+RTC support for the rtc-m48t86 driver
+
+Required properties:
+- compatible : "rtc-m48t86"
+- reg : Array of base physical addresses for the RTC control and data
+- reg-names : must have "rtc_index" and "rtc_data"
+
+Example:
+
+rtc@808 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "rtc-m48t86";
+ reg = <0x808 0x04>,
+ <0x80c 0x04>;
+ reg-names = "rtc_index", "rtc_data";
+};
diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c
index b8edf73..9395126 100644
--- a/drivers/rtc/rtc-m48t86.c
+++ b/drivers/rtc/rtc-m48t86.c
@@ -20,6 +20,7 @@
#include <linux/bcd.h>
#include <linux/slab.h>
#include <linux/io.h>
+#include <linux/of.h>
#define M48T86_REG_SEC 0x00
#define M48T86_REG_SECALRM 0x01
@@ -335,10 +336,17 @@ static int m48t86_rtc_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id m48t86_rtc_match[] = {
+ { .compatible = "rtc-m48t86" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, m48t86_rtc_match);
+
static struct platform_driver m48t86_rtc_platform_driver = {
.driver = {
- .name = "rtc-m48t86",
- .owner = THIS_MODULE,
+ .name = "rtc-m48t86",
+ .owner = THIS_MODULE,
+ .of_match_table = m48t86_rtc_match,
},
.probe = m48t86_rtc_probe,
.remove = m48t86_rtc_remove,
--
1.7.10.4
next prev parent reply other threads:[~2013-04-01 23:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-01 23:22 [PATCHv2 0/6] add devicetree bindings for rtc-m48t86 Alexander Clouter
[not found] ` <1364858565-17192-1-git-send-email-alex-L4GPcECwBoDe9xe1eoZjHA@public.gmane.org>
2013-04-01 23:22 ` [PATCH 1/6] rtc: rtc-m48t86: move m48t86.h to platform_data Alexander Clouter
2013-04-01 23:22 ` [PATCH 2/6] rtc: rtc-m48t86: add hooks to support driver side memory mapping Alexander Clouter
[not found] ` <1364858565-17192-3-git-send-email-alex-L4GPcECwBoDe9xe1eoZjHA@public.gmane.org>
2013-04-01 23:36 ` Ryan Mallon
[not found] ` <515A1A0B.8040803-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-04-01 23:42 ` Alexander Clouter
2013-04-02 5:37 ` Ryan Mallon
2013-04-02 5:34 ` Ryan Mallon
2013-04-02 11:04 ` [PATCHv2 " Alexander Clouter
2013-04-04 7:25 ` [PATCH " Andrew Lunn
2013-04-01 23:22 ` [PATCH 4/6] arm: orion5x: move ts78xx to use rtc-m48t86 driver side memory interface Alexander Clouter
[not found] ` <1364858565-17192-5-git-send-email-alex-L4GPcECwBoDe9xe1eoZjHA@public.gmane.org>
2013-04-02 11:50 ` Jason Cooper
2013-04-01 23:22 ` [PATCH 5/6] arm: ep93xx: move ts72xx " Alexander Clouter
2013-04-01 23:22 ` Alexander Clouter [this message]
2013-04-01 23:22 ` [PATCH 3/6] rtc: rtc-m48t86: add detect method for RTC Alexander Clouter
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=1364858565-17192-7-git-send-email-alex@digriz.org.uk \
--to=alex-l4gpcecwbode9xe1eozjha@public.gmane.org \
--cc=a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org \
--cc=andrew-g2DYL2Zd6BY@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=hsweeten-3FF4nKcrg1dE2c76skzGb0EOCMrvLtNR@public.gmane.org \
--cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=rmallon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.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).