[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180514080640.12515-17-linus.walleij@linaro.org>
Date: Mon, 14 May 2018 10:06:37 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
devicetree@...r.kernel.org
Subject: [PATCH 16/19 v3] regulator: fixed/gpio: Update device tree bindings
Deprecate the open drain binding for fixed regulator and indicate
that we prefer this to be passed in the GPIO phandle flags.
Clarify that the line inversion semantics for fixed and GPIO
regulators completely overrides the active low flags in the
phandle flags.
Unfortunately this can not be changed to prefer that we pass
the flags in the phandle: the bindings have been specified and
deployed such that the presence/absence of this flag and only
that controls the line inversion semantics. The crucial semantic
is that the absence of the flag means the core will assume
the line is active low, which in GPIO terms is an exception,
as GPIO lines are normally assumed to be active high.
This special device tree semantic cannot be changed without
introducing a whole new compatible string for the fixed and
GPIO regulators, so we just contain the situation.
Cc: devicetree@...r.kernel.org
Reviewed-by: Rob Herring <robh@...nel.org>
Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
---
ChangeLog v2->v3:
- Resending.
ChangeLog v1->v2:
- Collect Rob's ACK.
---
.../bindings/regulator/fixed-regulator.txt | 13 +++++++++++--
.../bindings/regulator/gpio-regulator.txt | 4 ++++
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt b/Documentation/devicetree/bindings/regulator/fixed-regulator.txt
index 0c2a6c8a1536..a7a1cd0dfa6e 100644
--- a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.txt
@@ -8,10 +8,19 @@ Optional properties:
- gpio: gpio to use for enable control
- startup-delay-us: startup time in microseconds
- enable-active-high: Polarity of GPIO is Active high
-If this property is missing, the default assumed is Active low.
+ If this property is missing, the default assumed is Active low.
+ If the phandle flags to the GPIO handle also flag the line as active
+ low or high, that will be ignored for fixed regulators and the
+ presence or absence of this flag solely controls the inversion
+ semantics.
+-vin-supply: Input supply name.
+
+Deprecated properties:
- gpio-open-drain: GPIO is open drain type.
If this property is missing then default assumption is false.
--vin-supply: Input supply name.
+ Do not use this property in new device trees: instead use the
+ phandle flag to indicate to the GPIO provider that the line
+ should be handled as open drain.
Any property defined as part of the core regulator
binding, defined in regulator.txt, can also be used.
diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
index 1f496159e2bb..8fef3e5358a2 100644
--- a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
@@ -14,6 +14,10 @@ Optional properties:
defualt is LOW if nothing is specified.
- startup-delay-us : Startup time in microseconds.
- enable-active-high : Polarity of GPIO is active high (default is low).
+ If the phandle flags to the GPIO handle also flag the line as
+ active low or high, that will be ignored for fixed regulators
+ and the presence or absence of this flag solely controls the
+ inversion semantics.
- regulator-type : Specifies what is being regulated, must be either
"voltage" or "current", defaults to voltage.
--
2.17.0
Powered by blists - more mailing lists