diff mbox series

[2/2] dt-bindings: media: csi: Fix clocks description

Message ID 20200210100417.78583-2-maxime@cerno.tech (mailing list archive)
State Mainlined
Commit 854bdbae9058bcf09b0add70b6047bc9ca776de2
Headers show
Series [1/2] dt-bindings: media: csi: Add interconnects properties | expand

Commit Message

Maxime Ripard Feb. 10, 2020, 10:04 a.m. UTC
Commit 1de243b07666 ("media: dt-bindings: media: sun4i-csi: Add compatible
for CSI1 on A10/A20") introduced support for the CSI1 controller on A10 and
A20 that unlike CSI0 doesn't have an ISP and therefore only have two
clocks, the bus and module clocks.

The clocks and clock-names properties have thus been modified to allow
either two or tree clocks. However, the current list has the ISP clock at
the second position, which means the bindings expects a list of either
bus and isp, or bus, isp and mod. The initial intent of the patch was
obviously to have bus and mod in the former case.

Let's fix the binding so that it validates properly.

Fixes: 1de243b07666 ("media: dt-bindings: media: sun4i-csi: Add compatible for CSI1 on A10/A20")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 .../media/allwinner,sun4i-a10-csi.yaml        | 30 +++++++++++--------
 1 file changed, 18 insertions(+), 12 deletions(-)

Comments

Rob Herring (Arm) Feb. 19, 2020, 10:15 p.m. UTC | #1
On Mon, 10 Feb 2020 11:04:17 +0100, Maxime Ripard wrote:
> Commit 1de243b07666 ("media: dt-bindings: media: sun4i-csi: Add compatible
> for CSI1 on A10/A20") introduced support for the CSI1 controller on A10 and
> A20 that unlike CSI0 doesn't have an ISP and therefore only have two
> clocks, the bus and module clocks.
> 
> The clocks and clock-names properties have thus been modified to allow
> either two or tree clocks. However, the current list has the ISP clock at
> the second position, which means the bindings expects a list of either
> bus and isp, or bus, isp and mod. The initial intent of the patch was
> obviously to have bus and mod in the former case.
> 
> Let's fix the binding so that it validates properly.
> 
> Fixes: 1de243b07666 ("media: dt-bindings: media: sun4i-csi: Add compatible for CSI1 on A10/A20")
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../media/allwinner,sun4i-a10-csi.yaml        | 30 +++++++++++--------
>  1 file changed, 18 insertions(+), 12 deletions(-)
> 

Applied, thanks.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
index afde17d9dab1..8453ee340b9f 100644
--- a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
+++ b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
@@ -33,20 +33,26 @@  properties:
     maxItems: 1
 
   clocks:
-    minItems: 2
-    maxItems: 3
-    items:
-      - description: The CSI interface clock
-      - description: The CSI ISP clock
-      - description: The CSI DRAM clock
+    oneOf:
+      - items:
+        - description: The CSI interface clock
+        - description: The CSI DRAM clock
+
+      - items:
+        - description: The CSI interface clock
+        - description: The CSI ISP clock
+        - description: The CSI DRAM clock
 
   clock-names:
-    minItems: 2
-    maxItems: 3
-    items:
-      - const: bus
-      - const: isp
-      - const: ram
+    oneOf:
+      - items:
+        - const: bus
+        - const: ram
+
+      - items:
+        - const: bus
+        - const: isp
+        - const: ram
 
   resets:
     maxItems: 1