mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waqar Hameed <waqar.hameed@axis.com>
To: "Peter Griffin" <peter.griffin@linaro.org>,
	"André Draszik" <andre.draszik@linaro.org>,
	"Tudor Ambarus" <tudor.ambarus@linaro.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Alim Akhtar" <alim.akhtar@samsung.com>,
	"Sam Protsenko" <semen.protsenko@linaro.org>,
	"Ivaylo Ivanov" <ivo.ivanov.ivanov1@gmail.com>,
	"Konrad Dybcio" <konradybcio@kernel.org>
Cc: <kernel@axis.com>, <linux-arm-kernel@lists.infradead.org>,
	<linux-samsung-soc@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH 00/16] arm64: dts: exynos: Format with dtfmt
Date: Tue, 29 Sep 2026 00:38:11 +0200	[thread overview]
Message-ID: <cover.1790629313.git.waqar.hameed@axis.com> (raw)

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


             reply	other threads:[~2026-09-28 22:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 22:38 Waqar Hameed [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1790629313.git.waqar.hameed@axis.com \
    --to=waqar.hameed@axis.com \
    --cc=alim.akhtar@samsung.com \
    --cc=andre.draszik@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ivo.ivanov.ivanov1@gmail.com \
    --cc=kernel@axis.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=peter.griffin@linaro.org \
    --cc=robh@kernel.org \
    --cc=semen.protsenko@linaro.org \
    --cc=tudor.ambarus@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®