ARM: dts: at91: Avoid colliding 'display' node and property names
Subsystems (2)
Rob Herring
maintainerPATCH 1/1 ARM: dts: at91: Avoid colliding 'display' node and property names
While properties and child nodes with the same name are valid DT, the practice is not encouraged. Furthermore, the collision is problematic for YAML encoded DT. Let's just avoid the issue and rename the nodes.
--- arch/arm/boot/dts/at91sam9261ek.dts | 2 +- arch/arm/boot/dts/at91sam9263ek.dts | 2 +- arch/arm/boot/dts/at91sam9m10g45ek.dts | 2 +- arch/arm/boot/dts/at91sam9rlek.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/at91sam9261ek.dts +1 -1
@@ -49,7 +49,7 @@ atmel,power-control-gpio = <&pioA 12 GPIO_ACTIVE_LOW>; status = "okay"; - display0: display { + display0: panel { bits-per-pixel = <16>; atmel,lcdcon-backlight; atmel,dmacon = <0x1>;
arch/arm/boot/dts/at91sam9263ek.dts +1 -1
@@ -111,7 +111,7 @@ display = <&display0>; status = "okay"; - display0: display { + display0: panel { bits-per-pixel = <16>; atmel,lcdcon-backlight; atmel,dmacon = <0x1>;
arch/arm/boot/dts/at91sam9m10g45ek.dts +1 -1
@@ -236,7 +236,7 @@ display = <&display0>; status = "okay"; - display0: display { + display0: panel { bits-per-pixel = <32>; atmel,lcdcon-backlight; atmel,dmacon = <0x1>;
arch/arm/boot/dts/at91sam9rlek.dts +1 -1
@@ -37,7 +37,7 @@ display = <&display0>; status = "okay"; - display0: display { + display0: panel { bits-per-pixel = <16>; atmel,lcdcon-backlight; atmel,dmacon = <0x1>;
Signature · 1 line
2.20.1
Quoted 5 lines · Rob Herring
While properties and child nodes with the same name are valid DT, the practice is not encouraged. Furthermore, the collision is problematic for YAML encoded DT. Let's just avoid the issue and rename the nodes.
Cc Nicolas Ferre <[email protected]>
Good for me:
Quoted 64 lines
Cc Alexandre Belloni <[email protected]>Cc Ludovic Desroches <[email protected]>Signed-off-by Rob Herring <[email protected]>--- arch/arm/boot/dts/at91sam9261ek.dts | 2 +- arch/arm/boot/dts/at91sam9263ek.dts | 2 +- arch/arm/boot/dts/at91sam9m10g45ek.dts | 2 +- arch/arm/boot/dts/at91sam9rlek.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)arch/arm/boot/dts/at91sam9261ek.dts +1
-1@@ -49,7 +49,7 @@ atmel,power-control-gpio = <&pioA 12 GPIO_ACTIVE_LOW>; status = "okay"; - display0: display { + display0: panel { bits-per-pixel = <16>; atmel,lcdcon-backlight; atmel,dmacon = <0x1>;arch/arm/boot/dts/at91sam9263ek.dts +1
-1@@ -111,7 +111,7 @@ display = <&display0>; status = "okay"; - display0: display { + display0: panel { bits-per-pixel = <16>; atmel,lcdcon-backlight; atmel,dmacon = <0x1>;arch/arm/boot/dts/at91sam9m10g45ek.dts +1
-1@@ -236,7 +236,7 @@ display = <&display0>; status = "okay"; - display0: display { + display0: panel { bits-per-pixel = <32>; atmel,lcdcon-backlight; atmel,dmacon = <0x1>;arch/arm/boot/dts/at91sam9rlek.dts +1
-1@@ -37,7 +37,7 @@ display = <&display0>; status = "okay"; - display0: display { + display0: panel { bits-per-pixel = <16>; atmel,lcdcon-backlight; atmel,dmacon = <0x1>;
Signature · 1 line
Nicolas Ferre
Quoted 2 lines · Rob Herring
While properties and child nodes with the same name are valid DT, the practice is not encouraged.
I don't see anything mentioning that in the devicetree specification. I think this is something you should add if you don't want that to happen again.
Quoted 3 lines
Furthermore, the collision is problematic for
YAML encoded DT. Let's just avoid the issue and rename the nodes.
Or maybe you should fix the tool ;)
Do you plan to enforce it at some point? How close are you?
Quoted 5 lines
Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Ludovic Desroches <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 62 lines
--- arch/arm/boot/dts/at91sam9261ek.dts | 2 +- arch/arm/boot/dts/at91sam9263ek.dts | 2 +- arch/arm/boot/dts/at91sam9m10g45ek.dts | 2 +- arch/arm/boot/dts/at91sam9rlek.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)arch/arm/boot/dts/at91sam9261ek.dts +1
-1@@ -49,7 +49,7 @@ atmel,power-control-gpio = <&pioA 12 GPIO_ACTIVE_LOW>; status = "okay"; - display0: display { + display0: panel { bits-per-pixel = <16>; atmel,lcdcon-backlight; atmel,dmacon = <0x1>;arch/arm/boot/dts/at91sam9263ek.dts +1
-1@@ -111,7 +111,7 @@ display = <&display0>; status = "okay"; - display0: display { + display0: panel { bits-per-pixel = <16>; atmel,lcdcon-backlight; atmel,dmacon = <0x1>;arch/arm/boot/dts/at91sam9m10g45ek.dts +1
-1@@ -236,7 +236,7 @@ display = <&display0>; status = "okay"; - display0: display { + display0: panel { bits-per-pixel = <32>; atmel,lcdcon-backlight; atmel,dmacon = <0x1>;arch/arm/boot/dts/at91sam9rlek.dts +1
-1@@ -37,7 +37,7 @@ display = <&display0>; status = "okay"; - display0: display { + display0: panel { bits-per-pixel = <16>; atmel,lcdcon-backlight; atmel,dmacon = <0x1>;Signature · 1 line
2.20.1
Signature · 3 lines
Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Rob Herring
maintainerQuoted 8 lines · Alexandre Belloni
Quoted 2 lines · Rob Herring
While properties and child nodes with the same name are valid DT, the practice is not encouraged.
I don't see anything mentioning that in the devicetree specification. I think this is something you should add if you don't want that to happen again.
I suppose, but I prefer tools to enforce it.
Quoted 6 lines
Quoted 4 lines
Furthermore, the collision is problematic for
YAML encoded DT. Let's just avoid the issue and rename the nodes.Or maybe you should fix the tool ;)
You mean the YAML and JSON specifications because the problem is it is not valid YAML? (I think YAML allowed it at one time, but it is deprecated) The only way to fix it in the tool would be to define some way to handle the collision like renaming properties and then undoing that.
Quoted 1 line
Do you plan to enforce it at some point? How close are you?
Soon as this patch is merged. There's a switch in parsing tools to disallow the collision, so it will be an error instead of a warning.
Quoted 7 lines
Quoted 5 lines
Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Ludovic Desroches <[email protected]>Signed-off-by Rob Herring <[email protected]>
Is someone going to apply this?
Rob
Alexandre Belloni
maintainerQuoted 37 lines · Rob Herring
Quoted 8 lines · Alexandre Belloni
Quoted 2 lines · Rob Herring
While properties and child nodes with the same name are valid DT, the practice is not encouraged.
I don't see anything mentioning that in the devicetree specification. I think this is something you should add if you don't want that to happen again.
I suppose, but I prefer tools to enforce it.
Quoted 6 lines
Quoted 4 lines
Furthermore, the collision is problematic for
YAML encoded DT. Let's just avoid the issue and rename the nodes.Or maybe you should fix the tool ;)
You mean the YAML and JSON specifications because the problem is it is not valid YAML? (I think YAML allowed it at one time, but it is deprecated) The only way to fix it in the tool would be to define some way to handle the collision like renaming properties and then undoing that.
Quoted 1 line
Do you plan to enforce it at some point? How close are you?
Soon as this patch is merged. There's a switch in parsing tools to disallow the collision, so it will be an error instead of a warning.
Quoted 6 lines
Quoted 5 lines
Cc Nicolas Ferre <[email protected]>Cc Alexandre Belloni <[email protected]>Cc Ludovic Desroches <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 4 lines
Quoted 1 line
Is someone going to apply this?
I'll apply it for the next cycle, sorry about that.
Signature · 3 lines
Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com