diff mbox series

[1/2] dt-bindings: rtc: add generic bindings

Message ID 20181111193114.24307-1-alexandre.belloni@bootlin.com
State Accepted
Headers show
Series [1/2] dt-bindings: rtc: add generic bindings | expand

Commit Message

Alexandre Belloni Nov. 11, 2018, 7:31 p.m. UTC
Add generic binding documentation for the RTC subsystem.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 Documentation/devicetree/bindings/rtc/rtc.txt | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc.txt

Comments

Geert Uytterhoeven Dec. 6, 2018, 10:36 a.m. UTC | #1
Hi Alexandre,

On Sun, Nov 11, 2018 at 8:31 PM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
> Add generic binding documentation for the RTC subsystem.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

Thanks for your patch!

> new file mode 100644
> index 000000000000..221b7da50aca
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/rtc.txt
> @@ -0,0 +1,30 @@

> +The following properties may not be supported by all drivers. However, if a
> +driver wants to support one of the below features, it should adapt the bindings
> +below.
> +- trickle-resistor-ohms : Selected resistor for trickle charger. Should be given

Can this resistor be less than 1 ohm?
trickle-resistor-milli-ohms?

> +                          if trickle charger should be enabled
> +- trickle-diode-disable : Do not use internal trickle charger diode Should be
> +                          given if internal trickle charger diode should be
> +                          disabled
> +- wakeup-source :         Enables wake up of host system on alarm

Gr{oetje,eeting}s,

                        Geert
Alexandre Belloni Dec. 7, 2018, 9:33 a.m. UTC | #2
On 06/12/2018 11:36:59+0100, Geert Uytterhoeven wrote:
> > +The following properties may not be supported by all drivers. However, if a
> > +driver wants to support one of the below features, it should adapt the bindings
> > +below.
> > +- trickle-resistor-ohms : Selected resistor for trickle charger. Should be given
> 
> Can this resistor be less than 1 ohm?
> trickle-resistor-milli-ohms?
> 

Well, this is what current drivers already use so we are stuck with that
for now.

The value should be a few kOhm anyway. I think the lowest I know about
is 250 Ohm.

> > +                          if trickle charger should be enabled
> > +- trickle-diode-disable : Do not use internal trickle charger diode Should be
> > +                          given if internal trickle charger diode should be
> > +                          disabled
> > +- wakeup-source :         Enables wake up of host system on alarm
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> -- 
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
Geert Uytterhoeven Dec. 7, 2018, 9:47 a.m. UTC | #3
Hi Alexandre,

On Fri, Dec 7, 2018 at 10:34 AM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
> On 06/12/2018 11:36:59+0100, Geert Uytterhoeven wrote:
> > > +The following properties may not be supported by all drivers. However, if a
> > > +driver wants to support one of the below features, it should adapt the bindings
> > > +below.
> > > +- trickle-resistor-ohms : Selected resistor for trickle charger. Should be given
> >
> > Can this resistor be less than 1 ohm?
> > trickle-resistor-milli-ohms?
>
> Well, this is what current drivers already use so we are stuck with that
> for now.
>
> The value should be a few kOhm anyway. I think the lowest I know about
> is 250 Ohm.

OK, good to know. Thanks!

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/rtc/rtc.txt b/Documentation/devicetree/bindings/rtc/rtc.txt
new file mode 100644
index 000000000000..221b7da50aca
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc.txt
@@ -0,0 +1,30 @@ 
+Generic device tree bindings for Real Time Clock devices
+========================================================
+
+This document describes generic bindings which can be used to describe Real Time
+Clock devices in a device tree.
+
+Required properties
+-------------------
+
+- compatible : name of RTC device following generic names recommended practice.
+
+For other required properties e.g. to describe register sets,
+clocks, etc. check the binding documentation of the specific driver.
+
+Optional properties
+-------------------
+
+- start-year : if provided, the default hardware range supported by the RTC is
+               shifted so the first usable year is the specified one.
+
+The following properties may not be supported by all drivers. However, if a
+driver wants to support one of the below features, it should adapt the bindings
+below.
+- trickle-resistor-ohms : Selected resistor for trickle charger. Should be given
+                          if trickle charger should be enabled
+- trickle-diode-disable : Do not use internal trickle charger diode Should be
+                          given if internal trickle charger diode should be
+                          disabled
+- wakeup-source :         Enables wake up of host system on alarm
+