Skip to contentSkip to conversation

dt-bindings: Fix array schemas encoded as matrices

PATCH Applied Rob Herring 2 participants 3 messages Jan 19, 2022 – Jan 20, 2022

Subsystems (8)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: Fix array schemas encoded as matrices

The YAML DT encoding has leaked into some array properties. Properties which are defined as an array should have a schema that's just an array. That means there should only be a single level of 'minItems', 'maxItems', and/or 'items'.

---
 .../bindings/media/nxp,imx7-mipi-csi2.yaml    | 12 ++--
 .../bindings/media/nxp,imx8mq-mipi-csi2.yaml  | 12 ++--
 .../bindings/net/can/bosch,m_can.yaml         | 52 ++++++++--------
 .../bindings/net/ethernet-controller.yaml     | 59 +++++++++----------
 4 files changed, 62 insertions(+), 73 deletions(-)
Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml +5 -7
index 1ef849dc74d7..e2e6e9aa0fe6 100644
@@ -81,14 +81,12 @@ properties:
               data-lanes:
                 description:
                   Note that 'fsl,imx7-mipi-csi2' only supports up to 2 data lines.
+                minItems: 1
                 items:
-                  minItems: 1
-                  maxItems: 4
-                  items:
-                    - const: 1
-                    - const: 2
-                    - const: 3
-                    - const: 4
+                  - const: 1
+                  - const: 2
+                  - const: 3
+                  - const: 4
 
             required:
               - data-lanes
Documentation/devicetree/bindings/media/nxp,imx8mq-mipi-csi2.yaml +5 -7
index d13c9233a7c8..2a14e3b0e004 100644
@@ -87,14 +87,12 @@ properties:
 
             properties:
               data-lanes:
+                minItems: 1
                 items:
-                  minItems: 1
-                  maxItems: 4
-                  items:
-                    - const: 1
-                    - const: 2
-                    - const: 3
-                    - const: 4
+                  - const: 1
+                  - const: 2
+                  - const: 3
+                  - const: 4
 
             required:
               - data-lanes
Documentation/devicetree/bindings/net/can/bosch,m_can.yaml +25 -27

58 lines not on this page · raw message

Documentation/devicetree/bindings/net/ethernet-controller.yaml +27 -32

78 lines not on this page · raw message

Signature · 1 line
2.32.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Rob Herring

The YAML DT encoding has leaked into some array properties. Properties which are defined as an array should have a schema that's just an array. That means there should only be a single level of 'minItems', 'maxItems', and/or 'items'.

---
 .../bindings/net/can/bosch,m_can.yaml         | 52 ++++++++--------

for net/can/

regards,
Marc

Signature · 4 lines
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |
author maintainer Applied
#2 lore raw
In reply to Rob Herring
Quoted 5 lines · Rob Herring

The YAML DT encoding has leaked into some array properties. Properties which are defined as an array should have a schema that's just an array. That means there should only be a single level of 'minItems', 'maxItems', and/or 'items'.

Quoted 8 lines
---
 .../bindings/media/nxp,imx7-mipi-csi2.yaml    | 12 ++--
 .../bindings/media/nxp,imx8mq-mipi-csi2.yaml  | 12 ++--
 .../bindings/net/can/bosch,m_can.yaml         | 52 ++++++++--------
 .../bindings/net/ethernet-controller.yaml     | 59 +++++++++----------
 4 files changed, 62 insertions(+), 73 deletions(-)

Applied, thanks!