diff mbox series

[v2,2/8] dt-bindings: regulator: pca9450: Allow arbitrary regulator names

Message ID 20220801131554.116795-3-frieder@fris.de (mailing list archive)
State New, archived
Headers show
Series arm64: dts: imx8mm-kontron: Improvements and OSM board support | expand

Commit Message

Frieder Schrempf Aug. 1, 2022, 1:15 p.m. UTC
From: Frieder Schrempf <frieder.schrempf@kontron.de>

Instead of restricting regulator-name to non-descriptive names, allow
to use arbitrary strings. This enables us to use the name of the
voltage rail that is powered by the regulator as some board DTs
already do.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
---
Changes in v2:
* new patch
---
 .../bindings/regulator/nxp,pca9450-regulator.yaml         | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Mark Brown Aug. 1, 2022, 1:21 p.m. UTC | #1
On Mon, Aug 01, 2022 at 03:15:46PM +0200, Frieder Schrempf wrote:

>            regulator-name:
> -            pattern: "^LDO[1-5]$"
>              description:
> -              should be "LDO1", ..., "LDO5"
> +              Should be "LDO1", ..., "LDO5" or whatever the name of the boards
> +              voltage rail powered by this regulator is.

This should simply be removed from the bindings for the device, devices
have no business placing any constraint on this generic binding.
Frieder Schrempf Aug. 1, 2022, 1:45 p.m. UTC | #2
Am 01.08.22 um 15:21 schrieb Mark Brown:
> On Mon, Aug 01, 2022 at 03:15:46PM +0200, Frieder Schrempf wrote:
> 
>>            regulator-name:
>> -            pattern: "^LDO[1-5]$"
>>              description:
>> -              should be "LDO1", ..., "LDO5"
>> +              Should be "LDO1", ..., "LDO5" or whatever the name of the boards
>> +              voltage rail powered by this regulator is.
> 
> This should simply be removed from the bindings for the device, devices
> have no business placing any constraint on this generic binding.

Ok, IIUC something like below should do then. I can change this in the
next iteration of this series or send it separately if the rest of the
set gets accepted as-is.

--- a/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml
@@ -47,12 +47,6 @@ properties:
         description:
           Properties for single LDO regulator.

-        properties:
-          regulator-name:
-            pattern: "^LDO[1-5]$"
-            description:
-              should be "LDO1", ..., "LDO5"
-
         unevaluatedProperties: false

       "^BUCK[1-6]$":
@@ -62,11 +56,6 @@ properties:
           Properties for single BUCK regulator.

         properties:
-          regulator-name:
-            pattern: "^BUCK[1-6]$"
-            description:
-              should be "BUCK1", ..., "BUCK6"
-
           nxp,dvs-run-voltage:
             $ref: "/schemas/types.yaml#/definitions/uint32"
             minimum: 600000
Mark Brown Aug. 1, 2022, 3:16 p.m. UTC | #3
On Mon, Aug 01, 2022 at 03:45:52PM +0200, Frieder Schrempf wrote:
> Am 01.08.22 um 15:21 schrieb Mark Brown:

> > This should simply be removed from the bindings for the device, devices
> > have no business placing any constraint on this generic binding.

> Ok, IIUC something like below should do then. I can change this in the
> next iteration of this series or send it separately if the rest of the
> set gets accepted as-is.

Yes, just send it any time and I can apply it as a fix.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml b/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml
index b539781e39aa..b1e4fd09928b 100644
--- a/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml
+++ b/Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml
@@ -49,9 +49,9 @@  properties:
 
         properties:
           regulator-name:
-            pattern: "^LDO[1-5]$"
             description:
-              should be "LDO1", ..., "LDO5"
+              Should be "LDO1", ..., "LDO5" or whatever the name of the boards
+              voltage rail powered by this regulator is.
 
         unevaluatedProperties: false
 
@@ -63,9 +63,9 @@  properties:
 
         properties:
           regulator-name:
-            pattern: "^BUCK[1-6]$"
             description:
-              should be "BUCK1", ..., "BUCK6"
+              Should be "BUCK1", ..., "BUCK6" or whatever the name of the boards
+              voltage rail powered by this regulator is.
 
           nxp,dvs-run-voltage:
             $ref: "/schemas/types.yaml#/definitions/uint32"