[PATCH v3 0/6] dtc: dt-check-style: Improvement after using on DTS

From: Krzysztof Kozlowski

Date: Mon Jul 06 2026 - 12:24:16 EST


Changes in v3:
1. Patch #2: Use re.search
2. Patch #2: Add dts-mixed-indent.dts test case
3. Several new patches 3-7.
v2: https://lore.kernel.org/r/20260706102421.343639-4-krzysztof.kozlowski@xxxxxxxxxxxxxxxx/

Changes in v2:
1. Patch #2: Rework idea.
2. Adjust function doc/comment.
v1: https://lore.kernel.org/r/20260706071446.87669-2-krzysztof.kozlowski@xxxxxxxxxxxxxxxx/

(I was not using b4 for v1 and v2, so b4 diff might fail)

Best regards,
Krzysztof

---
Krzysztof Kozlowski (6):
dtc: dt-check-style: Narrow disallowing of tab in DTS only to YAML
dtc: dt-check-style: Allow space-aligning indentation in DTS
dtc: dt-check-style: Rework handling YAML/DTS in rules
dtc: dt-check-style: Expect first device_type
dtc: dt-check-style: Do not sort top-level nodes in DTS by unit address
dtc: dt-check-style: Handle properly DTC-style includes

.../devicetree/bindings/dts-coding-style.rst | 15 ++--
scripts/dtc/dt-check-style | 84 +++++++++++++---------
.../dt-style-selftest/bad/dts-digit-node-order.dts | 40 +++++++++++
.../dtc/dt-style-selftest/bad/dts-mixed-indent.dts | 20 ++++++
.../dt-style-selftest/bad/dts-property-order.dts | 36 ++++++++++
.../bad/yaml-prop-order-device-type.yaml | 31 ++++++++
.../expected/dts-digit-node-order.dts.txt | 2 +
.../expected/dts-mixed-indent.dts.txt | 8 +++
.../expected/dts-property-order.dts.txt | 5 ++
.../expected/yaml-mixed-indent.yaml.txt | 1 -
.../expected/yaml-prop-order-device-type.yaml.txt | 2 +
scripts/dtc/dt-style-selftest/good/dts-dtc.dts | 20 ++++++
.../dt-style-selftest/good/dts-preprocessor.dts | 20 ++++++
scripts/dtc/dt-style-selftest/good/soc.dtsi | 40 +++++++++++
14 files changed, 284 insertions(+), 40 deletions(-)
---
base-commit: 3190fb5798e880161c46f2a623a354b23892dc36
change-id: 20260706-dts-style-checker-750a187f41d7

Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>