[PATCH 3/5] dt-bindings: mfd: atmel,sama5d2-flexcom: Add USART child node ref binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



FLEXCOM, among other functionalities, has the ability to offer the USART
serial communication protocol. To have the FLEXCOM binding properly
validate its USART children nodes, we must reference the correct binding.
To differentiate between the SPI of FLEXCOM and the SPI of USART in SPI
mode, use the clock-names property, since the latter's respective
property is supposed to contain the "usart" string.

Signed-off-by: Sergiu Moga <sergiu.moga@xxxxxxxxxxxxx>
---
 .../bindings/mfd/atmel,sama5d2-flexcom.yaml       | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/atmel,sama5d2-flexcom.yaml b/Documentation/devicetree/bindings/mfd/atmel,sama5d2-flexcom.yaml
index e158af47c326..617331a5e66e 100644
--- a/Documentation/devicetree/bindings/mfd/atmel,sama5d2-flexcom.yaml
+++ b/Documentation/devicetree/bindings/mfd/atmel,sama5d2-flexcom.yaml
@@ -72,13 +72,20 @@ properties:
 
 patternProperties:
   "^serial@[0-9a-f]+$":
-    type: object
+    $ref: atmel,at91-usart.yaml
     description:
-      Child node describing USART. See atmel-usart.txt for details
-      of USART bindings.
+      Child node describing USART.
 
   "^spi@[0-9a-f]+$":
-    $ref: ../spi/atmel,at91rm9200-spi.yaml
+    if:
+      properties:
+        clock-names:
+          contains:
+            const: usart
+    then:
+      $ref: atmel,at91-usart.yaml
+    else:
+      $ref: ../spi/atmel,at91rm9200-spi.yaml
     description:
       Child node describing SPI.
 
-- 
2.25.1




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux