dt-bindings: Fix 'unevaluatedProperties' errors in DT graph users
authorRob Herring <robh@kernel.org>
Wed, 23 Jun 2021 16:43:44 +0000 (10:43 -0600)
committerRob Herring <robh@kernel.org>
Thu, 1 Jul 2021 14:07:12 +0000 (08:07 -0600)
In testing out under development json-schema 2020-12 support, there's a
few issues with 'unevaluatedProperties' and the graph schema. If
'graph.yaml#/properties/port' is used, then neither the port nor the
endpoint(s) can have additional properties. 'graph.yaml#/$defs/port-base'
needs to be used instead.

Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: "Paul J. Murphy" <paul.j.murphy@intel.com>
Cc: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
Cc: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-media@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210623164344.2571043-1-robh@kernel.org
Documentation/devicetree/bindings/display/bridge/lontium,lt8912b.yaml
Documentation/devicetree/bindings/media/i2c/imx258.yaml
Documentation/devicetree/bindings/media/i2c/ovti,ov5648.yaml
Documentation/devicetree/bindings/media/i2c/ovti,ov8865.yaml
Documentation/devicetree/bindings/media/i2c/sony,imx334.yaml
Documentation/devicetree/bindings/media/renesas,vin.yaml

index 735d023..674891e 100644 (file)
@@ -29,7 +29,8 @@ properties:
 
     properties:
       port@0:
-        $ref: /schemas/graph.yaml#/properties/port
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
         description:
           Primary MIPI port for MIPI input
 
index 515317e..cde0f73 100644 (file)
@@ -49,7 +49,7 @@ properties:
 
   # See ../video-interfaces.txt for more details
   port:
-    $ref: /schemas/graph.yaml#/properties/port
+    $ref: /schemas/graph.yaml#/$defs/port-base
     additionalProperties: false
 
     properties:
index 9149f56..246dc5f 100644 (file)
@@ -45,7 +45,7 @@ properties:
 
   port:
     description: MIPI CSI-2 transmitter port
-    $ref: /schemas/graph.yaml#/properties/port
+    $ref: /schemas/graph.yaml#/$defs/port-base
     additionalProperties: false
 
     properties:
index 0699c7e..b962863 100644 (file)
@@ -45,7 +45,7 @@ properties:
 
   port:
     description: MIPI CSI-2 transmitter port
-    $ref: /schemas/graph.yaml#/properties/port
+    $ref: /schemas/graph.yaml#/$defs/port-base
     additionalProperties: false
 
     properties:
index 27cc5b7..f5055b9 100644 (file)
@@ -37,7 +37,7 @@ properties:
 
   port:
     additionalProperties: false
-    $ref: /schemas/graph.yaml#/properties/port
+    $ref: /schemas/graph.yaml#/$defs/port-base
 
     properties:
       endpoint:
index dd1a5ce..4945a2f 100644 (file)
@@ -118,7 +118,8 @@ properties:
 
     properties:
       port@0:
-        $ref: /schemas/graph.yaml#/properties/port
+        $ref: /schemas/graph.yaml#/$defs/port-base
+        unevaluatedProperties: false
         description:
           Input port node, single endpoint describing a parallel input source.