diff mbox series

[v2] media: dt-bindings: coda: Add missing 'additionalProperties'

Message ID 20201117200752.4004368-1-robh@kernel.org
State New
Headers show
Series [v2] media: dt-bindings: coda: Add missing 'additionalProperties' | expand

Commit Message

Rob Herring Nov. 17, 2020, 8:07 p.m. UTC
'additionalProperties' is now required by the meta-schema. Add it for
coda. As a result, 'interrupts', 'interrupt-names' and 'power-domains'
need to be reworked to be defined at the top level.

Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>

---
 .../devicetree/bindings/media/coda.yaml       | 42 +++++++++----------
 1 file changed, 21 insertions(+), 21 deletions(-)

-- 
2.25.1

Comments

Rob Herring Dec. 3, 2020, 3:10 p.m. UTC | #1
On Tue, Nov 17, 2020 at 02:07:52PM -0600, Rob Herring wrote:
> 'additionalProperties' is now required by the meta-schema. Add it for
> coda. As a result, 'interrupts', 'interrupt-names' and 'power-domains'
> need to be reworked to be defined at the top level.
> 
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---

Ping! In case it wasn't clear, this should go in via the media tree.

>  .../devicetree/bindings/media/coda.yaml       | 42 +++++++++----------
>  1 file changed, 21 insertions(+), 21 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/coda.yaml b/Documentation/devicetree/bindings/media/coda.yaml
> index 7bac0057faf7..36781ee4617f 100644
> --- a/Documentation/devicetree/bindings/media/coda.yaml
> +++ b/Documentation/devicetree/bindings/media/coda.yaml
> @@ -44,6 +44,21 @@ properties:
>        - const: per
>        - const: ahb
>  
> +  interrupts:
> +    minItems: 1
> +    items:
> +      - description: BIT processor interrupt
> +      - description: JPEG unit interrupt
> +
> +  interrupt-names:
> +    minItems: 1
> +    items:
> +      - const: bit
> +      - const: jpeg
> +
> +  power-domains:
> +    maxItems: 1
> +
>    resets:
>      maxItems: 1
>  
> @@ -59,6 +74,8 @@ required:
>    - clocks
>    - clock-names
>  
> +additionalProperties: false
> +
>  allOf:
>    - if:
>        properties:
> @@ -68,34 +85,17 @@ allOf:
>      then:
>        properties:
>          interrupts:
> -          items:
> -            - description: BIT processor interrupt
> -            - description: JPEG unit interrupt
> +          minItems: 2
>  
>          interrupt-names:
> -          items:
> -            - const: bit
> -            - const: jpeg
> +          minItems: 2
>      else:
>        properties:
>          interrupts:
> -          items:
> -            - description: BIT processor interrupt
> -
> -  - if:
> -      properties:
> -        compatible:
> -          contains:
> -            enum:
> -              - fsl,imx6dl-vpu
> -              - fsl,imx6q-vpu
> -    then:
> -      properties:
> -        power-domains:
> -          $ref: /schemas/types.yaml#/definitions/phandle
> -          description: phandle pointing to the PU power domain
>            maxItems: 1
>  
> +        power-domains: false
> +
>  examples:
>    - |
>      vpu: video-codec@63ff4000 {
> -- 
> 2.25.1
>
Philipp Zabel Dec. 3, 2020, 3:51 p.m. UTC | #2
On Tue, 2020-11-17 at 14:07 -0600, Rob Herring wrote:
> 'additionalProperties' is now required by the meta-schema. Add it for
> coda. As a result, 'interrupts', 'interrupt-names' and 'power-domains'
> need to be reworked to be defined at the top level.
> 
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  .../devicetree/bindings/media/coda.yaml       | 42 +++++++++----------
>  1 file changed, 21 insertions(+), 21 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/coda.yaml b/Documentation/devicetree/bindings/media/coda.yaml
> index 7bac0057faf7..36781ee4617f 100644
> --- a/Documentation/devicetree/bindings/media/coda.yaml
> +++ b/Documentation/devicetree/bindings/media/coda.yaml
> @@ -44,6 +44,21 @@ properties:
>        - const: per
>        - const: ahb
>  
> +  interrupts:
> +    minItems: 1
> +    items:
> +      - description: BIT processor interrupt
> +      - description: JPEG unit interrupt
> +
> +  interrupt-names:
> +    minItems: 1
> +    items:
> +      - const: bit
> +      - const: jpeg

I understand this would require a property

	interrupt-names = "bit";

in the arch/arm/boot/dts/imx{27,51,53}.dtsi device trees.
That property is currently not required nor present, with only one
interrupt on those devices. Is it possible to set "minItems: 0"?

regards
Philipp
Philipp Zabel Dec. 3, 2020, 3:57 p.m. UTC | #3
On Thu, 2020-12-03 at 16:51 +0100, Philipp Zabel wrote:
> On Tue, 2020-11-17 at 14:07 -0600, Rob Herring wrote:
> > 'additionalProperties' is now required by the meta-schema. Add it for
> > coda. As a result, 'interrupts', 'interrupt-names' and 'power-domains'
> > need to be reworked to be defined at the top level.
> > 
> > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> > Cc: linux-media@vger.kernel.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> >  .../devicetree/bindings/media/coda.yaml       | 42 +++++++++----------
> >  1 file changed, 21 insertions(+), 21 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/media/coda.yaml b/Documentation/devicetree/bindings/media/coda.yaml
> > index 7bac0057faf7..36781ee4617f 100644
> > --- a/Documentation/devicetree/bindings/media/coda.yaml
> > +++ b/Documentation/devicetree/bindings/media/coda.yaml
> > @@ -44,6 +44,21 @@ properties:
> >        - const: per
> >        - const: ahb
> >  
> > +  interrupts:
> > +    minItems: 1
> > +    items:
> > +      - description: BIT processor interrupt
> > +      - description: JPEG unit interrupt
> > +
> > +  interrupt-names:
> > +    minItems: 1
> > +    items:
> > +      - const: bit
> > +      - const: jpeg
> 
> I understand this would require a property
> 
> 	interrupt-names = "bit";
> 
> in the arch/arm/boot/dts/imx{27,51,53}.dtsi device trees.
> That property is currently not required nor present, with only one
> interrupt on those devices. Is it possible to set "minItems: 0"?

Never mind, sorry for the noise. interrupt-names is still not required.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp
Rob Herring Dec. 18, 2020, 9:16 p.m. UTC | #4
On Tue, 17 Nov 2020 14:07:52 -0600, Rob Herring wrote:
> 'additionalProperties' is now required by the meta-schema. Add it for
> coda. As a result, 'interrupts', 'interrupt-names' and 'power-domains'
> need to be reworked to be defined at the top level.
> 
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  .../devicetree/bindings/media/coda.yaml       | 42 +++++++++----------
>  1 file changed, 21 insertions(+), 21 deletions(-)
> 

As this wasn't picked up for rc1, I've applied it.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/coda.yaml b/Documentation/devicetree/bindings/media/coda.yaml
index 7bac0057faf7..36781ee4617f 100644
--- a/Documentation/devicetree/bindings/media/coda.yaml
+++ b/Documentation/devicetree/bindings/media/coda.yaml
@@ -44,6 +44,21 @@  properties:
       - const: per
       - const: ahb
 
+  interrupts:
+    minItems: 1
+    items:
+      - description: BIT processor interrupt
+      - description: JPEG unit interrupt
+
+  interrupt-names:
+    minItems: 1
+    items:
+      - const: bit
+      - const: jpeg
+
+  power-domains:
+    maxItems: 1
+
   resets:
     maxItems: 1
 
@@ -59,6 +74,8 @@  required:
   - clocks
   - clock-names
 
+additionalProperties: false
+
 allOf:
   - if:
       properties:
@@ -68,34 +85,17 @@  allOf:
     then:
       properties:
         interrupts:
-          items:
-            - description: BIT processor interrupt
-            - description: JPEG unit interrupt
+          minItems: 2
 
         interrupt-names:
-          items:
-            - const: bit
-            - const: jpeg
+          minItems: 2
     else:
       properties:
         interrupts:
-          items:
-            - description: BIT processor interrupt
-
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - fsl,imx6dl-vpu
-              - fsl,imx6q-vpu
-    then:
-      properties:
-        power-domains:
-          $ref: /schemas/types.yaml#/definitions/phandle
-          description: phandle pointing to the PU power domain
           maxItems: 1
 
+        power-domains: false
+
 examples:
   - |
     vpu: video-codec@63ff4000 {