[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230911194359.27547-3-quic_nkela@quicinc.com>
Date: Mon, 11 Sep 2023 12:43:57 -0700
From: Nikunj Kela <quic_nkela@...cinc.com>
To: <sudeep.holla@....com>
CC: <cristian.marussi@....com>, <robh+dt@...nel.org>,
<krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
<andersson@...nel.org>, <konrad.dybcio@...aro.org>,
<linux-arm-kernel@...ts.infradead.org>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-msm@...r.kernel.org>,
Nikunj Kela <quic_nkela@...cinc.com>
Subject: [PATCH v4 2/4] dt-bindings: arm: convert nested if-else construct to allOf
Nested if-else construct is not scalable therefore, convert
it to allOf:if-else.
Signed-off-by: Nikunj Kela <quic_nkela@...cinc.com>
Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
---
.../bindings/firmware/arm,scmi.yaml | 55 +++++++++----------
1 file changed, 27 insertions(+), 28 deletions(-)
diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
index b138f3d23df8..8d54ea768d38 100644
--- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
+++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
@@ -284,35 +284,34 @@ $defs:
required:
- compatible
-if:
- properties:
- compatible:
- contains:
- const: arm,scmi
-then:
- properties:
- interrupts: false
- interrupt-names: false
-
- required:
- - mboxes
- - shmem
-
-else:
- if:
- properties:
- compatible:
- contains:
- enum:
- - arm,scmi-smc
- - arm,scmi-smc-param
- then:
- required:
- - arm,smc-id
- - shmem
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: arm,scmi
+ then:
+ properties:
+ interrupts: false
+ interrupt-names: false
+
+ required:
+ - mboxes
+ - shmem
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - arm,scmi-smc
+ - arm,scmi-smc-param
+ then:
+ required:
+ - arm,smc-id
+ - shmem
- else:
- if:
+ - if:
properties:
compatible:
contains:
--
2.17.1
Powered by blists - more mailing lists