From: zonque@gmail.com (Daniel Mack)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/7] RTC: add DT bindings to pxa-rtc
Date: Thu, 26 Jul 2012 21:16:21 +0200 [thread overview]
Message-ID: <1343330187-20049-2-git-send-email-zonque@gmail.com> (raw)
In-Reply-To: <1343330187-20049-1-git-send-email-zonque@gmail.com>
This patch adds generic device tree bindings to the PXA RTC driver.
Documentation for bindings were also added.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Alessandro Zummo <a.zummo@towertech.it>
---
Documentation/devicetree/bindings/rtc/pxa-rtc.txt | 14 ++++++++++++++
drivers/rtc/rtc-pxa.c | 11 +++++++++++
2 files changed, 25 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rtc/pxa-rtc.txt
diff --git a/Documentation/devicetree/bindings/rtc/pxa-rtc.txt b/Documentation/devicetree/bindings/rtc/pxa-rtc.txt
new file mode 100644
index 0000000..8c6672a
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/pxa-rtc.txt
@@ -0,0 +1,14 @@
+* PXA RTC
+
+PXA specific RTC driver.
+
+Required properties:
+- compatible : Should be "marvell,pxa-rtc"
+
+Examples:
+
+rtc at 40900000 {
+ compatible = "marvell,pxa-rtc";
+ reg = <0x40900000 0x3c>;
+ interrupts = <30 31>;
+};
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c
index 0075c8f..f771b2e 100644
--- a/drivers/rtc/rtc-pxa.c
+++ b/drivers/rtc/rtc-pxa.c
@@ -27,6 +27,8 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/slab.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
#include <mach/hardware.h>
@@ -396,6 +398,14 @@ static int __exit pxa_rtc_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static struct of_device_id pxa_rtc_dt_ids[] = {
+ { .compatible = "marvell,pxa-rtc" },
+ {}
+};
+MODULE_DEVICE_TABLE(of, pxa_rtc_dt_ids);
+#endif
+
#ifdef CONFIG_PM
static int pxa_rtc_suspend(struct device *dev)
{
@@ -425,6 +435,7 @@ static struct platform_driver pxa_rtc_driver = {
.remove = __exit_p(pxa_rtc_remove),
.driver = {
.name = "pxa-rtc",
+ .of_match_table = of_match_ptr(pxa_rtc_dt_ids),
#ifdef CONFIG_PM
.pm = &pxa_rtc_pm_ops,
#endif
--
1.7.11.2
next prev parent reply other threads:[~2012-07-26 19:16 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-26 19:16 [PATCH v2 0/7] Assorted PXA3xx DT patches Daniel Mack
2012-07-26 19:16 ` Daniel Mack [this message]
2012-07-26 19:16 ` [PATCH v2 2/7] MMC: pxa-mci: add DT bindings Daniel Mack
2012-07-26 19:16 ` [PATCH v2 3/7] MTD: pxa3xx-nand: add devicetree bindings Daniel Mack
2012-07-26 19:16 ` [PATCH v2 4/7] ARM: pxa: add devicetree code for irq handling Daniel Mack
2012-07-28 7:17 ` Haojian Zhuang
2012-07-28 9:56 ` Daniel Mack
2012-07-28 15:42 ` Haojian Zhuang
2012-07-29 14:09 ` Arnd Bergmann
2012-07-29 20:40 ` Daniel Mack
2012-07-30 8:31 ` Arnd Bergmann
2012-07-30 8:34 ` Daniel Mack
2012-07-30 8:55 ` Haojian Zhuang
2012-07-30 9:31 ` Daniel Mack
2012-07-31 12:18 ` Arnd Bergmann
2012-07-29 15:08 ` Daniel Mack
2012-07-29 15:54 ` Haojian Zhuang
2012-07-29 19:01 ` Daniel Mack
2012-07-30 1:20 ` Haojian Zhuang
2012-07-30 1:24 ` Haojian Zhuang
2012-07-30 7:11 ` Daniel Mack
2012-07-29 16:13 ` Haojian Zhuang
2012-07-26 19:16 ` [PATCH v2 5/7] ARM: pxa3xx: skip default device initialization when booting via DT Daniel Mack
2012-07-26 19:16 ` [PATCH v2 6/7] ARM: pxa3xx: add generic DT machine code Daniel Mack
2012-07-26 19:16 ` [PATCH v2 7/7] ARM: pxa: add .dtsi files 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=1343330187-20049-2-git-send-email-zonque@gmail.com \
--to=zonque@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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).