Re: [PATCH 00/38] arm: dts: qcom: Format with dtfmt
From: Konrad Dybcio
Date: Mon Oct 12 2026 - 11:36:56 EST
On 10/2/26 12:36 AM, Waqar Hameed wrote:
> 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, primarily to
> get Konrad Dybcio in the "To:"-field (who did the presentation on LPC
> 2025). Obviously one can run dtfmt for all files and generate a much
> bigger diff. There have been patches sent for
> `arch/arm64/boot/dts/exynos/` previously [4].
Incredible work, thank you once again!
For some fun trivia, this is the tool you might have heard of as we
walked around one of the LPC 2026 evening events and kept poking the
various soc maintainers!
Konrad