mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 00/16] arm64: dts: exynos: Format with dtfmt
@ 2026-09-28 22:38 Waqar Hameed
  2026-09-28 22:38 ` [PATCH 01/16] arm64: dts: exynos2200: Remove empty line at end of node Waqar Hameed
                   ` (16 more replies)
  0 siblings, 17 replies; 21+ messages in thread
From: Waqar Hameed @ 2026-09-28 22:38 UTC (permalink / raw)
  To: Peter Griffin, André Draszik, Tudor Ambarus, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Alim Akhtar, Sam Protsenko,
	Ivaylo Ivanov, Konrad Dybcio
  Cc: kernel, linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel

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
-- 
2.43.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2026-09-29  5:49 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 22:38 [PATCH 00/16] arm64: dts: exynos: Format with dtfmt Waqar Hameed
2026-09-28 22:38 ` [PATCH 01/16] arm64: dts: exynos2200: Remove empty line at end of node Waqar Hameed
2026-09-29  5:43   ` Krzysztof Kozlowski
2026-09-28 22:38 ` [PATCH 02/16] arm64: dts: exynos5433: Use tabs for indentation Waqar Hameed
2026-09-28 22:38 ` [PATCH 03/16] arm64: dts: exynos7: Remove empty line at end of node Waqar Hameed
2026-09-28 22:38 ` [PATCH 04/16] arm64: dts: exynos7: Align comments with minimal whitespace Waqar Hameed
2026-09-28 22:38 ` [PATCH 05/16] arm64: dts: exynos7885: Fix format of line comment Waqar Hameed
2026-09-28 22:38 ` [PATCH 06/16] arm64: dts: exynos7885: Align end of node definition brace Waqar Hameed
2026-09-28 22:38 ` [PATCH 07/16] arm64: dts: exynos850: " Waqar Hameed
2026-09-28 22:38 ` [PATCH 08/16] arm64: dts: exynos850: Use tabs for indentation Waqar Hameed
2026-09-28 22:38 ` [PATCH 09/16] arm64: dts: exynos8850: Add missing space in compatible Waqar Hameed
2026-09-29  5:49   ` (subset) " Krzysztof Kozlowski
2026-09-28 22:38 ` [PATCH 10/16] arm64: dts: exynos8855: Remove empty line at end of node Waqar Hameed
2026-09-28 22:38 ` [PATCH 11/16] arm64: dts: exynos8855: Use tabs for indentation Waqar Hameed
2026-09-28 22:38 ` [PATCH 12/16] arm64: dts: exynosautov920: Add space before line comments Waqar Hameed
2026-09-28 22:38 ` [PATCH 13/16] arm64: dts: exynosautov920: Add missing space in compatible Waqar Hameed
2026-09-29  5:49   ` (subset) " Krzysztof Kozlowski
2026-09-28 22:38 ` [PATCH 14/16] arm64: dts: exynosautov920: Remove empty line at end of node Waqar Hameed
2026-09-28 22:38 ` [PATCH 15/16] arm64: dts: exynos: gs101: Use tabs for indentation Waqar Hameed
2026-09-28 22:38 ` [PATCH 16/16] arm64: dts: exynos: gs101: Add space before line comments Waqar Hameed
2026-09-29  5:43 ` [PATCH 00/16] arm64: dts: exynos: Format with dtfmt Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®