All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] dt-bindings: regulator: Add support for multiple supplies
@ 2023-04-20 19:24 Naresh Solanki
  2023-04-20 19:24 ` [PATCH v2 2/2] regulator: userspace-consumer: Support multiple supplies in DT Naresh Solanki
  2023-04-21 21:36 ` [PATCH v2 1/2] dt-bindings: regulator: Add support for multiple supplies Rob Herring
  0 siblings, 2 replies; 5+ messages in thread
From: Naresh Solanki @ 2023-04-20 19:24 UTC (permalink / raw)
  To: zev, Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: Naresh Solanki, linux-kernel, devicetree

Add optional DT property 'regulator-supplies' to handle connectors with
multiple supplies.
If this property is present, it will determine all regulator supplies.
Otherwise, the 'vout' supply will be used as a fallback.

This change improves support for connector like PCIe connectors on
mainboards that can be powered by 12V and 3.3V supplies.

Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
...
Change in V2:
- Added example
- Update property type & description.
- Improve commit message
---
 .../bindings/regulator/regulator-output.yaml  | 21 ++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/regulator-output.yaml b/Documentation/devicetree/bindings/regulator/regulator-output.yaml
index 078b37a1a71a..a9dce26991ff 100644
--- a/Documentation/devicetree/bindings/regulator/regulator-output.yaml
+++ b/Documentation/devicetree/bindings/regulator/regulator-output.yaml
@@ -21,13 +21,22 @@ properties:
   compatible:
     const: regulator-output
 
-  vout-supply:
+  regulator-supplies:
+    $ref: /schemas/types.yaml#/definitions/string-array
     description:
-      Phandle of the regulator supplying the output.
+      Optional property that specifies supply names provided by
+      the regulator. Defaults to "vout" if not specified. The
+      array contains a list of supply names.
+      Each supply name corresponds to a phandle in the
+      patternProperties.
+
+patternProperties:
+  ".*-supply":
+    description:
+      Specifies the phandle for various supplies
 
 required:
   - compatible
-  - vout-supply
 
 additionalProperties: false
 
@@ -37,3 +46,9 @@ examples:
           compatible = "regulator-output";
           vout-supply = <&output_reg>;
       };
+      out2 {
+          compatible = "regulator-output";
+          regulator-supplies = "sw0", "sw1";
+          sw0-supply = <&out2_sw0>;
+          sw1-supply = <&out2_sw1>;
+      };

base-commit: 43c75e470e5b56a992acb08474810e6822f0989c
-- 
2.39.1


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

end of thread, other threads:[~2023-05-03  8:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-20 19:24 [PATCH v2 1/2] dt-bindings: regulator: Add support for multiple supplies Naresh Solanki
2023-04-20 19:24 ` [PATCH v2 2/2] regulator: userspace-consumer: Support multiple supplies in DT Naresh Solanki
2023-04-21 21:36 ` [PATCH v2 1/2] dt-bindings: regulator: Add support for multiple supplies Rob Herring
2023-04-24  8:52   ` Naresh Solanki
2023-05-03  8:03     ` Naresh Solanki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.