[PATCH] arm64: dts: imx8mn: specify #sound-dai-cells for SAI nodes

Marek Vasut marex at denx.de
Tue Feb 28 12:13:28 PST 2023


On 2/28/23 09:10, Krzysztof Kozlowski wrote:
> On 27/02/2023 21:00, Marco Felsch wrote:
>>>>> +					#sound-dai-cells = <0>;
>>>>
>>>> Please don't add it in front of the compatible and the reg property.
>>>
>>> The #address-cells and #size-cells are also always on top, why should the
>>> #sound-dai-cells be any different ? Where should they be ?
>>
>> As of now my understanding of specifying a devicetree node was:
>>
>> node-name at reg-nr {
>> 	compatible = "";
>> 	reg = <>;
>> 	// all pending properties below
>> 	...
>> };
>>
>> @Rob, @Krzysztof:
>> Is this a (unwritten) rule/policy?
>>
> 
> Each platform has its own coding style around this but I am not aware of
> a coding style which puts address and size cells at the top.

DTspec 0.3 and 0.4-rc agrees with the below.

Linux seems to be full of counter-examples though:
$ git grep -A 1 ' {$' arch/*/boot/dts/ | grep -B 1 cells

> To me it is
> really odd placement. First property is always "compatible", as the most
> important. Then for most platforms second is "reg", as the one easiest
> to compare with unit address. Some platforms put status as last property.

All right, so:

- compatible
- reg
- #whatever-cells
- properties
- status

Does that order look right ?

[...]



More information about the linux-arm-kernel mailing list