Skip to content

Commit b54472a

Browse files
committed
dt-bindings: media: nxp,imx7-mipi-csi2: Drop bad if/then schema
The if/then schema for 'data-lanes' doesn't work as 'compatible' is at a different level than 'data-lanes'. To make it work, the if/then schema would have to be moved to the top level and then whole hierarchy of nodes down to 'data-lanes' created. I don't think it is worth the complexity to do that, so let's just drop it. The error in this schema is masked by a fixup in the tools causing the 'allOf' to get overwritten. Removing the fixup as part of moving to json-schema draft 2019-09 revealed the issue: Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.example.dt.yaml: mipi-csi@30750000: ports:port@0:endpoint:data-lanes:0: [1] is too short From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.example.dt.yaml: mipi-csi@32e30000: ports:port@0:endpoint:data-lanes:0: [1, 2, 3, 4] is too long From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml The if condition was always true because 'compatible' did not exist in 'endpoint' node and a non-existent property is true for json-schema. Fixes: 85b62ff ("media: dt-bindings: media: nxp,imx7-mipi-csi2: Add i.MX8MM support") Cc: Rui Miguel Silva <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Shawn Guo <[email protected]> Cc: Sascha Hauer <[email protected]> Cc: Pengutronix Kernel Team <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: NXP Linux Team <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Acked-by: Rui Miguel Silva <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent de4addd commit b54472a

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ properties:
7979

8080
properties:
8181
data-lanes:
82+
description:
83+
Note that 'fsl,imx7-mipi-csi2' only supports up to 2 data lines.
8284
items:
8385
minItems: 1
8486
maxItems: 4
@@ -91,18 +93,6 @@ properties:
9193
required:
9294
- data-lanes
9395

94-
allOf:
95-
- if:
96-
properties:
97-
compatible:
98-
contains:
99-
const: fsl,imx7-mipi-csi2
100-
then:
101-
properties:
102-
data-lanes:
103-
items:
104-
maxItems: 2
105-
10696
port@1:
10797
$ref: /schemas/graph.yaml#/properties/port
10898
description:

0 commit comments

Comments
 (0)