diff mbox series

arm64: dts: imx8mn-var-som: reorder reg properties after compatible strings

Message ID 20231107160122.1648093-1-hugo@hugovil.com (mailing list archive)
State New, archived
Headers show
Series arm64: dts: imx8mn-var-som: reorder reg properties after compatible strings | expand

Commit Message

Hugo Villeneuve Nov. 7, 2023, 4:01 p.m. UTC
From: Hugo Villeneuve <hvilleneuve@dimonoff.com>

Move reg nodes after the compatible string, to follow DT conventions.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
---
 arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: be3ca57cfb777ad820c6659d52e60bbdd36bf5ff

Comments

Krzysztof Kozlowski Nov. 7, 2023, 4:19 p.m. UTC | #1
On 07/11/2023 17:01, Hugo Villeneuve wrote:
> From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> 
> Move reg nodes after the compatible string, to follow DT conventions.

This is a bit of churn... like patches for checkpatch. But unlike
checkpatch, it's not even documented.

Best regards,
Krzysztof
Hugo Villeneuve Nov. 7, 2023, 4:28 p.m. UTC | #2
On Tue, 7 Nov 2023 17:19:20 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 07/11/2023 17:01, Hugo Villeneuve wrote:
> > From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > 
> > Move reg nodes after the compatible string, to follow DT conventions.
> 
> This is a bit of churn... like patches for checkpatch. But unlike
> checkpatch, it's not even documented.

Hi,
I do not really understand your point or if I must change
something...

But looking at a lot of dts, the reg property is always following the
compatible string, so I assumed it was an undocumented convention or
best practice...

Hugo.
Krzysztof Kozlowski Nov. 7, 2023, 4:37 p.m. UTC | #3
On 07/11/2023 17:28, Hugo Villeneuve wrote:
> On Tue, 7 Nov 2023 17:19:20 +0100
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> 
>> On 07/11/2023 17:01, Hugo Villeneuve wrote:
>>> From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
>>>
>>> Move reg nodes after the compatible string, to follow DT conventions.
>>
>> This is a bit of churn... like patches for checkpatch. But unlike
>> checkpatch, it's not even documented.
> 
> Hi,
> I do not really understand your point or if I must change
> something...
> 
> But looking at a lot of dts, the reg property is always following the
> compatible string, so I assumed it was an undocumented convention or
> best practice...
> 

Patches fixing only checkpatch --strict are usually welcomed only in
staging. But even there no one wants to deal with one patch changing one
style issue in one file.

You are doing the same, outside of staging, but relying on undocumented
practice. Such patches are unnecessary churn. Documenting the practice
and fixing entire subsystems or groups of devices would be welcomed.
Fixing line by line some style issue is just effort for maintainers.

Best regards,
Krzysztof
Hugo Villeneuve Nov. 7, 2023, 4:52 p.m. UTC | #4
On Tue, 7 Nov 2023 17:37:44 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 07/11/2023 17:28, Hugo Villeneuve wrote:
> > On Tue, 7 Nov 2023 17:19:20 +0100
> > Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> > 
> >> On 07/11/2023 17:01, Hugo Villeneuve wrote:
> >>> From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> >>>
> >>> Move reg nodes after the compatible string, to follow DT conventions.
> >>
> >> This is a bit of churn... like patches for checkpatch. But unlike
> >> checkpatch, it's not even documented.
> > 
> > Hi,
> > I do not really understand your point or if I must change
> > something...
> > 
> > But looking at a lot of dts, the reg property is always following the
> > compatible string, so I assumed it was an undocumented convention or
> > best practice...
> > 
> 
> Patches fixing only checkpatch --strict are usually welcomed only in
> staging. But even there no one wants to deal with one patch changing one
> style issue in one file.
> 
> You are doing the same, outside of staging, but relying on undocumented
> practice. Such patches are unnecessary churn. Documenting the practice
> and fixing entire subsystems or groups of devices would be welcomed.
> Fixing line by line some style issue is just effort for maintainers.

Hi,
ok, now it is more clear.

I tried to search in Documentation/ or the web for DT conventions/best
practices, but couldn't find anything relevant, apart from "use YAML
coding style"... Maybe it would be a good thing to add a document for
DT best practices eventually...

Thank you, Hugo.
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
index b8946edf317b..9124476500f8 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
@@ -60,8 +60,8 @@  &ecspi1 {
 
 	/* Resistive touch controller */
 	touchscreen@0 {
-		reg = <0>;
 		compatible = "ti,ads7846";
+		reg = <0>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_restouch>;
 		interrupt-parent = <&gpio1>;
@@ -292,8 +292,8 @@  &usdhc1 {
 	status = "okay";
 
 	brcmf: bcrmf@1 {
-		reg = <1>;
 		compatible = "brcm,bcm4329-fmac";
+		reg = <1>;
 	};
 };