Skip to content

arm64: dts: exynos: Format with dtfmt

Waqar Hameed linux-arm-kernel linux-devicetree linux-samsung-soc lkml 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 7 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/16arm64: dts: exynos2200: Remove empty line at end of nodearch/arm64/boot/dts/exynos/exynos2200-pinctrl.dtsi arch/arm64/boot/dts/exynos/exynos2200.dtsi+0 -31 reply
2/16arm64: dts: exynos5433: Use tabs for indentationarch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi+2 -20 replies
3/16arm64: dts: exynos7: Remove empty line at end of nodearch/arm64/boot/dts/exynos/exynos7-espresso.dts+0 -10 replies
4/16arm64: dts: exynos7: Align comments with minimal whitespacearch/arm64/boot/dts/exynos/exynos7.dtsi+4 -40 replies
5/16arm64: dts: exynos7885: Fix format of line commentarch/arm64/boot/dts/exynos/exynos7885-pinctrl.dtsi+1 -10 replies
6/16arm64: dts: exynos7885: Align end of node definition bracearch/arm64/boot/dts/exynos/exynos7885-pinctrl.dtsi+1 -10 replies
7/16arm64: dts: exynos850: Align end of node definition bracearch/arm64/boot/dts/exynos/exynos850-pinctrl.dtsi+1 -10 replies
8/16arm64: dts: exynos850: Use tabs for indentationarch/arm64/boot/dts/exynos/exynos850.dtsi+4 -40 replies
9/16arm64: dts: exynos8850: Add missing space in compatiblearch/arm64/boot/dts/exynos/exynos8855-smdk.dts+1 -11 reply
10/16arm64: dts: exynos8855: Remove empty line at end of nodearch/arm64/boot/dts/exynos/exynos8855-smdk.dts+0 -10 replies
11/16arm64: dts: exynos8855: Use tabs for indentationarch/arm64/boot/dts/exynos/exynos8855.dtsi arch/arm64/boot/dts/exynos/exynos8895-pinctrl.dtsi+9 -90 replies
12/16arm64: dts: exynosautov920: Add space before line commentsarch/arm64/boot/dts/exynos/exynosautov920.dtsi+3 -30 replies
13/16arm64: dts: exynosautov920: Add missing space in compatiblearch/arm64/boot/dts/exynos/exynosautov920.dtsi+1 -11 reply
14/16arm64: dts: exynosautov920: Remove empty line at end of nodearch/arm64/boot/dts/exynos/exynosautov920.dtsi+0 -10 replies
15/16arm64: dts: exynos: gs101: Use tabs for indentationarch/arm64/boot/dts/exynos/google/gs101.dtsi+5 -50 replies
16/16arm64: dts: exynos: gs101: Add space before line commentsarch/arm64/boot/dts/exynos/google/gs101.dtsi+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/16] arm64: dts: exynos: Format with dtfmt

I was looking through the notes for the last Devicetree microconference at Linux Plumbers (LPC) 2025 [1], and realized that the tool I have been working on might be of interest here: dtfmt - a Devicetree Source formatter [2].

dtfmt uses a parser with lexical grammar (tree-sitter) directly ported from the actual Device Tree Compiler's (dtc) lexer/parser, also (hand)written by me [3]. It is primarily designed for the Linux kernel and currently parses all 6872 devicetree files in the tree successfully (found with find . -iregex ".+\.dts[io]?$").

This tool was developed out of frustration when reviewing devicetree patches internally at my company Axis. I would have published it earlier if I was aware of the on-going discussions at LPC 2025. It only caught my attention since I'm planning to attend LPC this year (especially the Devicetree microconference and would therefore love to discuss this more in-person!).

This patch series is only a small demonstration of dtfmt. Obviously one can run dtfmt for all files and generate a much bigger diff, but I just chose arch/arm64/boot/dts/exynos/ here. Primarily to get Krzysztof in the "To:"-field :)

Please note that since we don't currently have a _definitive_ style guide for Devictree Source files, dtfmt tries to be pragmatic and try to "guess" the intended style (e.g. alignment of arrays and comma separated property data). Some things have been left out (for now), because it's too hard to implement without any concrete style decisions in place (e.g. alignment of comments, long line wrapping etc.). dtfmt will continue to develop and will always align with the Linux kernel. Feedback (and collaboration) is therefore greatly appreciated!

[1] https://lpc.events/event/19/sessions/237/attachments/1713/4459/Notes%20-%20Devicetree%20MC%20-%20LPC%202025.pdf
[1] https://codeberg.org/whame/dtfmt
Mirror: https://github.com/whame/dtfmt
[2] https://codeberg.org/whame/tree-sitter-devicetree
Mirror: https://github.com/whame/tree-sitter-devicetree

Waqar Hameed (16):
arm64: dts: exynos2200: Remove empty line at end of node
arm64: dts: exynos5433: Use tabs for indentation
arm64: dts: exynos7: Remove empty line at end of node
arm64: dts: exynos7: Align comments with minimal whitespace
arm64: dts: exynos7885: Fix format of line comment
arm64: dts: exynos7885: Align end of node definition brace
arm64: dts: exynos850: Align end of node definition brace
arm64: dts: exynos850: Use tabs for indentation
arm64: dts: exynos8850: Add missing space in compatible
arm64: dts: exynos8855: Remove empty line at end of node
arm64: dts: exynos8855: Use tabs for indentation
arm64: dts: exynosautov920: Add space before line comments
arm64: dts: exynosautov920: Add missing space in compatible
arm64: dts: exynosautov920: Remove empty line at end of node
arm64: dts: exynos: gs101: Use tabs for indentation
arm64: dts: exynos: gs101: Add space before line comments

 arch/arm64/boot/dts/exynos/exynos2200-pinctrl.dtsi   |  2 --
 arch/arm64/boot/dts/exynos/exynos2200.dtsi           |  1 -
 .../arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi |  4 ++--
 arch/arm64/boot/dts/exynos/exynos7-espresso.dts      |  1 -
 arch/arm64/boot/dts/exynos/exynos7.dtsi              |  8 ++++----
 arch/arm64/boot/dts/exynos/exynos7885-pinctrl.dtsi   |  4 ++--
 arch/arm64/boot/dts/exynos/exynos850-pinctrl.dtsi    |  2 +-
 arch/arm64/boot/dts/exynos/exynos850.dtsi            |  8 ++++----
 arch/arm64/boot/dts/exynos/exynos8855-smdk.dts       |  3 +--
 arch/arm64/boot/dts/exynos/exynos8855.dtsi           |  8 ++++----
 arch/arm64/boot/dts/exynos/exynos8895-pinctrl.dtsi   | 10 +++++-----
 arch/arm64/boot/dts/exynos/exynosautov920.dtsi       |  9 ++++-----
 arch/arm64/boot/dts/exynos/google/gs101.dtsi         | 12 ++++++------
 13 files changed, 33 insertions(+), 39 deletions(-)

base-commit: 72d3fcf802c45d00b300f25b848a93c3a2bd7c7e

Signature · 1 line
2.43.0