All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: dts: sunxi: Fix GPIO LED node names
@ 2022-11-25 19:54 ` Samuel Holland
  0 siblings, 0 replies; 14+ messages in thread
From: Samuel Holland @ 2022-11-25 19:54 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jernej Skrabec
  Cc: Samuel Holland, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

These board devicetrees fail to validate because the gpio-leds schema
requires its child nodes to have "led" in the node name.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

 arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 2 +-
 arch/arm/boot/dts/sun5i-r8-chip.dts      | 2 +-
 arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
index a32cde3e32eb..3222f1490716 100644
--- a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
+++ b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
@@ -70,7 +70,7 @@ chosen {
 	leds {
 		compatible = "gpio-leds";
 
-		status {
+		led-status {
 			label = "chip-pro:white:status";
 			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts b/arch/arm/boot/dts/sun5i-r8-chip.dts
index 4bf4943d4eb7..303191c926c2 100644
--- a/arch/arm/boot/dts/sun5i-r8-chip.dts
+++ b/arch/arm/boot/dts/sun5i-r8-chip.dts
@@ -70,7 +70,7 @@ chosen {
 	leds {
 		compatible = "gpio-leds";
 
-		status {
+		led-status {
 			label = "chip:white:status";
 			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
index 0af48e143b66..b84822453381 100644
--- a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
+++ b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
@@ -67,7 +67,7 @@ hdmi_con_in: endpoint {
 	leds {
 		compatible = "gpio-leds";
 
-		status {
+		led-status {
 			label = "sina31s:status:usr";
 			gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
 		};
-- 
2.37.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 1/2] ARM: dts: sunxi: Fix GPIO LED node names
@ 2022-11-25 19:54 ` Samuel Holland
  0 siblings, 0 replies; 14+ messages in thread
From: Samuel Holland @ 2022-11-25 19:54 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jernej Skrabec
  Cc: Samuel Holland, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

These board devicetrees fail to validate because the gpio-leds schema
requires its child nodes to have "led" in the node name.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

 arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 2 +-
 arch/arm/boot/dts/sun5i-r8-chip.dts      | 2 +-
 arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
index a32cde3e32eb..3222f1490716 100644
--- a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
+++ b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
@@ -70,7 +70,7 @@ chosen {
 	leds {
 		compatible = "gpio-leds";
 
-		status {
+		led-status {
 			label = "chip-pro:white:status";
 			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts b/arch/arm/boot/dts/sun5i-r8-chip.dts
index 4bf4943d4eb7..303191c926c2 100644
--- a/arch/arm/boot/dts/sun5i-r8-chip.dts
+++ b/arch/arm/boot/dts/sun5i-r8-chip.dts
@@ -70,7 +70,7 @@ chosen {
 	leds {
 		compatible = "gpio-leds";
 
-		status {
+		led-status {
 			label = "chip:white:status";
 			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
index 0af48e143b66..b84822453381 100644
--- a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
+++ b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
@@ -67,7 +67,7 @@ hdmi_con_in: endpoint {
 	leds {
 		compatible = "gpio-leds";
 
-		status {
+		led-status {
 			label = "sina31s:status:usr";
 			gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
 		};
-- 
2.37.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/2] ARM: dts: sun8i: nanopi-duo2: Fix regulator GPIO reference
  2022-11-25 19:54 ` Samuel Holland
@ 2022-11-25 19:54   ` Samuel Holland
  -1 siblings, 0 replies; 14+ messages in thread
From: Samuel Holland @ 2022-11-25 19:54 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jernej Skrabec
  Cc: Samuel Holland, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi, Karl Palsson,
	Maxime Ripard

The property named in the schema is 'enable-gpios', not 'enable-gpio'.
This makes no difference at runtime, because the regulator is marked as
always-on, but it breaks validation.

Fixes: 4701fc6e5dd9 ("ARM: dts: sun8i: add FriendlyARM NanoPi Duo2")
Signed-off-by: Samuel Holland <samuel@sholland.org>
---

 arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts
index 43641cb82398..343b02b97155 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts
@@ -57,7 +57,7 @@ reg_vdd_cpux: vdd-cpux-regulator {
 		regulator-ramp-delay = <50>; /* 4ms */
 
 		enable-active-high;
-		enable-gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
+		enable-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
 		gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
 		gpios-states = <0x1>;
 		states = <1100000 0>, <1300000 1>;
-- 
2.37.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/2] ARM: dts: sun8i: nanopi-duo2: Fix regulator GPIO reference
@ 2022-11-25 19:54   ` Samuel Holland
  0 siblings, 0 replies; 14+ messages in thread
From: Samuel Holland @ 2022-11-25 19:54 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jernej Skrabec
  Cc: Samuel Holland, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi, Karl Palsson,
	Maxime Ripard

The property named in the schema is 'enable-gpios', not 'enable-gpio'.
This makes no difference at runtime, because the regulator is marked as
always-on, but it breaks validation.

Fixes: 4701fc6e5dd9 ("ARM: dts: sun8i: add FriendlyARM NanoPi Duo2")
Signed-off-by: Samuel Holland <samuel@sholland.org>
---

 arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts
index 43641cb82398..343b02b97155 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts
@@ -57,7 +57,7 @@ reg_vdd_cpux: vdd-cpux-regulator {
 		regulator-ramp-delay = <50>; /* 4ms */
 
 		enable-active-high;
-		enable-gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
+		enable-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
 		gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
 		gpios-states = <0x1>;
 		states = <1100000 0>, <1300000 1>;
-- 
2.37.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] ARM: dts: sunxi: Fix GPIO LED node names
  2022-11-25 19:54 ` Samuel Holland
@ 2022-11-25 21:40   ` Andre Przywara
  -1 siblings, 0 replies; 14+ messages in thread
From: Andre Przywara @ 2022-11-25 21:40 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Chen-Yu Tsai, Jernej Skrabec, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-sunxi

On Fri, 25 Nov 2022 13:54:00 -0600
Samuel Holland <samuel@sholland.org> wrote:

Hi Samuel,

> These board devicetrees fail to validate because the gpio-leds schema
> requires its child nodes to have "led" in the node name.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>

That looks alright, though the comment in the binding says that we
should just have led-0, led-1 instead, so just (hex) numbers. The
"status" name is also in the label, so we wouldn't lose information.

Actually, also "label" is deprecated, in favour of "color" and
"function", shall this be fixed on the way? Or is there anything that
breaks (older kernels) when removing the label property? 

Cheers,
Andre

> ---
> 
>  arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 2 +-
>  arch/arm/boot/dts/sun5i-r8-chip.dts      | 2 +-
>  arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
> index a32cde3e32eb..3222f1490716 100644
> --- a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
> +++ b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
> @@ -70,7 +70,7 @@ chosen {
>  	leds {
>  		compatible = "gpio-leds";
>  
> -		status {
> +		led-status {
>  			label = "chip-pro:white:status";
>  			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
>  			default-state = "on";
> diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts b/arch/arm/boot/dts/sun5i-r8-chip.dts
> index 4bf4943d4eb7..303191c926c2 100644
> --- a/arch/arm/boot/dts/sun5i-r8-chip.dts
> +++ b/arch/arm/boot/dts/sun5i-r8-chip.dts
> @@ -70,7 +70,7 @@ chosen {
>  	leds {
>  		compatible = "gpio-leds";
>  
> -		status {
> +		led-status {
>  			label = "chip:white:status";
>  			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
>  			default-state = "on";
> diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
> index 0af48e143b66..b84822453381 100644
> --- a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
> +++ b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
> @@ -67,7 +67,7 @@ hdmi_con_in: endpoint {
>  	leds {
>  		compatible = "gpio-leds";
>  
> -		status {
> +		led-status {
>  			label = "sina31s:status:usr";
>  			gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
>  		};


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] ARM: dts: sunxi: Fix GPIO LED node names
@ 2022-11-25 21:40   ` Andre Przywara
  0 siblings, 0 replies; 14+ messages in thread
From: Andre Przywara @ 2022-11-25 21:40 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Chen-Yu Tsai, Jernej Skrabec, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-sunxi

On Fri, 25 Nov 2022 13:54:00 -0600
Samuel Holland <samuel@sholland.org> wrote:

Hi Samuel,

> These board devicetrees fail to validate because the gpio-leds schema
> requires its child nodes to have "led" in the node name.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>

That looks alright, though the comment in the binding says that we
should just have led-0, led-1 instead, so just (hex) numbers. The
"status" name is also in the label, so we wouldn't lose information.

Actually, also "label" is deprecated, in favour of "color" and
"function", shall this be fixed on the way? Or is there anything that
breaks (older kernels) when removing the label property? 

Cheers,
Andre

> ---
> 
>  arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 2 +-
>  arch/arm/boot/dts/sun5i-r8-chip.dts      | 2 +-
>  arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
> index a32cde3e32eb..3222f1490716 100644
> --- a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
> +++ b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
> @@ -70,7 +70,7 @@ chosen {
>  	leds {
>  		compatible = "gpio-leds";
>  
> -		status {
> +		led-status {
>  			label = "chip-pro:white:status";
>  			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
>  			default-state = "on";
> diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts b/arch/arm/boot/dts/sun5i-r8-chip.dts
> index 4bf4943d4eb7..303191c926c2 100644
> --- a/arch/arm/boot/dts/sun5i-r8-chip.dts
> +++ b/arch/arm/boot/dts/sun5i-r8-chip.dts
> @@ -70,7 +70,7 @@ chosen {
>  	leds {
>  		compatible = "gpio-leds";
>  
> -		status {
> +		led-status {
>  			label = "chip:white:status";
>  			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
>  			default-state = "on";
> diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
> index 0af48e143b66..b84822453381 100644
> --- a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
> +++ b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
> @@ -67,7 +67,7 @@ hdmi_con_in: endpoint {
>  	leds {
>  		compatible = "gpio-leds";
>  
> -		status {
> +		led-status {
>  			label = "sina31s:status:usr";
>  			gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
>  		};


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] ARM: dts: sun8i: nanopi-duo2: Fix regulator GPIO reference
  2022-11-25 19:54   ` Samuel Holland
@ 2022-11-25 21:42     ` Andre Przywara
  -1 siblings, 0 replies; 14+ messages in thread
From: Andre Przywara @ 2022-11-25 21:42 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Chen-Yu Tsai, Jernej Skrabec, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-sunxi,
	Karl Palsson, Maxime Ripard

On Fri, 25 Nov 2022 13:54:01 -0600
Samuel Holland <samuel@sholland.org> wrote:

> The property named in the schema is 'enable-gpios', not 'enable-gpio'.
> This makes no difference at runtime, because the regulator is marked as
> always-on, but it breaks validation.
> 
> Fixes: 4701fc6e5dd9 ("ARM: dts: sun8i: add FriendlyARM NanoPi Duo2")
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
> 
>  arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts
> index 43641cb82398..343b02b97155 100644
> --- a/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts
> +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts
> @@ -57,7 +57,7 @@ reg_vdd_cpux: vdd-cpux-regulator {
>  		regulator-ramp-delay = <50>; /* 4ms */
>  
>  		enable-active-high;
> -		enable-gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
> +		enable-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
>  		gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
>  		gpios-states = <0x1>;
>  		states = <1100000 0>, <1300000 1>;


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] ARM: dts: sun8i: nanopi-duo2: Fix regulator GPIO reference
@ 2022-11-25 21:42     ` Andre Przywara
  0 siblings, 0 replies; 14+ messages in thread
From: Andre Przywara @ 2022-11-25 21:42 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Chen-Yu Tsai, Jernej Skrabec, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-sunxi,
	Karl Palsson, Maxime Ripard

On Fri, 25 Nov 2022 13:54:01 -0600
Samuel Holland <samuel@sholland.org> wrote:

> The property named in the schema is 'enable-gpios', not 'enable-gpio'.
> This makes no difference at runtime, because the regulator is marked as
> always-on, but it breaks validation.
> 
> Fixes: 4701fc6e5dd9 ("ARM: dts: sun8i: add FriendlyARM NanoPi Duo2")
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
> 
>  arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts
> index 43641cb82398..343b02b97155 100644
> --- a/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts
> +++ b/arch/arm/boot/dts/sun8i-h3-nanopi-duo2.dts
> @@ -57,7 +57,7 @@ reg_vdd_cpux: vdd-cpux-regulator {
>  		regulator-ramp-delay = <50>; /* 4ms */
>  
>  		enable-active-high;
> -		enable-gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
> +		enable-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
>  		gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
>  		gpios-states = <0x1>;
>  		states = <1100000 0>, <1300000 1>;


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] ARM: dts: sunxi: Fix GPIO LED node names
  2022-11-25 21:40   ` Andre Przywara
@ 2022-11-25 21:50     ` Samuel Holland
  -1 siblings, 0 replies; 14+ messages in thread
From: Samuel Holland @ 2022-11-25 21:50 UTC (permalink / raw)
  To: Andre Przywara
  Cc: Chen-Yu Tsai, Jernej Skrabec, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-sunxi

Hi Andre,

On 11/25/22 15:40, Andre Przywara wrote:
> On Fri, 25 Nov 2022 13:54:00 -0600
> Samuel Holland <samuel@sholland.org> wrote:
> 
> Hi Samuel,
> 
>> These board devicetrees fail to validate because the gpio-leds schema
>> requires its child nodes to have "led" in the node name.
>>
>> Signed-off-by: Samuel Holland <samuel@sholland.org>
> 
> That looks alright, though the comment in the binding says that we
> should just have led-0, led-1 instead, so just (hex) numbers. The
> "status" name is also in the label, so we wouldn't lose information.

I am not a fan of giving the LEDs meaningless enumerators, but I can do
that if the maintainers insist.

> Actually, also "label" is deprecated, in favour of "color" and
> "function", shall this be fixed on the way? Or is there anything that
> breaks (older kernels) when removing the label property? 

The label is exposed to userspace as the path in sysfs, so we cannot
change it. There is no way to construct that exact label using function
and color -- see led_compose_name().

Regards,
Samuel

>> ---
>>
>>  arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 2 +-
>>  arch/arm/boot/dts/sun5i-r8-chip.dts      | 2 +-
>>  arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 2 +-
>>  3 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
>> index a32cde3e32eb..3222f1490716 100644
>> --- a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
>> +++ b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
>> @@ -70,7 +70,7 @@ chosen {
>>  	leds {
>>  		compatible = "gpio-leds";
>>  
>> -		status {
>> +		led-status {
>>  			label = "chip-pro:white:status";
>>  			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
>>  			default-state = "on";
>> diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts b/arch/arm/boot/dts/sun5i-r8-chip.dts
>> index 4bf4943d4eb7..303191c926c2 100644
>> --- a/arch/arm/boot/dts/sun5i-r8-chip.dts
>> +++ b/arch/arm/boot/dts/sun5i-r8-chip.dts
>> @@ -70,7 +70,7 @@ chosen {
>>  	leds {
>>  		compatible = "gpio-leds";
>>  
>> -		status {
>> +		led-status {
>>  			label = "chip:white:status";
>>  			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
>>  			default-state = "on";
>> diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
>> index 0af48e143b66..b84822453381 100644
>> --- a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
>> +++ b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
>> @@ -67,7 +67,7 @@ hdmi_con_in: endpoint {
>>  	leds {
>>  		compatible = "gpio-leds";
>>  
>> -		status {
>> +		led-status {
>>  			label = "sina31s:status:usr";
>>  			gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
>>  		};
> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] ARM: dts: sunxi: Fix GPIO LED node names
@ 2022-11-25 21:50     ` Samuel Holland
  0 siblings, 0 replies; 14+ messages in thread
From: Samuel Holland @ 2022-11-25 21:50 UTC (permalink / raw)
  To: Andre Przywara
  Cc: Chen-Yu Tsai, Jernej Skrabec, Krzysztof Kozlowski, Rob Herring,
	devicetree, linux-arm-kernel, linux-kernel, linux-sunxi

Hi Andre,

On 11/25/22 15:40, Andre Przywara wrote:
> On Fri, 25 Nov 2022 13:54:00 -0600
> Samuel Holland <samuel@sholland.org> wrote:
> 
> Hi Samuel,
> 
>> These board devicetrees fail to validate because the gpio-leds schema
>> requires its child nodes to have "led" in the node name.
>>
>> Signed-off-by: Samuel Holland <samuel@sholland.org>
> 
> That looks alright, though the comment in the binding says that we
> should just have led-0, led-1 instead, so just (hex) numbers. The
> "status" name is also in the label, so we wouldn't lose information.

I am not a fan of giving the LEDs meaningless enumerators, but I can do
that if the maintainers insist.

> Actually, also "label" is deprecated, in favour of "color" and
> "function", shall this be fixed on the way? Or is there anything that
> breaks (older kernels) when removing the label property? 

The label is exposed to userspace as the path in sysfs, so we cannot
change it. There is no way to construct that exact label using function
and color -- see led_compose_name().

Regards,
Samuel

>> ---
>>
>>  arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 2 +-
>>  arch/arm/boot/dts/sun5i-r8-chip.dts      | 2 +-
>>  arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 2 +-
>>  3 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
>> index a32cde3e32eb..3222f1490716 100644
>> --- a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
>> +++ b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
>> @@ -70,7 +70,7 @@ chosen {
>>  	leds {
>>  		compatible = "gpio-leds";
>>  
>> -		status {
>> +		led-status {
>>  			label = "chip-pro:white:status";
>>  			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
>>  			default-state = "on";
>> diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts b/arch/arm/boot/dts/sun5i-r8-chip.dts
>> index 4bf4943d4eb7..303191c926c2 100644
>> --- a/arch/arm/boot/dts/sun5i-r8-chip.dts
>> +++ b/arch/arm/boot/dts/sun5i-r8-chip.dts
>> @@ -70,7 +70,7 @@ chosen {
>>  	leds {
>>  		compatible = "gpio-leds";
>>  
>> -		status {
>> +		led-status {
>>  			label = "chip:white:status";
>>  			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
>>  			default-state = "on";
>> diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
>> index 0af48e143b66..b84822453381 100644
>> --- a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
>> +++ b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
>> @@ -67,7 +67,7 @@ hdmi_con_in: endpoint {
>>  	leds {
>>  		compatible = "gpio-leds";
>>  
>> -		status {
>> +		led-status {
>>  			label = "sina31s:status:usr";
>>  			gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
>>  		};
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] ARM: dts: sun8i: nanopi-duo2: Fix regulator GPIO reference
  2022-11-25 19:54   ` Samuel Holland
@ 2022-12-05 21:03     ` Jernej Škrabec
  -1 siblings, 0 replies; 14+ messages in thread
From: Jernej Škrabec @ 2022-12-05 21:03 UTC (permalink / raw)
  To: Chen-Yu Tsai, Samuel Holland
  Cc: Samuel Holland, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi, Karl Palsson,
	Maxime Ripard

Dne petek, 25. november 2022 ob 20:54:01 CET je Samuel Holland napisal(a):
> The property named in the schema is 'enable-gpios', not 'enable-gpio'.
> This makes no difference at runtime, because the regulator is marked as
> always-on, but it breaks validation.
> 
> Fixes: 4701fc6e5dd9 ("ARM: dts: sun8i: add FriendlyARM NanoPi Duo2")
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] ARM: dts: sun8i: nanopi-duo2: Fix regulator GPIO reference
@ 2022-12-05 21:03     ` Jernej Škrabec
  0 siblings, 0 replies; 14+ messages in thread
From: Jernej Škrabec @ 2022-12-05 21:03 UTC (permalink / raw)
  To: Chen-Yu Tsai, Samuel Holland
  Cc: Samuel Holland, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi, Karl Palsson,
	Maxime Ripard

Dne petek, 25. november 2022 ob 20:54:01 CET je Samuel Holland napisal(a):
> The property named in the schema is 'enable-gpios', not 'enable-gpio'.
> This makes no difference at runtime, because the regulator is marked as
> always-on, but it breaks validation.
> 
> Fixes: 4701fc6e5dd9 ("ARM: dts: sun8i: add FriendlyARM NanoPi Duo2")
> Signed-off-by: Samuel Holland <samuel@sholland.org>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: [PATCH 1/2] ARM: dts: sunxi: Fix GPIO LED node names
  2022-11-25 21:50     ` Samuel Holland
@ 2022-12-05 21:07       ` Jernej Škrabec
  -1 siblings, 0 replies; 14+ messages in thread
From: Jernej Škrabec @ 2022-12-05 21:07 UTC (permalink / raw)
  To: Andre Przywara, Samuel Holland
  Cc: Chen-Yu Tsai, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

Hi Samuel,

Dne petek, 25. november 2022 ob 22:50:07 CET je Samuel Holland napisal(a):
> Hi Andre,
> 
> On 11/25/22 15:40, Andre Przywara wrote:
> > On Fri, 25 Nov 2022 13:54:00 -0600
> > Samuel Holland <samuel@sholland.org> wrote:
> > 
> > Hi Samuel,
> > 
> >> These board devicetrees fail to validate because the gpio-leds schema
> >> requires its child nodes to have "led" in the node name.
> >> 
> >> Signed-off-by: Samuel Holland <samuel@sholland.org>
> > 
> > That looks alright, though the comment in the binding says that we
> > should just have led-0, led-1 instead, so just (hex) numbers. The
> > "status" name is also in the label, so we wouldn't lose information.
> 
> I am not a fan of giving the LEDs meaningless enumerators, but I can do
> that if the maintainers insist.

I'm not a fan of that either, but binding really wants enumerator. So let's 
conform to that.

Best regards,
Jernej

> 
> > Actually, also "label" is deprecated, in favour of "color" and
> > "function", shall this be fixed on the way? Or is there anything that
> > breaks (older kernels) when removing the label property?
> 
> The label is exposed to userspace as the path in sysfs, so we cannot
> change it. There is no way to construct that exact label using function
> and color -- see led_compose_name().
> 
> Regards,
> Samuel
> 
> >> ---
> >> 
> >>  arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 2 +-
> >>  arch/arm/boot/dts/sun5i-r8-chip.dts      | 2 +-
> >>  arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 2 +-
> >>  3 files changed, 3 insertions(+), 3 deletions(-)
> >> 
> >> diff --git a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
> >> b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts index
> >> a32cde3e32eb..3222f1490716 100644
> >> --- a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
> >> +++ b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
> >> @@ -70,7 +70,7 @@ chosen {
> >> 
> >>  	leds {
> >>  	
> >>  		compatible = "gpio-leds";
> >> 
> >> -		status {
> >> +		led-status {
> >> 
> >>  			label = "chip-pro:white:status";
> >>  			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
> >>  			default-state = "on";
> >> 
> >> diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts
> >> b/arch/arm/boot/dts/sun5i-r8-chip.dts index 4bf4943d4eb7..303191c926c2
> >> 100644
> >> --- a/arch/arm/boot/dts/sun5i-r8-chip.dts
> >> +++ b/arch/arm/boot/dts/sun5i-r8-chip.dts
> >> @@ -70,7 +70,7 @@ chosen {
> >> 
> >>  	leds {
> >>  	
> >>  		compatible = "gpio-leds";
> >> 
> >> -		status {
> >> +		led-status {
> >> 
> >>  			label = "chip:white:status";
> >>  			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
> >>  			default-state = "on";
> >> 
> >> diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
> >> b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts index
> >> 0af48e143b66..b84822453381 100644
> >> --- a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
> >> +++ b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
> >> @@ -67,7 +67,7 @@ hdmi_con_in: endpoint {
> >> 
> >>  	leds {
> >>  	
> >>  		compatible = "gpio-leds";
> >> 
> >> -		status {
> >> +		led-status {
> >> 
> >>  			label = "sina31s:status:usr";
> >>  			gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* 
PH13 */
> >>  		
> >>  		};



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: [PATCH 1/2] ARM: dts: sunxi: Fix GPIO LED node names
@ 2022-12-05 21:07       ` Jernej Škrabec
  0 siblings, 0 replies; 14+ messages in thread
From: Jernej Škrabec @ 2022-12-05 21:07 UTC (permalink / raw)
  To: Andre Przywara, Samuel Holland
  Cc: Chen-Yu Tsai, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-arm-kernel, linux-kernel, linux-sunxi

Hi Samuel,

Dne petek, 25. november 2022 ob 22:50:07 CET je Samuel Holland napisal(a):
> Hi Andre,
> 
> On 11/25/22 15:40, Andre Przywara wrote:
> > On Fri, 25 Nov 2022 13:54:00 -0600
> > Samuel Holland <samuel@sholland.org> wrote:
> > 
> > Hi Samuel,
> > 
> >> These board devicetrees fail to validate because the gpio-leds schema
> >> requires its child nodes to have "led" in the node name.
> >> 
> >> Signed-off-by: Samuel Holland <samuel@sholland.org>
> > 
> > That looks alright, though the comment in the binding says that we
> > should just have led-0, led-1 instead, so just (hex) numbers. The
> > "status" name is also in the label, so we wouldn't lose information.
> 
> I am not a fan of giving the LEDs meaningless enumerators, but I can do
> that if the maintainers insist.

I'm not a fan of that either, but binding really wants enumerator. So let's 
conform to that.

Best regards,
Jernej

> 
> > Actually, also "label" is deprecated, in favour of "color" and
> > "function", shall this be fixed on the way? Or is there anything that
> > breaks (older kernels) when removing the label property?
> 
> The label is exposed to userspace as the path in sysfs, so we cannot
> change it. There is no way to construct that exact label using function
> and color -- see led_compose_name().
> 
> Regards,
> Samuel
> 
> >> ---
> >> 
> >>  arch/arm/boot/dts/sun5i-gr8-chip-pro.dts | 2 +-
> >>  arch/arm/boot/dts/sun5i-r8-chip.dts      | 2 +-
> >>  arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 2 +-
> >>  3 files changed, 3 insertions(+), 3 deletions(-)
> >> 
> >> diff --git a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
> >> b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts index
> >> a32cde3e32eb..3222f1490716 100644
> >> --- a/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
> >> +++ b/arch/arm/boot/dts/sun5i-gr8-chip-pro.dts
> >> @@ -70,7 +70,7 @@ chosen {
> >> 
> >>  	leds {
> >>  	
> >>  		compatible = "gpio-leds";
> >> 
> >> -		status {
> >> +		led-status {
> >> 
> >>  			label = "chip-pro:white:status";
> >>  			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
> >>  			default-state = "on";
> >> 
> >> diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts
> >> b/arch/arm/boot/dts/sun5i-r8-chip.dts index 4bf4943d4eb7..303191c926c2
> >> 100644
> >> --- a/arch/arm/boot/dts/sun5i-r8-chip.dts
> >> +++ b/arch/arm/boot/dts/sun5i-r8-chip.dts
> >> @@ -70,7 +70,7 @@ chosen {
> >> 
> >>  	leds {
> >>  	
> >>  		compatible = "gpio-leds";
> >> 
> >> -		status {
> >> +		led-status {
> >> 
> >>  			label = "chip:white:status";
> >>  			gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>;
> >>  			default-state = "on";
> >> 
> >> diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
> >> b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts index
> >> 0af48e143b66..b84822453381 100644
> >> --- a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
> >> +++ b/arch/arm/boot/dts/sun6i-a31s-sina31s.dts
> >> @@ -67,7 +67,7 @@ hdmi_con_in: endpoint {
> >> 
> >>  	leds {
> >>  	
> >>  		compatible = "gpio-leds";
> >> 
> >> -		status {
> >> +		led-status {
> >> 
> >>  			label = "sina31s:status:usr";
> >>  			gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* 
PH13 */
> >>  		
> >>  		};



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-12-05 21:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-25 19:54 [PATCH 1/2] ARM: dts: sunxi: Fix GPIO LED node names Samuel Holland
2022-11-25 19:54 ` Samuel Holland
2022-11-25 19:54 ` [PATCH 2/2] ARM: dts: sun8i: nanopi-duo2: Fix regulator GPIO reference Samuel Holland
2022-11-25 19:54   ` Samuel Holland
2022-11-25 21:42   ` Andre Przywara
2022-11-25 21:42     ` Andre Przywara
2022-12-05 21:03   ` Jernej Škrabec
2022-12-05 21:03     ` Jernej Škrabec
2022-11-25 21:40 ` [PATCH 1/2] ARM: dts: sunxi: Fix GPIO LED node names Andre Przywara
2022-11-25 21:40   ` Andre Przywara
2022-11-25 21:50   ` Samuel Holland
2022-11-25 21:50     ` Samuel Holland
2022-12-05 21:07     ` Jernej Škrabec
2022-12-05 21:07       ` Jernej Škrabec

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.