regulator: gpio: Reword the binding document

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
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Marek Vasut 2019-03-16 21:25:51 +01:00 committed by Mark Brown
parent c22938562f
commit 80c94557e9
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 22 additions and 8 deletions

View File

@ -4,16 +4,30 @@ Required properties:
- compatible : Must be "regulator-gpio". - compatible : Must be "regulator-gpio".
- regulator-name : Defined in regulator.txt as optional, but required - regulator-name : Defined in regulator.txt as optional, but required
here. here.
- states : Selection of available voltages and GPIO configs. - gpios : Array of one or more GPIO pins used to select the
if there are no states, then use a fixed regulator regulator voltage/current listed in "states".
- 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: Optional properties:
- enable-gpio : GPIO to use to enable/disable the regulator. - enable-gpios : GPIO used to enable/disable the regulator.
- gpios : GPIO group used to control voltage. Warning, the GPIO phandle flags are ignored and the
- gpios-states : gpios pin's initial states array. 0: LOW, 1: HIGH. GPIO polarity is controlled solely by the presence
defualt is LOW if nothing is specified. 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-states : On operating systems, that don't support reading back
gpio values in output mode (most notably linux), this
array provides the state of GPIO pins set when
requesting them from the gpio controller. Systems,
that are capable of preserving state when requesting
the lines, are free to ignore this property.
0: LOW, 1: HIGH. Default is LOW if nothing else
is specified.
- startup-delay-us : Startup time in microseconds. - 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 - regulator-type : Specifies what is being regulated, must be either
"voltage" or "current", defaults to voltage. "voltage" or "current", defaults to voltage.
@ -30,7 +44,7 @@ Example:
regulator-max-microvolt = <2600000>; regulator-max-microvolt = <2600000>;
regulator-boot-on; regulator-boot-on;
enable-gpio = <&gpio0 23 0x4>; enable-gpios = <&gpio0 23 0x4>;
gpios = <&gpio0 24 0x4 gpios = <&gpio0 24 0x4
&gpio0 25 0x4>; &gpio0 25 0x4>;
states = <1800000 0x3 states = <1800000 0x3