Messages in this thread | | | Date | Mon, 20 Nov 2023 08:15:19 +0100 | Subject | Re: [PATCH] docs: dt-bindings: add DTS Coding Style document | From | Krzysztof Kozlowski <> |
| |
On 18/11/2023 00:53, Konrad Dybcio wrote: > On 16.11.2023 19:12, Krzysztof Kozlowski wrote: >> Document preferred coding style for Devicetree sources (DTS and DTSI), >> to bring consistency among all (sub)architectures and ease in reviews. >> >> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> >> Cc: Arnd Bergmann <arnd@arndb.de> >> Cc: Bjorn Andersson <andersson@kernel.org> >> Cc: Geert Uytterhoeven <geert+renesas@glider.be> >> Cc: Heiko Stuebner <heiko@sntech.de> >> Cc: Konrad Dybcio <konrad.dybcio@linaro.org> >> Cc: Matthias Brugger <matthias.bgg@gmail.com> >> Cc: Michal Simek <michal.simek@amd.com> >> Cc: Neil Armstrong <neil.armstrong@linaro.org> >> Cc: Nishanth Menon <nm@ti.com> >> Cc: Olof Johansson <olof@lixom.net> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> >> >> --- > [...] > >> +Order of Nodes >> +-------------- >> + >> +1. Nodes within any bus, thus using unit addresses for children, shall be >> + ordered incrementally by unit address. >> + >> +2. Nodes without unit addresses should be ordered alpha-numerically. > I largely agree with all this given our fight for some level of > tidyness across linux-msm, but there's one specific case where I think > it would make sense to break this ordering, and that's GPIO states: > > > &pinctrl { > xyz-active-state { > pins ="gpio0"; > ... > }; > > abc-active-state { > pins ="gpio1"; > ... > }; > > qwe-active-state { > pins ="gpio2"; > ... > }; > }; > > looks so much more readable to me than
True. I'll mention exception for this and Renesas.
Best regards, Krzysztof
| |