From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH V2] MXS: Add DT binding support into stmp3xxx-rtc Date: Fri, 08 Jun 2012 13:58:51 -0500 Message-ID: <4FD24B6B.3010402@gmail.com> References: <1339181804-22822-1-git-send-email-marex@denx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1339181804-22822-1-git-send-email-marex-ynQEQJNshbs@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Marek Vasut Cc: Alessandro Zummo , rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org On 06/08/2012 01:56 PM, Marek Vasut wrote: > Add simple binding for the stmp3xxx-rtc. > > Signed-off-by: Marek Vasut > Cc: Alessandro Zummo > Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org > Cc: Grant Likely > Cc: Rob Herring > Cc: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > Cc: Shawn Guo > --- Acked-by: Rob Herring > .../devicetree/bindings/rtc/stmp3xxx-rtc.txt | 19 +++++++++++++++++++ > arch/arm/boot/dts/imx28.dtsi | 1 + > drivers/rtc/rtc-stmp3xxx.c | 7 +++++++ > 3 files changed, 27 insertions(+) > create mode 100644 Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt > > V2: Fix typos, remove fsl,imx28-rtc > > diff --git a/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt > new file mode 100644 > index 0000000..a7a7de5 > --- /dev/null > +++ b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt > @@ -0,0 +1,19 @@ > +* STMP3xxx/i.MX28 Time Clock controller > + > +Required properties: > +- compatible: should be one of the following. > + * "fsl,stmp3xxx-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 tick interrupt and second interrupt number > + is the rtc alarm interrupt. The number of cells representing a interrupt > + depends on the parent interrupt controller. > + > +Example: > + > + rtc@80056000 { > + compatible = "fsl,stmp3xxx-rtc"; > + reg = <0x80056000 2000>; > + interrupts = <28 29>; > + }; > diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi > index cabcce8..5053019 100644 > --- a/arch/arm/boot/dts/imx28.dtsi > +++ b/arch/arm/boot/dts/imx28.dtsi > @@ -387,6 +387,7 @@ > }; > > rtc@80056000 { > + compatible = "fsl,imx28-rtc", "fsl,stmp3xxx-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..3aadb58 100644 > --- a/drivers/rtc/rtc-stmp3xxx.c > +++ b/drivers/rtc/rtc-stmp3xxx.c > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include > > #include > > @@ -265,6 +266,11 @@ 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", }, > + { /* sentinel */ } > +}; > + > static struct platform_driver stmp3xxx_rtcdrv = { > .probe = stmp3xxx_rtc_probe, > .remove = stmp3xxx_rtc_remove, > @@ -273,6 +279,7 @@ static struct platform_driver stmp3xxx_rtcdrv = { > .driver = { > .name = "stmp3xxx-rtc", > .owner = THIS_MODULE, > + .of_match_table = rtc_dt_ids, > }, > }; >