Re: [PATCH 00/38] arm: dts: qcom: Format with dtfmt

From: Waqar Hameed

Date: Fri Oct 16 2026 - 10:26:07 EST


On Mon, Oct 12, 2026 at 17:28 +0200 Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx> wrote:

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

Thank you very much Konrad! I hope we can have some fruitful discussions
around this!

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

Haha that was fun! I will indeed send some examples to Samuel Holland
and AngeloGioacchino Del Regno (added to CC) soon, as previously
promised :)