devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: regulator: regulator-output: Multiple supplies
@ 2023-10-04 12:05 Naresh Solanki
  2023-10-04 15:14 ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Naresh Solanki @ 2023-10-04 12:05 UTC (permalink / raw)
  To: broonie, zev, Liam Girdwood, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Naresh Solanki, linux-kernel, devicetree

Add support for multiple supplies.

Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
---
 .../devicetree/bindings/regulator/regulator-output.yaml  | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/regulator-output.yaml b/Documentation/devicetree/bindings/regulator/regulator-output.yaml
index 078b37a1a71a..6d077f123729 100644
--- a/Documentation/devicetree/bindings/regulator/regulator-output.yaml
+++ b/Documentation/devicetree/bindings/regulator/regulator-output.yaml
@@ -21,13 +21,13 @@ properties:
   compatible:
     const: regulator-output
 
-  vout-supply:
+patternProperties:
+  ".*-supply":
     description:
       Phandle of the regulator supplying the output.
 
 required:
   - compatible
-  - vout-supply
 
 additionalProperties: false
 
@@ -37,3 +37,8 @@ examples:
           compatible = "regulator-output";
           vout-supply = <&output_reg>;
       };
+      output1 {
+          compatible = "regulator-output";
+          sw0-supply = <&output_reg0>;
+          sw1-supply = <&output_reg2>;
+      };

base-commit: f9a1d31874c383f58bb4f89bfe79b764682cd026
-- 
2.41.0


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

* Re: [PATCH 1/3] dt-bindings: regulator: regulator-output: Multiple supplies
  2023-10-04 12:05 [PATCH 1/3] dt-bindings: regulator: regulator-output: Multiple supplies Naresh Solanki
@ 2023-10-04 15:14 ` Rob Herring
  2023-10-05  7:46   ` Naresh Solanki
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2023-10-04 15:14 UTC (permalink / raw)
  To: Naresh Solanki
  Cc: broonie, zev, Liam Girdwood, Krzysztof Kozlowski, Conor Dooley,
	linux-kernel, devicetree

On Wed, Oct 04, 2023 at 02:05:26PM +0200, Naresh Solanki wrote:
> Add support for multiple supplies.

Why?

> 
> Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
> ---
>  .../devicetree/bindings/regulator/regulator-output.yaml  | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/regulator/regulator-output.yaml b/Documentation/devicetree/bindings/regulator/regulator-output.yaml
> index 078b37a1a71a..6d077f123729 100644
> --- a/Documentation/devicetree/bindings/regulator/regulator-output.yaml
> +++ b/Documentation/devicetree/bindings/regulator/regulator-output.yaml
> @@ -21,13 +21,13 @@ properties:
>    compatible:
>      const: regulator-output
>  
> -  vout-supply:
> +patternProperties:
> +  ".*-supply":
>      description:
>        Phandle of the regulator supplying the output.
>  
>  required:
>    - compatible
> -  - vout-supply
>  
>  additionalProperties: false
>  
> @@ -37,3 +37,8 @@ examples:
>            compatible = "regulator-output";
>            vout-supply = <&output_reg>;
>        };
> +      output1 {
> +          compatible = "regulator-output";
> +          sw0-supply = <&output_reg0>;
> +          sw1-supply = <&output_reg2>;
> +      };
> 
> base-commit: f9a1d31874c383f58bb4f89bfe79b764682cd026
> -- 
> 2.41.0
> 

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

* Re: [PATCH 1/3] dt-bindings: regulator: regulator-output: Multiple supplies
  2023-10-04 15:14 ` Rob Herring
@ 2023-10-05  7:46   ` Naresh Solanki
  2023-10-05  8:41     ` Krzysztof Kozlowski
  2023-10-05 11:17     ` Zev Weiss
  0 siblings, 2 replies; 5+ messages in thread
From: Naresh Solanki @ 2023-10-05  7:46 UTC (permalink / raw)
  To: Rob Herring
  Cc: broonie, zev, Liam Girdwood, Krzysztof Kozlowski, Conor Dooley,
	linux-kernel, devicetree

Hi Rob,


On Wed, 4 Oct 2023 at 20:44, Rob Herring <robh@kernel.org> wrote:
>
> On Wed, Oct 04, 2023 at 02:05:26PM +0200, Naresh Solanki wrote:
> > Add support for multiple supplies.
>
> Why?
1. Driver is already capable of that using platform data. Hence added
support to read DT property & initialize the same for multiple
supplies instead of being limited to one.
2. This is particularly useful in cases wherein 2 or more regulators
are coupled together, for example in a PCIe connector having 3.3V &
12V.

Regards,
Naresh
>
> >
> > Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
> > ---
> >  .../devicetree/bindings/regulator/regulator-output.yaml  | 9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/regulator/regulator-output.yaml b/Documentation/devicetree/bindings/regulator/regulator-output.yaml
> > index 078b37a1a71a..6d077f123729 100644
> > --- a/Documentation/devicetree/bindings/regulator/regulator-output.yaml
> > +++ b/Documentation/devicetree/bindings/regulator/regulator-output.yaml
> > @@ -21,13 +21,13 @@ properties:
> >    compatible:
> >      const: regulator-output
> >
> > -  vout-supply:
> > +patternProperties:
> > +  ".*-supply":
> >      description:
> >        Phandle of the regulator supplying the output.
> >
> >  required:
> >    - compatible
> > -  - vout-supply
> >
> >  additionalProperties: false
> >
> > @@ -37,3 +37,8 @@ examples:
> >            compatible = "regulator-output";
> >            vout-supply = <&output_reg>;
> >        };
> > +      output1 {
> > +          compatible = "regulator-output";
> > +          sw0-supply = <&output_reg0>;
> > +          sw1-supply = <&output_reg2>;
> > +      };
> >
> > base-commit: f9a1d31874c383f58bb4f89bfe79b764682cd026
> > --
> > 2.41.0
> >

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

* Re: [PATCH 1/3] dt-bindings: regulator: regulator-output: Multiple supplies
  2023-10-05  7:46   ` Naresh Solanki
@ 2023-10-05  8:41     ` Krzysztof Kozlowski
  2023-10-05 11:17     ` Zev Weiss
  1 sibling, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-10-05  8:41 UTC (permalink / raw)
  To: Naresh Solanki, Rob Herring
  Cc: broonie, zev, Liam Girdwood, Krzysztof Kozlowski, Conor Dooley,
	linux-kernel, devicetree

On 05/10/2023 09:46, Naresh Solanki wrote:
> Hi Rob,
> 
> 
> On Wed, 4 Oct 2023 at 20:44, Rob Herring <robh@kernel.org> wrote:
>>
>> On Wed, Oct 04, 2023 at 02:05:26PM +0200, Naresh Solanki wrote:
>>> Add support for multiple supplies.
>>
>> Why?
> 1. Driver is already capable of that using platform data. Hence added
> support to read DT property & initialize the same for multiple
> supplies instead of being limited to one.

I am not sure that's a valid reason. Bindings focus on the hardware. We
do not describe here driver capabilities.

> 2. This is particularly useful in cases wherein 2 or more regulators
> are coupled together, for example in a PCIe connector having 3.3V &
> 12V.

Commit message should explain this. Each commit, when not obvious,
should say why you are doing things.

Best regards,
Krzysztof


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

* Re: [PATCH 1/3] dt-bindings: regulator: regulator-output: Multiple supplies
  2023-10-05  7:46   ` Naresh Solanki
  2023-10-05  8:41     ` Krzysztof Kozlowski
@ 2023-10-05 11:17     ` Zev Weiss
  1 sibling, 0 replies; 5+ messages in thread
From: Zev Weiss @ 2023-10-05 11:17 UTC (permalink / raw)
  To: Naresh Solanki
  Cc: Rob Herring, broonie, Liam Girdwood, Krzysztof Kozlowski,
	Conor Dooley, linux-kernel, devicetree

On Thu, Oct 05, 2023 at 12:46:31AM PDT, Naresh Solanki wrote:
>Hi Rob,
>
>
>On Wed, 4 Oct 2023 at 20:44, Rob Herring <robh@kernel.org> wrote:
>>
>> On Wed, Oct 04, 2023 at 02:05:26PM +0200, Naresh Solanki wrote:
>> > Add support for multiple supplies.
>>
>> Why?
>1. Driver is already capable of that using platform data. Hence added
>support to read DT property & initialize the same for multiple
>supplies instead of being limited to one.
>2. This is particularly useful in cases wherein 2 or more regulators
>are coupled together, for example in a PCIe connector having 3.3V &
>12V.
>

Hmm -- apologies if I pointed you in the wrong direction here on the 
last revision (or should have considered this earlier), but is there a 
particular need for this arrangement to be described by a single 
regulator-output DT node instead of just having one node per supply?  If 
they're independently-controlled voltage outputs, treating them as two 
separate things instead of a single ganged one seems like it might be 
more appropriate anyway...


Zev


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

end of thread, other threads:[~2023-10-05 11:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-04 12:05 [PATCH 1/3] dt-bindings: regulator: regulator-output: Multiple supplies Naresh Solanki
2023-10-04 15:14 ` Rob Herring
2023-10-05  7:46   ` Naresh Solanki
2023-10-05  8:41     ` Krzysztof Kozlowski
2023-10-05 11:17     ` Zev Weiss

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