]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dt-bindings: serial: re-order entries to match coding convention
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 16 Oct 2023 18:19:09 +0000 (20:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Oct 2023 16:26:10 +0000 (18:26 +0200)
The DT schema coding convention expressed in
Documentation/devicetree/bindings/example-schema.yaml expects entries in
following order:
 - properties, patternProperties
 - required
 - if blocks, allOf with if-blocks
 - additionalProperties/unevaluatedProperties

Re-order few schemas to match the convention to avoid repeating review
comments for new patches using existing code as template.  No functional
changes.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20231016181909.368429-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/serial/nvidia,tegra20-hsuart.yaml
Documentation/devicetree/bindings/serial/qcom,msm-uart.yaml
Documentation/devicetree/bindings/serial/qcom,msm-uartdm.yaml
Documentation/devicetree/bindings/serial/renesas,em-uart.yaml
Documentation/devicetree/bindings/serial/renesas,hscif.yaml
Documentation/devicetree/bindings/serial/renesas,scifa.yaml
Documentation/devicetree/bindings/serial/renesas,scifb.yaml
Documentation/devicetree/bindings/serial/samsung_uart.yaml
Documentation/devicetree/bindings/serial/serial.yaml

index 04d55fecf47c96867ec8a23861bb2294b22fdfc9..a5d67563cd53a68d403b2a692afa3a8b2bf595f4 100644 (file)
@@ -91,11 +91,6 @@ properties:
         - description: range upper bound
         - description: adjustment (in permyriad, i.e. 0.01%)
 
-allOf:
-  - $ref: serial.yaml
-
-unevaluatedProperties: false
-
 required:
   - compatible
   - reg
@@ -106,6 +101,11 @@ required:
   - dmas
   - dma-names
 
+allOf:
+  - $ref: serial.yaml
+
+unevaluatedProperties: false
+
 examples:
   - |
     #include <dt-bindings/clock/tegra30-car.h>
index a052aaef21f46fd2b3bd9a800885c0f7bac0336f..ea6abfe2d95e5e721190f96684637c6bdeb5dc2c 100644 (file)
@@ -40,11 +40,11 @@ required:
   - interrupts
   - reg
 
-unevaluatedProperties: false
-
 allOf:
   - $ref: /schemas/serial/serial.yaml#
 
+unevaluatedProperties: false
+
 examples:
   - |
     serial@a9c00000 {
index 484b9a51f6a914b64ff647f5c75cff54171c111e..ee52bf8e8917d482253edefe0ea2260a022bc461 100644 (file)
@@ -78,8 +78,6 @@ required:
   - interrupts
   - reg
 
-unevaluatedProperties: false
-
 allOf:
   - $ref: /schemas/serial/serial.yaml#
 
@@ -97,6 +95,8 @@ allOf:
         reg:
           maxItems: 1
 
+unevaluatedProperties: false
+
 examples:
   - |
     #include <dt-bindings/interrupt-controller/arm-gic.h>
index 3fc2601f1338fe0db88fb55e4c46d26c734c3351..89f1eb0f2c5a84a43a83756523f7bd2b598b61ce 100644 (file)
@@ -38,6 +38,13 @@ properties:
       - const: sclk
       - const: pclk
 
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+
 allOf:
   - $ref: serial.yaml#
 
@@ -53,13 +60,6 @@ allOf:
         clock-names:
           minItems: 2
 
-required:
-  - compatible
-  - reg
-  - interrupts
-  - clocks
-  - clock-names
-
 unevaluatedProperties: false
 
 examples:
index 1c7f1276aed6d6deb42bd9fdc26273d5656147ad..2046e2dc0a3d190e932ee052411ec5e04bb66ab6 100644 (file)
@@ -111,8 +111,6 @@ required:
   - clock-names
   - power-domains
 
-unevaluatedProperties: false
-
 if:
   properties:
     compatible:
@@ -125,6 +123,8 @@ then:
   required:
     - resets
 
+unevaluatedProperties: false
+
 examples:
   - |
     #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
index 499507678cdf8d57396a492a1d6128c11d461fd6..c98657cf46661698288a4c3321b8b6d28ad8d014 100644 (file)
@@ -77,8 +77,6 @@ required:
   - clock-names
   - power-domains
 
-unevaluatedProperties: false
-
 if:
   properties:
     compatible:
@@ -89,6 +87,8 @@ then:
   required:
     - resets
 
+unevaluatedProperties: false
+
 examples:
   - |
     #include <dt-bindings/clock/r8a7790-cpg-mssr.h>
index 810d8a991fddcc98ed02a8a7a2acc978bf648033..fb695b3111acf3f21c180d6f734c683a63be5f5f 100644 (file)
@@ -77,8 +77,6 @@ required:
   - clock-names
   - power-domains
 
-unevaluatedProperties: false
-
 if:
   properties:
     compatible:
@@ -89,6 +87,8 @@ then:
   required:
     - resets
 
+unevaluatedProperties: false
+
 examples:
   - |
     #include <dt-bindings/clock/r8a7740-clock.h>
index 8bd88d5cbb1186bedb86ad9499990a6fc3135e7e..aecb6761b49c3d088fff052678a9cf959e380013 100644 (file)
@@ -86,8 +86,6 @@ required:
   - interrupts
   - reg
 
-unevaluatedProperties: false
-
 allOf:
   - $ref: serial.yaml#
 
@@ -128,6 +126,8 @@ allOf:
             - const: uart
             - const: clk_uart_baud0
 
+unevaluatedProperties: false
+
 examples:
   - |
     #include <dt-bindings/clock/samsung,s3c64xx-clock.h>
index 468af429c3e61806d45ec2e326f0a5768d65827d..65804ca274ae75e2bfdbbc80a030335c99fd821d 100644 (file)
@@ -87,14 +87,6 @@ properties:
     description:
       TX FIFO threshold configuration (in bytes).
 
-if:
-  required:
-    - uart-has-rtscts
-then:
-  properties:
-    cts-gpios: false
-    rts-gpios: false
-
 patternProperties:
   "^(bluetooth|bluetooth-gnss|gnss|gps|mcu)$":
     if:
@@ -136,6 +128,14 @@ patternProperties:
       required:
         - compatible
 
+if:
+  required:
+    - uart-has-rtscts
+then:
+  properties:
+    cts-gpios: false
+    rts-gpios: false
+
 additionalProperties: true
 
 examples: