Re: [PATCH v5 4/6] phy: dt-bindings: cdns, dphy: make clocks optional for Rx mode

From
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date
2021-10-06 23:57:41
Also in
linux-devicetree, lkml
Reply to
Pratyush Yadav, 2021-09-02
Hi Pratyush,

Thank you for the patch.

On Fri, Sep 03, 2021 at 12:25:41AM +0530, Pratyush Yadav wrote:
The clocks are not used by the DPHY when used in Rx mode so make them
optional for it by using a conditional based on compatible.

Signed-off-by: Pratyush Yadav <redacted>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
quoted hunk ↗ jump to hunk
---

Changes in v5:
- Make clocks a required property based on the compatible.

Changes in v3:
- Add Rob's Ack.

Changes in v2:
- Re-order subject prefixes.

 .../devicetree/bindings/phy/cdns,dphy.yaml          | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/phy/cdns,dphy.yaml b/Documentation/devicetree/bindings/phy/cdns,dphy.yaml
index b90a58773bf2..558f110fda9e 100644
--- a/Documentation/devicetree/bindings/phy/cdns,dphy.yaml
+++ b/Documentation/devicetree/bindings/phy/cdns,dphy.yaml
@@ -33,10 +33,19 @@ properties:
 required:
   - compatible
   - reg
-  - clocks
-  - clock-names
   - "#phy-cells"
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: cdns,dphy
+    then:
+      required:
+        - clocks
+        - clock-names
+
 additionalProperties: false
 
 examples:
-- 
Regards,

Laurent Pinchart

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
Thread (21 messages) 21 messages, 5 authors, last reply 2021-10-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help