Patchwork [v2,6/6] documentation: bindings: document PMIC8921/8058 RTC

login
register
mail settings
Submitter Josh Cartwright
Date March 10, 2014, 6:44 p.m.
Message ID <1394477089-3996-7-git-send-email-joshc@codeaurora.org>
Download mbox | patch
Permalink /patch/328701/
State New
Headers show

Comments

Josh Cartwright - March 10, 2014, 6:44 p.m.
This RTC is found on the Qualcomm 8921 and 8058 PMICs.

Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
---
 .../devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt     | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt
Rob Herring - March 10, 2014, 9:22 p.m.
On Mon, Mar 10, 2014 at 1:44 PM, Josh Cartwright <joshc@codeaurora.org> wrote:
> This RTC is found on the Qualcomm 8921 and 8058 PMICs.
>
> Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
> ---
>  .../devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt     | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt
>
> diff --git a/Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt b/Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt
> new file mode 100644
> index 0000000..3eaa582
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt
> @@ -0,0 +1,21 @@
> +* Real-Time Clock for Qualcomm 8058/8921 PMICs
> +
> +Required properties:
> +- compatible: should be one of the following.
> +    * "qcom,pm8058-rtc"
> +    * "qcom,pm8921-rtc"
> +- reg: base address of the register region

Wait a second. This is all part of an MFD device. I think this whole
binding does not make sense on it's own. The DT should describe the
PMIC, not necessarily some sub-component of it. Perhaps there are sub
nodes of the PMIC node, but that would be all part of the PMIC
binding. Having sub drivers for an MFD is really a Linux problem that
doesn't belong in DT.

Rob
Josh Cartwright - March 10, 2014, 10:11 p.m.
On Mon, Mar 10, 2014 at 04:22:51PM -0500, Rob Herring wrote:
> On Mon, Mar 10, 2014 at 1:44 PM, Josh Cartwright <joshc@codeaurora.org> wrote:
> > This RTC is found on the Qualcomm 8921 and 8058 PMICs.
> >
> > Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
> > ---
> >  .../devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt     | 21 +++++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt
> >
> > diff --git a/Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt b/Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt
> > new file mode 100644
> > index 0000000..3eaa582
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt
> > @@ -0,0 +1,21 @@
> > +* Real-Time Clock for Qualcomm 8058/8921 PMICs
> > +
> > +Required properties:
> > +- compatible: should be one of the following.
> > +    * "qcom,pm8058-rtc"
> > +    * "qcom,pm8921-rtc"
> > +- reg: base address of the register region
> 
> Wait a second. This is all part of an MFD device. I think this whole
> binding does not make sense on it's own. The DT should describe the
> PMIC, not necessarily some sub-component of it. Perhaps there are sub
> nodes of the PMIC node, but that would be all part of the PMIC
> binding. Having sub drivers for an MFD is really a Linux problem that
> doesn't belong in DT.

Okay, this makes sense, I can move this documentation to
Documentation/bindings/mfd/qcom,pm8xxx.txt where the PMIC binding
currently is.

Note that this does introduce a dependency on Lee Jones' mfd tree, where
DT support for the parent pm8921 driver is pending for 3.15.

Andrew, how would you prefer I proceed?  Would you like me to respin
this patch?  The whole series?  An incremental patch?

Thanks,
  Josh
Andrew Morton - March 10, 2014, 10:18 p.m.
On Mon, 10 Mar 2014 17:11:32 -0500 Josh Cartwright <joshc@codeaurora.org> wrote:

> On Mon, Mar 10, 2014 at 04:22:51PM -0500, Rob Herring wrote:
> > On Mon, Mar 10, 2014 at 1:44 PM, Josh Cartwright <joshc@codeaurora.org> wrote:
> > > This RTC is found on the Qualcomm 8921 and 8058 PMICs.
> > >
> > > Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
> > > ---
> > >  .../devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt     | 21 +++++++++++++++++++++
> > >  1 file changed, 21 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt
> > >
> > > diff --git a/Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt b/Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt
> > > new file mode 100644
> > > index 0000000..3eaa582
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt
> > > @@ -0,0 +1,21 @@
> > > +* Real-Time Clock for Qualcomm 8058/8921 PMICs
> > > +
> > > +Required properties:
> > > +- compatible: should be one of the following.
> > > +    * "qcom,pm8058-rtc"
> > > +    * "qcom,pm8921-rtc"
> > > +- reg: base address of the register region
> > 
> > Wait a second. This is all part of an MFD device. I think this whole
> > binding does not make sense on it's own. The DT should describe the
> > PMIC, not necessarily some sub-component of it. Perhaps there are sub
> > nodes of the PMIC node, but that would be all part of the PMIC
> > binding. Having sub drivers for an MFD is really a Linux problem that
> > doesn't belong in DT.
> 
> Okay, this makes sense, I can move this documentation to
> Documentation/bindings/mfd/qcom,pm8xxx.txt where the PMIC binding
> currently is.
> 
> Note that this does introduce a dependency on Lee Jones' mfd tree, where
> DT support for the parent pm8921 driver is pending for 3.15.
> 
> Andrew, how would you prefer I proceed?  Would you like me to respin
> this patch?  The whole series?  An incremental patch?

A new version of [6/6] sounds appropriate.

Patch

diff --git a/Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt b/Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt
new file mode 100644
index 0000000..3eaa582
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/qcom,pm8xxx-rtc.txt
@@ -0,0 +1,21 @@ 
+* Real-Time Clock for Qualcomm 8058/8921 PMICs
+
+Required properties:
+- compatible: should be one of the following.
+    * "qcom,pm8058-rtc"
+    * "qcom,pm8921-rtc"
+- reg: base address of the register region
+- interrupts: interrupt list for the RTC, must contain a single interrupt
+              specifier for the alarm interrupt
+
+Optional properties:
+- allow-set-time: indicates that the setting of RTC time is allowed by
+                  the host CPU
+
+Example:
+
+	rtc@11d {
+		compatible = "qcom,pm8921-rtc";
+		reg = <0x11d>;
+		interrupts = <0x27 0>;
+	};