devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: gpio: Reword the binding document
@ 2019-02-16 17:48 marek.vasut
  2019-02-16 20:20 ` Harald Geyer
  2019-02-18  9:30 ` Geert Uytterhoeven
  0 siblings, 2 replies; 21+ messages in thread
From: marek.vasut @ 2019-02-16 17:48 UTC (permalink / raw)
  To: devicetree
  Cc: Marek Vasut, Harald Geyer, Kuninori Morimoto, Linus Walleij,
	Mark Brown, Rob Herring, linux-renesas-soc

From: Marek Vasut <marek.vasut+renesas@gmail.com>

Reword the binding document to make it clear how the propeties work
and which properties affect which other properties.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Harald Geyer <harald@ccbib.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: linux-renesas-soc@vger.kernel.org
To: devicetree@vger.kernel.org
---
Note: The recent gpio-regulator rework caused breakage. While the
      changes in the gpio-regulator code were according to the DT
      binding document, they stopped working with older DTs. Make
      the binding document clearer to prevent such breakage in the
      future.
---
 .../bindings/regulator/gpio-regulator.txt     | 23 +++++++++++++------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
index 1f496159e2bb..acca13c1eaf3 100644
--- a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
@@ -4,16 +4,25 @@ Required properties:
 - compatible		: Must be "regulator-gpio".
 - regulator-name	: Defined in regulator.txt as optional, but required
 			  here.
-- states		: Selection of available voltages and GPIO configs.
-                          if there are no states, then use a fixed regulator
+- states		: Selection of available voltages/currents provided by
+			  this regulator and matching GPIO configurations to
+			  achieve them. If there are no states in the "states"
+			  array, use a fixed regulator instead.
 
 Optional properties:
-- enable-gpio		: GPIO to use to enable/disable the regulator.
-- gpios			: GPIO group used to control voltage.
-- gpios-states		: gpios pin's initial states array. 0: LOW, 1: HIGH.
-			  defualt is LOW if nothing is specified.
+- enable-gpio		: GPIO used to enable/disable the regulator.
+			  Warning, the GPIO phandle flags are ignored and the
+			  GPIO polarity is controlled solely by the presence
+			  of "enable-active-high" DT property. This is due to
+			  compatibility with old DTs.
+- enable-active-high	: Polarity of "enable-gpio" GPIO is active HIGH.
+			  Default is active LOW.
+- gpios			: Array of one or more GPIO pins used to select the
+			  regulator voltage/current listed in "states".
+- gpios-states		: Initial state of GPIO pins in "gpios" array.
+			  0: LOW, 1: HIGH.
+			  Default is LOW if nothing else is specified.
 - startup-delay-us	: Startup time in microseconds.
-- enable-active-high	: Polarity of GPIO is active high (default is low).
 - regulator-type	: Specifies what is being regulated, must be either
 			  "voltage" or "current", defaults to voltage.
 
-- 
2.19.2

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2019-03-03 16:08 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-16 17:48 [PATCH] regulator: gpio: Reword the binding document marek.vasut
2019-02-16 20:20 ` Harald Geyer
2019-02-16 21:37   ` Marek Vasut
2019-02-17 14:26     ` Harald Geyer
2019-02-17 14:45       ` Marek Vasut
2019-02-17 20:00         ` Harald Geyer
2019-02-17 21:57           ` Marek Vasut
2019-02-18 10:04             ` Harald Geyer
2019-02-18 18:58               ` Marek Vasut
2019-02-18 22:18                 ` Harald Geyer
2019-02-19  2:51                   ` Marek Vasut
2019-02-19 10:10                     ` Harald Geyer
2019-03-02 14:55                       ` Marek Vasut
2019-03-03 16:07                         ` Harald Geyer
2019-03-03 16:08                           ` Marek Vasut
2019-02-18 18:01             ` Mark Brown
2019-02-18 17:56       ` Mark Brown
2019-02-18 17:54     ` Mark Brown
2019-02-18  9:30 ` Geert Uytterhoeven
2019-02-18 18:36   ` Marek Vasut
2019-02-18 19:21     ` Geert Uytterhoeven

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).