Re: [PATCH] docs: dt-bindings: add DTS Coding Style document

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
>> Cc: Arnd Bergmann <arnd@xxxxxxxx>
>> Cc: Bjorn Andersson <andersson@xxxxxxxxxx>
>> Cc: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
>> Cc: Heiko Stuebner <heiko@xxxxxxxxx>
>> Cc: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>
>> Cc: Matthias Brugger <matthias.bgg@xxxxxxxxx>
>> Cc: Michal Simek <michal.simek@xxxxxxx>
>> Cc: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
>> Cc: Nishanth Menon <nm@xxxxxx>
>> Cc: Olof Johansson <olof@xxxxxxxxx>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
>>
>> ---
> [...]
> 
>> +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





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux