* [PATCH] MXS: Add DT binding support into stmp3xxx-rtc
@ 2012-05-27 2:11 Marek Vasut
2012-06-06 5:29 ` Shawn Guo
0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2012-05-27 2:11 UTC (permalink / raw)
To: linux-arm-kernel
Add simple binding for the stmp3xxx-rtc.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: devicetree-discuss at lists.ozlabs.org
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: rtc-linux at googlegroups.com
Cc: Shawn Guo <shawn.guo@linaro.org>
---
.../devicetree/bindings/rtc/stmp3xxx-rtc.txt | 20 ++++++++++++++++++++
arch/arm/boot/dts/imx28.dtsi | 1 +
drivers/rtc/rtc-stmp3xxx.c | 8 ++++++++
3 files changed, 29 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
diff --git a/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
new file mode 100644
index 0000000..a49dd52
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
@@ -0,0 +1,20 @@
+* STMP3xxx/i.MX28 Time Clock controller
+
+Required properties:
+- compatible: should be one of the following.
+ * "fsl,stmp3xxx-rtc"
+ * "fsl,imx28-rtc"
+- reg: physical base address of the controller and length of memory mapped
+ region.
+- interrupts: Two interrupt numbers to the cpu should be specified. First
+ interrupt number is the rtc rick interupt and second interrupt number
+ is the rtc alarm interrupt. The number of cells representing a interrupt
+ depends on the parent interrupt controller.
+
+Example:
+
+ rtc at 80056000 {
+ compatible = "fsl,imx28-rtc";
+ reg = <0x80056000 2000>;
+ interrupts = <28 29>;
+ };
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index d470276..119f183 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -370,6 +370,7 @@
};
rtc at 80056000 {
+ compatible = "fsl,imx28-rtc";
reg = <0x80056000 2000>;
interrupts = <28 29>;
status = "disabled";
diff --git a/drivers/rtc/rtc-stmp3xxx.c b/drivers/rtc/rtc-stmp3xxx.c
index 1028786..dea9764 100644
--- a/drivers/rtc/rtc-stmp3xxx.c
+++ b/drivers/rtc/rtc-stmp3xxx.c
@@ -25,6 +25,7 @@
#include <linux/interrupt.h>
#include <linux/rtc.h>
#include <linux/slab.h>
+#include <linux/of_device.h>
#include <mach/common.h>
@@ -265,6 +266,12 @@ static int stmp3xxx_rtc_resume(struct platform_device *dev)
#define stmp3xxx_rtc_resume NULL
#endif
+static const struct of_device_id rtc_dt_ids[] = {
+ { .compatible = "fsl,stmp3xxx-rtc", },
+ { .compatible = "fsl,imx28-rtc", },
+ { /* sentinel */ }
+};
+
static struct platform_driver stmp3xxx_rtcdrv = {
.probe = stmp3xxx_rtc_probe,
.remove = stmp3xxx_rtc_remove,
@@ -273,6 +280,7 @@ static struct platform_driver stmp3xxx_rtcdrv = {
.driver = {
.name = "stmp3xxx-rtc",
.owner = THIS_MODULE,
+ .of_match_table = rtc_dt_ids,
},
};
--
1.7.10
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] MXS: Add DT binding support into stmp3xxx-rtc
2012-05-27 2:11 [PATCH] MXS: Add DT binding support into stmp3xxx-rtc Marek Vasut
@ 2012-06-06 5:29 ` Shawn Guo
2012-06-06 7:57 ` Lothar Waßmann
0 siblings, 1 reply; 4+ messages in thread
From: Shawn Guo @ 2012-06-06 5:29 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, May 27, 2012 at 04:11:29AM +0200, Marek Vasut wrote:
> Add simple binding for the stmp3xxx-rtc.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Alessandro Zummo <a.zummo@towertech.it>
> Cc: devicetree-discuss at lists.ozlabs.org
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: rtc-linux at googlegroups.com
> Cc: Shawn Guo <shawn.guo@linaro.org>
> ---
> .../devicetree/bindings/rtc/stmp3xxx-rtc.txt | 20 ++++++++++++++++++++
> arch/arm/boot/dts/imx28.dtsi | 1 +
> drivers/rtc/rtc-stmp3xxx.c | 8 ++++++++
> 3 files changed, 29 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
>
> diff --git a/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
> new file mode 100644
> index 0000000..a49dd52
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
> @@ -0,0 +1,20 @@
> +* STMP3xxx/i.MX28 Time Clock controller
> +
> +Required properties:
> +- compatible: should be one of the following.
> + * "fsl,stmp3xxx-rtc"
> + * "fsl,imx28-rtc"
> +- reg: physical base address of the controller and length of memory mapped
> + region.
> +- interrupts: Two interrupt numbers to the cpu should be specified. First
> + interrupt number is the rtc rick interupt and second interrupt number
s/rick/tick?
> + is the rtc alarm interrupt. The number of cells representing a interrupt
> + depends on the parent interrupt controller.
> +
> +Example:
> +
> + rtc at 80056000 {
> + compatible = "fsl,imx28-rtc";
> + reg = <0x80056000 2000>;
> + interrupts = <28 29>;
> + };
> diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
> index d470276..119f183 100644
> --- a/arch/arm/boot/dts/imx28.dtsi
> +++ b/arch/arm/boot/dts/imx28.dtsi
> @@ -370,6 +370,7 @@
> };
>
> rtc at 80056000 {
> + compatible = "fsl,imx28-rtc";
> reg = <0x80056000 2000>;
> interrupts = <28 29>;
> status = "disabled";
> diff --git a/drivers/rtc/rtc-stmp3xxx.c b/drivers/rtc/rtc-stmp3xxx.c
> index 1028786..dea9764 100644
> --- a/drivers/rtc/rtc-stmp3xxx.c
> +++ b/drivers/rtc/rtc-stmp3xxx.c
> @@ -25,6 +25,7 @@
> #include <linux/interrupt.h>
> #include <linux/rtc.h>
> #include <linux/slab.h>
> +#include <linux/of_device.h>
>
> #include <mach/common.h>
>
> @@ -265,6 +266,12 @@ static int stmp3xxx_rtc_resume(struct platform_device *dev)
> #define stmp3xxx_rtc_resume NULL
> #endif
>
> +static const struct of_device_id rtc_dt_ids[] = {
> + { .compatible = "fsl,stmp3xxx-rtc", },
> + { .compatible = "fsl,imx28-rtc", },
If we do not have any tweaking in the driver between stmp3xxx-rtc and
imx28-rtc, that means imx28-rtc is compatible with stmp3xxx-rtc. That
said, we only need stmp3xxx-rtc in this of_device_id table, and having
the following line in imx28 dts will just work for imx28.
compatible = "fsl,imx28-rtc", "stmp3xxx-rtc";
Regards,
Shawn
> + { /* sentinel */ }
> +};
> +
> static struct platform_driver stmp3xxx_rtcdrv = {
> .probe = stmp3xxx_rtc_probe,
> .remove = stmp3xxx_rtc_remove,
> @@ -273,6 +280,7 @@ static struct platform_driver stmp3xxx_rtcdrv = {
> .driver = {
> .name = "stmp3xxx-rtc",
> .owner = THIS_MODULE,
> + .of_match_table = rtc_dt_ids,
> },
> };
>
> --
> 1.7.10
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] MXS: Add DT binding support into stmp3xxx-rtc
2012-06-06 5:29 ` Shawn Guo
@ 2012-06-06 7:57 ` Lothar Waßmann
2012-06-08 15:42 ` Marek Vasut
0 siblings, 1 reply; 4+ messages in thread
From: Lothar Waßmann @ 2012-06-06 7:57 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Shawn Guo writes:
> On Sun, May 27, 2012 at 04:11:29AM +0200, Marek Vasut wrote:
> > Add simple binding for the stmp3xxx-rtc.
> >
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Alessandro Zummo <a.zummo@towertech.it>
> > Cc: devicetree-discuss at lists.ozlabs.org
> > Cc: Grant Likely <grant.likely@secretlab.ca>
> > Cc: Rob Herring <rob.herring@calxeda.com>
> > Cc: rtc-linux at googlegroups.com
> > Cc: Shawn Guo <shawn.guo@linaro.org>
> > ---
> > .../devicetree/bindings/rtc/stmp3xxx-rtc.txt | 20 ++++++++++++++++++++
> > arch/arm/boot/dts/imx28.dtsi | 1 +
> > drivers/rtc/rtc-stmp3xxx.c | 8 ++++++++
> > 3 files changed, 29 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
> >
> > diff --git a/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
> > new file mode 100644
> > index 0000000..a49dd52
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
> > @@ -0,0 +1,20 @@
> > +* STMP3xxx/i.MX28 Time Clock controller
> > +
> > +Required properties:
> > +- compatible: should be one of the following.
> > + * "fsl,stmp3xxx-rtc"
> > + * "fsl,imx28-rtc"
> > +- reg: physical base address of the controller and length of memory mapped
> > + region.
> > +- interrupts: Two interrupt numbers to the cpu should be specified. First
> > + interrupt number is the rtc rick interupt and second interrupt number
>
> s/rick/tick?
>
s/interupt/interrupt/
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] MXS: Add DT binding support into stmp3xxx-rtc
2012-06-06 7:57 ` Lothar Waßmann
@ 2012-06-08 15:42 ` Marek Vasut
0 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2012-06-08 15:42 UTC (permalink / raw)
To: linux-arm-kernel
Dear Lothar Wa?mann,
> Hi,
>
> Shawn Guo writes:
> > On Sun, May 27, 2012 at 04:11:29AM +0200, Marek Vasut wrote:
> > > Add simple binding for the stmp3xxx-rtc.
> > >
> > > Signed-off-by: Marek Vasut <marex@denx.de>
> > > Cc: Alessandro Zummo <a.zummo@towertech.it>
> > > Cc: devicetree-discuss at lists.ozlabs.org
> > > Cc: Grant Likely <grant.likely@secretlab.ca>
> > > Cc: Rob Herring <rob.herring@calxeda.com>
> > > Cc: rtc-linux at googlegroups.com
> > > Cc: Shawn Guo <shawn.guo@linaro.org>
> > > ---
> > >
> > > .../devicetree/bindings/rtc/stmp3xxx-rtc.txt | 20
> > > ++++++++++++++++++++ arch/arm/boot/dts/imx28.dtsi
> > > | 1 +
> > > drivers/rtc/rtc-stmp3xxx.c | 8 ++++++++
> > > 3 files changed, 29 insertions(+)
> > > create mode 100644
> > > Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
> > >
> > > diff --git a/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
> > > b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt new file mode
> > > 100644
> > > index 0000000..a49dd52
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt
> > > @@ -0,0 +1,20 @@
> > > +* STMP3xxx/i.MX28 Time Clock controller
> > > +
> > > +Required properties:
> > > +- compatible: should be one of the following.
> > > + * "fsl,stmp3xxx-rtc"
> > > + * "fsl,imx28-rtc"
> > > +- reg: physical base address of the controller and length of memory
> > > mapped + region.
> > > +- interrupts: Two interrupt numbers to the cpu should be specified.
> > > First + interrupt number is the rtc rick interupt and second
> > > interrupt number
> >
> > s/rick/tick?
>
> s/interupt/interrupt/
Heh, looks like I spik engrisch not ... :-)
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-06-08 15:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-27 2:11 [PATCH] MXS: Add DT binding support into stmp3xxx-rtc Marek Vasut
2012-06-06 5:29 ` Shawn Guo
2012-06-06 7:57 ` Lothar Waßmann
2012-06-08 15:42 ` Marek Vasut
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).