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

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