* [PATCH resend] rtc: i.MX dryice: Add devicetree support
@ 2012-11-12 8:42 Sascha Hauer
2012-11-13 2:37 ` Shawn Guo
2012-11-14 22:52 ` Andrew Morton
0 siblings, 2 replies; 4+ messages in thread
From: Sascha Hauer @ 2012-11-12 8:42 UTC (permalink / raw)
To: linux-arm-kernel
Add devicetree probing, fixing some whitespace damage along the way.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
Just a resend with Andrew Morton on Cc since I got no reaction from the RTC
Maintainer.
Documentation/devicetree/bindings/rtc/imx-di.txt | 19 +++++++++++++++++++
drivers/rtc/rtc-imxdi.c | 12 +++++++++---
2 files changed, 28 insertions(+), 3 deletions(-)
create mode 100644 Documentation/devicetree/bindings/rtc/imx-di.txt
diff --git a/Documentation/devicetree/bindings/rtc/imx-di.txt b/Documentation/devicetree/bindings/rtc/imx-di.txt
new file mode 100644
index 0000000..42b92b5
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/imx-di.txt
@@ -0,0 +1,19 @@
+* i.MX25 dryice Real Time Clock controller
+
+This RTC is part of the i.MX25 dryice module. Documentation for this
+unit is not publically available. This binding only makes use of the
+RTC.
+
+Required properties:
+- compatible: should be "fsl,imx25-rtc"
+- reg: physical base address of the controller and length of memory mapped
+ region.
+- interrupts: interrupt source for the dryice module
+
+Example:
+
+ dryice at 53ffc000 {
+ compatible = "fsl,imx25-dryice", "fsl,imx25-rtc";
+ reg = <0x53ffc000 0x4000>;
+ interrupts = <25>;
+ };
diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c
index 891cd6c..b2fe920 100644
--- a/drivers/rtc/rtc-imxdi.c
+++ b/drivers/rtc/rtc-imxdi.c
@@ -493,11 +493,17 @@ static int __devexit dryice_rtc_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id of_dryice_rtc_match[] = {
+ { .compatible = "fsl,imx25-rtc", },
+ { },
+};
+
static struct platform_driver dryice_rtc_driver = {
.driver = {
- .name = "imxdi_rtc",
- .owner = THIS_MODULE,
- },
+ .name = "imxdi_rtc",
+ .owner = THIS_MODULE,
+ .of_match_table = of_dryice_rtc_match,
+ },
.remove = __devexit_p(dryice_rtc_remove),
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH resend] rtc: i.MX dryice: Add devicetree support
2012-11-12 8:42 [PATCH resend] rtc: i.MX dryice: Add devicetree support Sascha Hauer
@ 2012-11-13 2:37 ` Shawn Guo
2012-11-14 22:52 ` Andrew Morton
1 sibling, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2012-11-13 2:37 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 12, 2012 at 09:42:50AM +0100, Sascha Hauer wrote:
> Add devicetree probing, fixing some whitespace damage along the way.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>
> Just a resend with Andrew Morton on Cc since I got no reaction from the RTC
> Maintainer.
>
> Documentation/devicetree/bindings/rtc/imx-di.txt | 19 +++++++++++++++++++
> drivers/rtc/rtc-imxdi.c | 12 +++++++++---
> 2 files changed, 28 insertions(+), 3 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/rtc/imx-di.txt
>
> diff --git a/Documentation/devicetree/bindings/rtc/imx-di.txt b/Documentation/devicetree/bindings/rtc/imx-di.txt
> new file mode 100644
> index 0000000..42b92b5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/imx-di.txt
> @@ -0,0 +1,19 @@
> +* i.MX25 dryice Real Time Clock controller
> +
> +This RTC is part of the i.MX25 dryice module. Documentation for this
> +unit is not publically available. This binding only makes use of the
> +RTC.
> +
> +Required properties:
> +- compatible: should be "fsl,imx25-rtc"
> +- reg: physical base address of the controller and length of memory mapped
> + region.
> +- interrupts: interrupt source for the dryice module
> +
> +Example:
> +
> + dryice at 53ffc000 {
> + compatible = "fsl,imx25-dryice", "fsl,imx25-rtc";
> + reg = <0x53ffc000 0x4000>;
> + interrupts = <25>;
> + };
> diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c
> index 891cd6c..b2fe920 100644
> --- a/drivers/rtc/rtc-imxdi.c
> +++ b/drivers/rtc/rtc-imxdi.c
> @@ -493,11 +493,17 @@ static int __devexit dryice_rtc_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static const struct of_device_id of_dryice_rtc_match[] = {
> + { .compatible = "fsl,imx25-rtc", },
> + { },
> +};
> +
> static struct platform_driver dryice_rtc_driver = {
> .driver = {
> - .name = "imxdi_rtc",
> - .owner = THIS_MODULE,
> - },
> + .name = "imxdi_rtc",
> + .owner = THIS_MODULE,
> + .of_match_table = of_dryice_rtc_match,
> + },
> .remove = __devexit_p(dryice_rtc_remove),
> };
>
> --
> 1.7.10.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH resend] rtc: i.MX dryice: Add devicetree support
2012-11-12 8:42 [PATCH resend] rtc: i.MX dryice: Add devicetree support Sascha Hauer
2012-11-13 2:37 ` Shawn Guo
@ 2012-11-14 22:52 ` Andrew Morton
2012-11-15 8:11 ` Sascha Hauer
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2012-11-14 22:52 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 12 Nov 2012 09:42:50 +0100
Sascha Hauer <s.hauer@pengutronix.de> wrote:
> Add devicetree probing, fixing some whitespace damage along the way.
>
I've already merged the below. It has better code but a little less
documentation:
From: Roland Stigge <stigge@antcom.de>
Subject: drivers/rtc/rtc-imxdi.c: add devicetree support
Add device tree support to the rtc-imxdi driver.
Signed-off-by: Roland Stigge <stigge@antcom.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Documentation/devicetree/bindings/rtc/imxdi-rtc.txt | 17 ++++++++++
drivers/rtc/rtc-imxdi.c | 11 ++++++
2 files changed, 28 insertions(+)
diff -puN /dev/null Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
--- /dev/null
+++ a/Documentation/devicetree/bindings/rtc/imxdi-rtc.txt
@@ -0,0 +1,17 @@
+* i.MX25 Real Time Clock controller
+
+This binding supports the following chips: i.MX25, i.MX53
+
+Required properties:
+- compatible: should be: "fsl,imx25-rtc"
+- reg: physical base address of the controller and length of memory mapped
+ region.
+- interrupts: rtc alarm interrupt
+
+Example:
+
+rtc at 80056000 {
+ compatible = "fsl,imx53-rtc", "fsl,imx25-rtc";
+ reg = <0x80056000 2000>;
+ interrupts = <29>;
+};
diff -puN drivers/rtc/rtc-imxdi.c~rtc-imxdi-add-devicetree-support drivers/rtc/rtc-imxdi.c
--- a/drivers/rtc/rtc-imxdi.c~rtc-imxdi-add-devicetree-support
+++ a/drivers/rtc/rtc-imxdi.c
@@ -37,6 +37,7 @@
#include <linux/rtc.h>
#include <linux/sched.h>
#include <linux/workqueue.h>
+#include <linux/of.h>
/* DryIce Register Definitions */
@@ -495,10 +496,20 @@ static int __devexit dryice_rtc_remove(s
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id dryice_dt_ids[] = {
+ { .compatible = "fsl,imx25-rtc" },
+ { /* sentinel */ }
+};
+
+MODULE_DEVICE_TABLE(of, dryice_dt_ids);
+#endif
+
static struct platform_driver dryice_rtc_driver = {
.driver = {
.name = "imxdi_rtc",
.owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(dryice_dt_ids),
},
.remove = __devexit_p(dryice_rtc_remove),
};
_
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH resend] rtc: i.MX dryice: Add devicetree support
2012-11-14 22:52 ` Andrew Morton
@ 2012-11-15 8:11 ` Sascha Hauer
0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2012-11-15 8:11 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Nov 14, 2012 at 02:52:53PM -0800, Andrew Morton wrote:
> On Mon, 12 Nov 2012 09:42:50 +0100
> Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
> > Add devicetree probing, fixing some whitespace damage along the way.
> >
>
> I've already merged the below. It has better code but a little less
> documentation:
Oops, missed that. Too many RTCs...
Sorry for the noise.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-15 8:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-12 8:42 [PATCH resend] rtc: i.MX dryice: Add devicetree support Sascha Hauer
2012-11-13 2:37 ` Shawn Guo
2012-11-14 22:52 ` Andrew Morton
2012-11-15 8:11 ` Sascha Hauer
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).