public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] regulator: dt-bindings: dlg,da9121: add buck2 constraints
@ 2023-07-25 12:46 Krzysztof Kozlowski
  2023-07-25 12:46 ` [PATCH 2/3] regulator: dt-bindings: dlg,da9121: allow different names Krzysztof Kozlowski
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-25 12:46 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Support Opensource, Paul Cercueil, Adam Ward,
	linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

Instead of describing the constraints for some devices (buck2 not
present), code it in allOf:if:then section to actually allow validation
of this requirement.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/regulator/dlg,da9121.yaml        | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml b/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
index dc626517c2ad..43f99bc8fbd4 100644
--- a/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
+++ b/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
@@ -97,8 +97,6 @@ properties:
         properties:
           regulator-name:
             pattern: "^BUCK([1-2])$"
-            description: |
-              BUCK2 present in DA9122, DA9220, DA9131, DA9132 only
 
           regulator-initial-mode:
             enum: [ 0, 1, 2, 3 ]
@@ -122,6 +120,23 @@ required:
   - reg
   - regulators
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          not:
+            contains:
+              enum:
+                - dlg,da9122
+                - dlg,da9131
+                - dlg,da9132
+                - dlg,da9220
+    then:
+      properties:
+        regulators:
+          properties:
+            buck2: false
+
 additionalProperties: false
 
 examples:
-- 
2.34.1


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

* [PATCH 2/3] regulator: dt-bindings: dlg,da9121: allow different names
  2023-07-25 12:46 [PATCH 1/3] regulator: dt-bindings: dlg,da9121: add buck2 constraints Krzysztof Kozlowski
@ 2023-07-25 12:46 ` Krzysztof Kozlowski
  2023-07-25 12:46 ` [PATCH 3/3] regulator: dt-bindings: active-semi,act8846: correct supplies Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-25 12:46 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Support Opensource, Paul Cercueil, Adam Ward,
	linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

Regulator names, as specified by regulator-name, are board-dependent and
should describe the name used on the actual board.  Do not enforce
generic buck1/2 names.

This also fixes dtbs_check warnings like:

  zynqmp-sm-k26-revA.dtb: pmic@33: regulators:buck1:regulator-name:0: 'da9131_buck1' does not match '^BUCK([1-2])$'

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/regulator/dlg,da9121.yaml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml b/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
index 43f99bc8fbd4..13b3f75f8e5e 100644
--- a/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
+++ b/Documentation/devicetree/bindings/regulator/dlg,da9121.yaml
@@ -95,9 +95,6 @@ properties:
           Properties for a single BUCK regulator
 
         properties:
-          regulator-name:
-            pattern: "^BUCK([1-2])$"
-
           regulator-initial-mode:
             enum: [ 0, 1, 2, 3 ]
             description: Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
-- 
2.34.1


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

* [PATCH 3/3] regulator: dt-bindings: active-semi,act8846: correct supplies
  2023-07-25 12:46 [PATCH 1/3] regulator: dt-bindings: dlg,da9121: add buck2 constraints Krzysztof Kozlowski
  2023-07-25 12:46 ` [PATCH 2/3] regulator: dt-bindings: dlg,da9121: allow different names Krzysztof Kozlowski
@ 2023-07-25 12:46 ` Krzysztof Kozlowski
  2023-07-25 19:57   ` Conor Dooley
  2023-07-25 20:00 ` [PATCH 1/3] regulator: dt-bindings: dlg,da9121: add buck2 constraints Conor Dooley
  2023-07-25 23:01 ` Mark Brown
  3 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-25 12:46 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Support Opensource, Paul Cercueil, Adam Ward,
	linux-kernel, devicetree
  Cc: Krzysztof Kozlowski

Regulator supplies are per-device, not per regulator, so they are
expected to be present in device node.  Moving them to proper place
allows to simplify a lot, because now none of the regulators differ.

This also fixes dtbs_check warnings like:

  rk3368-evb-act8846.dtb: act8846@5a: 'inl1-supply', 'inl2-supply', 'inl3-supply', 'vp1-supply',
    'vp2-supply', 'vp3-supply', 'vp4-supply' do not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../regulator/active-semi,act8846.yaml        | 82 +++++--------------
 1 file changed, 22 insertions(+), 60 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/active-semi,act8846.yaml b/Documentation/devicetree/bindings/regulator/active-semi,act8846.yaml
index 3725348bb235..02f45b5834d0 100644
--- a/Documentation/devicetree/bindings/regulator/active-semi,act8846.yaml
+++ b/Documentation/devicetree/bindings/regulator/active-semi,act8846.yaml
@@ -28,75 +28,37 @@ properties:
       the VSEL pin is assumed to be low.
     type: boolean
 
+  inl1-supply:
+    description: Handle to the INL1 input supply (REG5-7)
+
+  inl2-supply:
+    description: Handle to the INL2 input supply (REG8-9)
+
+  inl3-supply:
+    description: Handle to the INL3 input supply (REG10-12)
+
+  vp1-supply:
+    description: Handle to the VP1 input supply (REG1)
+
+  vp2-supply:
+    description: Handle to the VP2 input supply (REG2)
+
+  vp3-supply:
+    description: Handle to the VP3 input supply (REG3)
+
+  vp4-supply:
+    description: Handle to the VP4 input supply (REG4)
+
   regulators:
     type: object
     additionalProperties: false
 
-    properties:
-      REG1:
-        type: object
-        $ref: /schemas/regulator/regulator.yaml#
-        unevaluatedProperties: false
-
-        properties:
-          vp1-supply:
-            description: Handle to the VP1 input supply
-
-      REG2:
-        type: object
-        $ref: /schemas/regulator/regulator.yaml#
-        unevaluatedProperties: false
-
-        properties:
-          vp2-supply:
-            description: Handle to the VP2 input supply
-
-      REG3:
-        type: object
-        $ref: /schemas/regulator/regulator.yaml#
-        unevaluatedProperties: false
-
-        properties:
-          vp3-supply:
-            description: Handle to the VP3 input supply
-
-      REG4:
-        type: object
-        $ref: /schemas/regulator/regulator.yaml#
-        unevaluatedProperties: false
-
-        properties:
-          vp4-supply:
-            description: Handle to the VP4 input supply
-
     patternProperties:
-      "^REG[5-7]$":
+      "^REG([1-9]|1[0-2])$":
         type: object
         $ref: /schemas/regulator/regulator.yaml#
         unevaluatedProperties: false
 
-        properties:
-          inl1-supply:
-            description: Handle to the INL1 input supply
-
-      "^REG[8-9]$":
-        type: object
-        $ref: /schemas/regulator/regulator.yaml#
-        unevaluatedProperties: false
-
-        properties:
-          inl2-supply:
-            description: Handle to the INL2 input supply
-
-      "^REG1[0-2]$":
-        type: object
-        $ref: /schemas/regulator/regulator.yaml#
-        unevaluatedProperties: false
-
-        properties:
-          inl3-supply:
-            description: Handle to the INL3 input supply
-
 additionalProperties: false
 
 required:
-- 
2.34.1


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

* Re: [PATCH 3/3] regulator: dt-bindings: active-semi,act8846: correct supplies
  2023-07-25 12:46 ` [PATCH 3/3] regulator: dt-bindings: active-semi,act8846: correct supplies Krzysztof Kozlowski
@ 2023-07-25 19:57   ` Conor Dooley
  0 siblings, 0 replies; 6+ messages in thread
From: Conor Dooley @ 2023-07-25 19:57 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Support Opensource, Paul Cercueil, Adam Ward,
	linux-kernel, devicetree

[-- Attachment #1: Type: text/plain, Size: 682 bytes --]

On Tue, Jul 25, 2023 at 02:46:29PM +0200, Krzysztof Kozlowski wrote:
> Regulator supplies are per-device, not per regulator, so they are
> expected to be present in device node.  Moving them to proper place
> allows to simplify a lot, because now none of the regulators differ.
> 
> This also fixes dtbs_check warnings like:
> 
>   rk3368-evb-act8846.dtb: act8846@5a: 'inl1-supply', 'inl2-supply', 'inl3-supply', 'vp1-supply',
>     'vp2-supply', 'vp3-supply', 'vp4-supply' do not match any of the regexes: 'pinctrl-[0-9]+'
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 1/3] regulator: dt-bindings: dlg,da9121: add buck2 constraints
  2023-07-25 12:46 [PATCH 1/3] regulator: dt-bindings: dlg,da9121: add buck2 constraints Krzysztof Kozlowski
  2023-07-25 12:46 ` [PATCH 2/3] regulator: dt-bindings: dlg,da9121: allow different names Krzysztof Kozlowski
  2023-07-25 12:46 ` [PATCH 3/3] regulator: dt-bindings: active-semi,act8846: correct supplies Krzysztof Kozlowski
@ 2023-07-25 20:00 ` Conor Dooley
  2023-07-25 23:01 ` Mark Brown
  3 siblings, 0 replies; 6+ messages in thread
From: Conor Dooley @ 2023-07-25 20:00 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Support Opensource, Paul Cercueil, Adam Ward,
	linux-kernel, devicetree

[-- Attachment #1: Type: text/plain, Size: 390 bytes --]

On Tue, Jul 25, 2023 at 02:46:27PM +0200, Krzysztof Kozlowski wrote:
> Instead of describing the constraints for some devices (buck2 not
> present), code it in allOf:if:then section to actually allow validation
> of this requirement.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 1/3] regulator: dt-bindings: dlg,da9121: add buck2 constraints
  2023-07-25 12:46 [PATCH 1/3] regulator: dt-bindings: dlg,da9121: add buck2 constraints Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2023-07-25 20:00 ` [PATCH 1/3] regulator: dt-bindings: dlg,da9121: add buck2 constraints Conor Dooley
@ 2023-07-25 23:01 ` Mark Brown
  3 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2023-07-25 23:01 UTC (permalink / raw)
  To: Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Support Opensource, Paul Cercueil, Adam Ward, linux-kernel,
	devicetree, Krzysztof Kozlowski

On Tue, 25 Jul 2023 14:46:27 +0200, Krzysztof Kozlowski wrote:
> Instead of describing the constraints for some devices (buck2 not
> present), code it in allOf:if:then section to actually allow validation
> of this requirement.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/3] regulator: dt-bindings: dlg,da9121: add buck2 constraints
      commit: 9b7e0645ba65e4824436a2f1817843291e744443
[2/3] regulator: dt-bindings: dlg,da9121: allow different names
      commit: e5481cc40d00b9f4a3250b2fd4a805e3d000b229
[3/3] regulator: dt-bindings: active-semi,act8846: correct supplies
      commit: 7631a0c5b093fe1bc27b4770021c4aa0d06fb3c5

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


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

end of thread, other threads:[~2023-07-25 23:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-25 12:46 [PATCH 1/3] regulator: dt-bindings: dlg,da9121: add buck2 constraints Krzysztof Kozlowski
2023-07-25 12:46 ` [PATCH 2/3] regulator: dt-bindings: dlg,da9121: allow different names Krzysztof Kozlowski
2023-07-25 12:46 ` [PATCH 3/3] regulator: dt-bindings: active-semi,act8846: correct supplies Krzysztof Kozlowski
2023-07-25 19:57   ` Conor Dooley
2023-07-25 20:00 ` [PATCH 1/3] regulator: dt-bindings: dlg,da9121: add buck2 constraints Conor Dooley
2023-07-25 23:01 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox