]> 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)
commit4230dc34cfc61aa520fcaa39bb662c5d90b6f646
tree8f8cd73f99195250f56c6dd1c38e72459ef54083
parent92a41afbbf0dc6ad5dd6fc0924cac177b413faa7
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