diff mbox series

[v2,01/15] dt-bindings: clock: permit additionalProprieties to qcom,gcc

Message ID 20220120232028.6738-2-ansuelsmth@gmail.com
State Changes Requested, archived
Headers show
Series Multiple addition and improvement to ipq8064 gcc | expand

Checks

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

Commit Message

Christian Marangi Jan. 20, 2022, 11:20 p.m. UTC
To permit the use of qcom,gcc as a template for other Documentation, set
additionalProprieties to true.
While at it add the missing syscon for qcom,ipq8064 that is mandatory
for the correct function of the tsens driver.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 .../devicetree/bindings/clock/qcom,gcc.yaml   | 41 ++++++++++---------
 1 file changed, 22 insertions(+), 19 deletions(-)

Comments

Rob Herring (Arm) Jan. 21, 2022, 1:53 a.m. UTC | #1
On Fri, Jan 21, 2022 at 12:20:14AM +0100, Ansuel Smith wrote:
> To permit the use of qcom,gcc as a template for other Documentation, set
> additionalProprieties to true.
> While at it add the missing syscon for qcom,ipq8064 that is mandatory
> for the correct function of the tsens driver.
> 
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---
>  .../devicetree/bindings/clock/qcom,gcc.yaml   | 41 ++++++++++---------
>  1 file changed, 22 insertions(+), 19 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
> index f66d703bd913..3fd03687a6f7 100644
> --- a/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
> +++ b/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
> @@ -36,24 +36,27 @@ description: |
>  
>  properties:
>    compatible:
> -    enum:
> -      - qcom,gcc-apq8084
> -      - qcom,gcc-ipq4019
> -      - qcom,gcc-ipq6018
> -      - qcom,gcc-ipq8064
> -      - qcom,gcc-mdm9607
> -      - qcom,gcc-msm8226
> -      - qcom,gcc-msm8660
> -      - qcom,gcc-msm8916
> -      - qcom,gcc-msm8939
> -      - qcom,gcc-msm8953
> -      - qcom,gcc-msm8960
> -      - qcom,gcc-msm8974
> -      - qcom,gcc-msm8974pro
> -      - qcom,gcc-msm8974pro-ac
> -      - qcom,gcc-mdm9615
> -      - qcom,gcc-sdm630
> -      - qcom,gcc-sdm660
> +    oneOf:
> +      - enum:
> +          - qcom,gcc-apq8084
> +          - qcom,gcc-ipq4019
> +          - qcom,gcc-ipq6018
> +          - qcom,gcc-mdm9607
> +          - qcom,gcc-msm8226
> +          - qcom,gcc-msm8660
> +          - qcom,gcc-msm8916
> +          - qcom,gcc-msm8939
> +          - qcom,gcc-msm8953
> +          - qcom,gcc-msm8960
> +          - qcom,gcc-msm8974
> +          - qcom,gcc-msm8974pro
> +          - qcom,gcc-msm8974pro-ac
> +          - qcom,gcc-mdm9615
> +          - qcom,gcc-sdm630
> +          - qcom,gcc-sdm660
> +      - items:
> +          - const: qcom,gcc-ipq8064
> +          - const: syscon
>  
>    '#clock-cells':
>      const: 1
> @@ -78,7 +81,7 @@ required:
>    - '#reset-cells'
>    - '#power-domain-cells'
>  
> -additionalProperties: false
> +additionalProperties: true

This doesn't work. You just allowed any other property to be allowed for 
all these devices. If you need something shared, you have to create a 
common base schema that's referenced by other schemas. Minimally, those 
would look like this:

$ref: /to/base/schema.yaml
unevaluatedProperties: false
properties:
  compatible:
    ...

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
index f66d703bd913..3fd03687a6f7 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc.yaml
@@ -36,24 +36,27 @@  description: |
 
 properties:
   compatible:
-    enum:
-      - qcom,gcc-apq8084
-      - qcom,gcc-ipq4019
-      - qcom,gcc-ipq6018
-      - qcom,gcc-ipq8064
-      - qcom,gcc-mdm9607
-      - qcom,gcc-msm8226
-      - qcom,gcc-msm8660
-      - qcom,gcc-msm8916
-      - qcom,gcc-msm8939
-      - qcom,gcc-msm8953
-      - qcom,gcc-msm8960
-      - qcom,gcc-msm8974
-      - qcom,gcc-msm8974pro
-      - qcom,gcc-msm8974pro-ac
-      - qcom,gcc-mdm9615
-      - qcom,gcc-sdm630
-      - qcom,gcc-sdm660
+    oneOf:
+      - enum:
+          - qcom,gcc-apq8084
+          - qcom,gcc-ipq4019
+          - qcom,gcc-ipq6018
+          - qcom,gcc-mdm9607
+          - qcom,gcc-msm8226
+          - qcom,gcc-msm8660
+          - qcom,gcc-msm8916
+          - qcom,gcc-msm8939
+          - qcom,gcc-msm8953
+          - qcom,gcc-msm8960
+          - qcom,gcc-msm8974
+          - qcom,gcc-msm8974pro
+          - qcom,gcc-msm8974pro-ac
+          - qcom,gcc-mdm9615
+          - qcom,gcc-sdm630
+          - qcom,gcc-sdm660
+      - items:
+          - const: qcom,gcc-ipq8064
+          - const: syscon
 
   '#clock-cells':
     const: 1
@@ -78,7 +81,7 @@  required:
   - '#reset-cells'
   - '#power-domain-cells'
 
-additionalProperties: false
+additionalProperties: true
 
 examples:
   # Example for GCC for MSM8960: