aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/example-schema.yaml
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2022-04-03 10:18:49 +0200
committerRob Herring <robh@kernel.org>2022-04-04 19:55:03 -0500
commit7a150b0d850e37e7bdfc87459edd0ff302f67478 (patch)
tree8f8cd73f99195250f56c6dd1c38e72459ef54083 /Documentation/devicetree/bindings/example-schema.yaml
parentdocs: dt: writing-bindings: describe typical cases (diff)
downloadlinux-dev-7a150b0d850e37e7bdfc87459edd0ff302f67478.tar.xz
linux-dev-7a150b0d850e37e7bdfc87459edd0ff302f67478.zip
docs: dt: writing-schema: mention coding style
Mention the usage of YAML coding style. Describe explicitly that four-space indentation in DTS examples is preferred, because: 1. The YAML's default two-space indentation for DTS code makes it significantly less readable. 2. Linux coding style tabs would introduce inconsistency (entire file is indented with spaces). 3. On the other hand, eight spaces would not align with example's opening ' - |' part. Four spaces makes the code nicely aligned with it. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220403081849.8051-2-krzysztof.kozlowski@linaro.org
Diffstat (limited to 'Documentation/devicetree/bindings/example-schema.yaml')
-rw-r--r--Documentation/devicetree/bindings/example-schema.yaml14
1 files changed, 7 insertions, 7 deletions
diff --git a/Documentation/devicetree/bindings/example-schema.yaml b/Documentation/devicetree/bindings/example-schema.yaml
index 80a28781845d..8e1a8b19d429 100644
--- a/Documentation/devicetree/bindings/example-schema.yaml
+++ b/Documentation/devicetree/bindings/example-schema.yaml
@@ -249,13 +249,13 @@ examples:
# be overridden or an appropriate parent bus node should be shown (such as on
# i2c buses).
#
- # Any includes used have to be explicitly included.
+ # Any includes used have to be explicitly included. Use 4-space indentation.
- |
node@1000 {
- compatible = "vendor,soc4-ip", "vendor,soc1-ip";
- reg = <0x1000 0x80>,
- <0x3000 0x80>;
- reg-names = "core", "aux";
- interrupts = <10>;
- interrupt-controller;
+ compatible = "vendor,soc4-ip", "vendor,soc1-ip";
+ reg = <0x1000 0x80>,
+ <0x3000 0x80>;
+ reg-names = "core", "aux";
+ interrupts = <10>;
+ interrupt-controller;
};