linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: pinctrl: Allow values for drive-push-pull and drive-open-drain
@ 2022-04-29 19:46 Rob Herring
  2022-05-04 21:18 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2022-04-29 19:46 UTC (permalink / raw)
  To: Linus Walleij, Krzysztof Kozlowski
  Cc: Arnd Bergmann, Thierry Reding, Jonathan Hunter, Nicolas Ferre,
	Claudiu Beznea, linux-gpio, devicetree, linux-kernel

A few platforms, at91 and tegra, use drive-push-pull and
drive-open-drain with a 0 or 1 value. There's not really a need for values
as '1' should be equivalent to no value (it wasn't treated that way) and
drive-push-pull disabled is equivalent to drive-open-drain. So dropping the
value can't be done without breaking existing OSs. As we don't want new
cases, mark the case with values as deprecated.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../devicetree/bindings/pinctrl/pincfg-node.yaml     | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml b/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml
index 4b22a9e3a447..f5a121311f61 100644
--- a/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml
@@ -52,11 +52,19 @@ properties:
       hardware supporting it the pull strength in Ohm.
 
   drive-push-pull:
-    type: boolean
+    oneOf:
+      - type: boolean
+      - $ref: /schemas/types.yaml#/definitions/uint32
+        enum: [ 0, 1 ]
+        deprecated: true
     description: drive actively high and low
 
   drive-open-drain:
-    type: boolean
+    oneOf:
+      - type: boolean
+      - $ref: /schemas/types.yaml#/definitions/uint32
+        const: 1    # No known cases of 0
+        deprecated: true
     description: drive with open drain
 
   drive-open-source:
-- 
2.34.1


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

* Re: [PATCH] dt-bindings: pinctrl: Allow values for drive-push-pull and drive-open-drain
  2022-04-29 19:46 [PATCH] dt-bindings: pinctrl: Allow values for drive-push-pull and drive-open-drain Rob Herring
@ 2022-05-04 21:18 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2022-05-04 21:18 UTC (permalink / raw)
  To: Rob Herring
  Cc: Arnd Bergmann, Thierry Reding, Jonathan Hunter,
	Krzysztof Kozlowski, Nicolas Ferre, devicetree, Linus Walleij,
	linux-kernel, linux-gpio, Claudiu Beznea

On Fri, 29 Apr 2022 14:46:11 -0500, Rob Herring wrote:
> A few platforms, at91 and tegra, use drive-push-pull and
> drive-open-drain with a 0 or 1 value. There's not really a need for values
> as '1' should be equivalent to no value (it wasn't treated that way) and
> drive-push-pull disabled is equivalent to drive-open-drain. So dropping the
> value can't be done without breaking existing OSs. As we don't want new
> cases, mark the case with values as deprecated.
> 
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Jonathan Hunter <jonathanh@nvidia.com>
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  .../devicetree/bindings/pinctrl/pincfg-node.yaml     | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 

Applied, thanks!

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

end of thread, other threads:[~2022-05-04 21:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-29 19:46 [PATCH] dt-bindings: pinctrl: Allow values for drive-push-pull and drive-open-drain Rob Herring
2022-05-04 21:18 ` Rob Herring

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