]> git.baikalelectronics.ru Git - kernel.git/commit
docs: dt: writing-schema: mention coding style
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sun, 3 Apr 2022 08:18:49 +0000 (10:18 +0200)
committerRob Herring <robh@kernel.org>
Tue, 5 Apr 2022 00:55:03 +0000 (19:55 -0500)
commit58f8e7bfd39dcb0b1e0c5a796b4ba3585662124b
tree8f8cd73f99195250f56c6dd1c38e72459ef54083
parent74ab4d97e18f777cd10723d7374a6102b9547a3e
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
Documentation/devicetree/bindings/example-schema.yaml
Documentation/devicetree/bindings/writing-schema.rst