[1/3] regulator: dt-bindings: dlg,da9121: add buck2 constraints

Message ID 20230725124629.150113-1-krzysztof.kozlowski@linaro.org
State New
Headers
Series [1/3] regulator: dt-bindings: dlg,da9121: add buck2 constraints |

Commit Message

Krzysztof Kozlowski July 25, 2023, 12:46 p.m. UTC
  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(-)
  

Comments

Conor Dooley July 25, 2023, 8 p.m. UTC | #1
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.
  
Mark Brown July 25, 2023, 11:01 p.m. UTC | #2
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
  

Patch

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: