diff mbox series

[2/3] dt-bindings: iommu: renesas,ipmmu-vmsa: Make 'power-domains' conditionally required

Message ID 20210202205544.24812-2-robh@kernel.org
State Accepted, archived
Headers show
Series [1/3] dt-bindings: Fix undocumented compatible strings in examples | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema success
robh/dtbs-check success

Commit Message

Rob Herring (Arm) Feb. 2, 2021, 8:55 p.m. UTC
Fixing the compatible string typos results in an error in the example:

Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.example.dt.yaml:
  iommu@fe951000: 'power-domains' is a required property

Based on the dts files, a 'power-domains' property only exists on Gen 3
which can be conditioned on !renesas,ipmmu-vmsa.

Cc: Joerg Roedel <joro@8bytes.org>
Cc: Will Deacon <will@kernel.org>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: iommu@lists.linux-foundation.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../bindings/iommu/renesas,ipmmu-vmsa.yaml           | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Comments

Yoshihiro Shimoda Feb. 4, 2021, 1:23 a.m. UTC | #1
Hi Rob,

> From: Rob Herring, Sent: Wednesday, February 3, 2021 5:56 AM
> 
> Fixing the compatible string typos results in an error in the example:
> 
> Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.example.dt.yaml:
>   iommu@fe951000: 'power-domains' is a required property
> 
> Based on the dts files, a 'power-domains' property only exists on Gen 3
> which can be conditioned on !renesas,ipmmu-vmsa.
> 
> Cc: Joerg Roedel <joro@8bytes.org>
> Cc: Will Deacon <will@kernel.org>
> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Cc: iommu@lists.linux-foundation.org
> Signed-off-by: Rob Herring <robh@kernel.org>

Thank you for the patch!

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Best regards,
Yoshihiro Shimoda
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.yaml b/Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.yaml
index 349633108bbd..dda44976acc1 100644
--- a/Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.yaml
+++ b/Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.yaml
@@ -76,7 +76,6 @@  required:
   - compatible
   - reg
   - '#iommu-cells'
-  - power-domains
 
 oneOf:
   - required:
@@ -86,6 +85,17 @@  oneOf:
 
 additionalProperties: false
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          not:
+            contains:
+              const: renesas,ipmmu-vmsa
+    then:
+      required:
+        - power-domains
+
 examples:
   - |
     #include <dt-bindings/clock/r8a7791-cpg-mssr.h>