Linux-Amlogic Archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Rob Herring <robh+dt@kernel.org>
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, "Andrew Davis" <afd@ti.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	"Michal Simek" <michal.simek@amd.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Nishanth Menon" <nm@ti.com>, "Olof Johansson" <olof@lixom.net>,
	linux-rockchip@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,
	linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v2] docs: dt-bindings: add DTS Coding Style document
Date: Sat, 25 Nov 2023 19:44:42 +0100	[thread overview]
Message-ID: <89b2f3ae-52df-4304-9e51-5af73d52ea4c@linaro.org> (raw)
In-Reply-To: <CAL_JsqL_caP2Adh5ntrHb24sXOY9x=TxvCSnnSCq--rm3B0FoA@mail.gmail.com>

On 22/11/2023 15:55, Rob Herring wrote:
> On Wed, Nov 22, 2023 at 1:05 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 21/11/2023 14:50, Rafał Miłecki wrote:
>>>> +Order of Nodes
>>>> +--------------
>>>> +
>>>> +1. Nodes within any bus, thus using unit addresses for children, shall be
>>>> +   ordered incrementally by unit address.
>>>> +   Alternatively for some sub-architectures, nodes of the same type can be
>>>> +   grouped together (e.g. all I2C controllers one after another even if this
>>>> +   breaks unit address ordering).
>>>> +
>>>> +2. Nodes without unit addresses should be ordered alpha-numerically by the node
>>>> +   name.  For a few types of nodes, they can be ordered by the main property
>>>> +   (e.g. pin configuration states ordered by value of "pins" property).
>>>> +
>>>> +3. When extending nodes in the board DTS via &label, the entries should be
>>>> +   ordered alpha-numerically.
>>>
>>> Just an idea. Would that make (more) sense to make &label-like entries
>>> match order of nodes in included .dts(i)?
>>>
>>> Adventages:
>>> 1. We keep unit address incremental order that is unlikely to change
>>>
>>> Disadventages:
>>> 1. More difficult to verify
>>
>> Rob also proposed this and I believe above disadvantage here is crucial.
>> If you add new SoC with board DTS you are fine. But if you add only new
>> board, the order of entries look random in the diff hunk. Reviewer must
>> open SoC DTSI to be able to review the patch with board DTS.
>>
>> If review is tricky and we do not have tool to perform it automatically,
>> I am sure submissions will have disordered board DTS.
> 
> I'm certainly in favor of only (or mostly?) specifying things we can
> check with tools. I don't need more to check manually...
> 
> It wouldn't be too hard to get path from labels. dtc generates that
> with -@ already. So I don't buy "we don't have a tool" if a tool to
> check seems feasible.

OK, then tool is not an argument. In Qualcomm and Samsung we already use
alphabetical order in board DTS, so keeping that existing style could be
an argument. I don't have strong preference, except the need to
re-shuffle all DTS files which would be a quite disastrous for future
stable-backports. I can mention both styles.

Best regards,
Krzysztof


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

      reply	other threads:[~2023-11-25 18:45 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20  8:40 [PATCH v2] docs: dt-bindings: add DTS Coding Style document Krzysztof Kozlowski
2023-11-20  9:04 ` Neil Armstrong
2023-11-20  9:38 ` Heiko Stübner
2023-11-20 11:43 ` AngeloGioacchino Del Regno
2023-11-20 14:57   ` Krzysztof Kozlowski
2023-11-21 10:25     ` AngeloGioacchino Del Regno
2023-11-20 14:01 ` Michal Simek
2023-11-20 14:53   ` Krzysztof Kozlowski
2023-11-20 19:18     ` Geert Uytterhoeven
2023-11-20 19:31       ` Krzysztof Kozlowski
2023-11-21  7:33         ` Michal Simek
2023-11-21  7:47           ` Krzysztof Kozlowski
2023-11-21  8:08             ` Geert Uytterhoeven
2023-11-21  8:37               ` Krzysztof Kozlowski
2023-11-21 10:13               ` Dmitry Baryshkov
2023-11-21 10:28                 ` Krzysztof Kozlowski
2023-11-21 11:53                   ` Michal Simek
2023-11-21 11:55     ` Michal Simek
2023-11-21 12:36       ` Krzysztof Kozlowski
2023-11-21 16:04         ` Geert Uytterhoeven
2023-11-22  8:01           ` Krzysztof Kozlowski
2023-11-22  8:15             ` Dragan Simic
2023-11-20 20:15 ` Andrew Lunn
2023-11-21  7:36   ` Michal Simek
2023-11-21  7:47   ` Krzysztof Kozlowski
2023-11-22  8:18     ` Krzysztof Kozlowski
2023-11-21 13:50 ` Rafał Miłecki
2023-11-22  8:05   ` Krzysztof Kozlowski
2023-11-22  8:09     ` Chen-Yu Tsai
2023-11-22  8:21       ` Krzysztof Kozlowski
2023-11-22  8:28         ` Geert Uytterhoeven
2023-11-22  8:29         ` Dragan Simic
2023-11-22  8:49           ` Michal Simek
2023-11-22  8:53             ` Geert Uytterhoeven
2023-11-22  8:57               ` Michal Simek
2023-11-22  9:09                 ` Krzysztof Kozlowski
2023-11-22 14:34                 ` Rob Herring
2023-11-22 14:42                   ` Dragan Simic
2023-11-22  8:59             ` Dragan Simic
2023-11-22 14:55     ` Rob Herring
2023-11-25 18:44       ` Krzysztof Kozlowski [this message]

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=89b2f3ae-52df-4304-9e51-5af73d52ea4c@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=afd@ti.com \
    --cc=andersson@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arnd@arndb.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=heiko@sntech.de \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=michal.simek@amd.com \
    --cc=neil.armstrong@linaro.org \
    --cc=nm@ti.com \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=zajec5@gmail.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).