LKML Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] arm64: dts: allwinner: beelink-gs1: Update LED power node
@ 2020-10-11 21:22 Clément Péron
  2020-10-12 11:22 ` Maxime Ripard
  0 siblings, 1 reply; 4+ messages in thread
From: Clément Péron @ 2020-10-11 21:22 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Clément Péron, Rob Herring, Chen-Yu Tsai, devicetree,
	linux-arm-kernel, linux-kernel

Beelink GS1 LED trigger a warning when running dtbs_check.

Update the node with a valid pattern property.

Also add the function and the color of the LED and drop the
label which is deprecated.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
index 3f7ceeb1a767..a364cb4e5b3f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
@@ -7,6 +7,7 @@
 #include "sun50i-h6-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	model = "Beelink GS1";
@@ -43,8 +44,9 @@ ext_osc32k: ext_osc32k_clk {
 	leds {
 		compatible = "gpio-leds";
 
-		power {
-			label = "beelink:white:power";
+		led-0 {
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
 			default-state = "on";
 		};
-- 
2.25.1


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

* Re: [PATCH v2] arm64: dts: allwinner: beelink-gs1: Update LED power node
  2020-10-11 21:22 [PATCH v2] arm64: dts: allwinner: beelink-gs1: Update LED power node Clément Péron
@ 2020-10-12 11:22 ` Maxime Ripard
  2020-10-18 17:25   ` Clément Péron
  0 siblings, 1 reply; 4+ messages in thread
From: Maxime Ripard @ 2020-10-12 11:22 UTC (permalink / raw)
  To: Clément Péron
  Cc: Rob Herring, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel


[-- Attachment #1: Type: text/plain, Size: 1393 bytes --]

Hi!

On Sun, Oct 11, 2020 at 11:22:37PM +0200, Clément Péron wrote:
> Beelink GS1 LED trigger a warning when running dtbs_check.
> 
> Update the node with a valid pattern property.
> 
> Also add the function and the color of the LED and drop the
> label which is deprecated.
> 
> Signed-off-by: Clément Péron <peron.clem@gmail.com>
> ---
>  arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
> index 3f7ceeb1a767..a364cb4e5b3f 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
> @@ -7,6 +7,7 @@
>  #include "sun50i-h6-cpu-opp.dtsi"
>  
>  #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/leds/common.h>
>  
>  / {
>  	model = "Beelink GS1";
> @@ -43,8 +44,9 @@ ext_osc32k: ext_osc32k_clk {
>  	leds {
>  		compatible = "gpio-leds";
>  
> -		power {
> -			label = "beelink:white:power";
> +		led-0 {
> +			function = LED_FUNCTION_POWER;
> +			color = <LED_COLOR_ID_WHITE>;
>  			gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
>  			default-state = "on";
>  		};

Doesn't that also change the sysfs file that LED is exposed to the userspace with?

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v2] arm64: dts: allwinner: beelink-gs1: Update LED power node
  2020-10-12 11:22 ` Maxime Ripard
@ 2020-10-18 17:25   ` Clément Péron
  2020-10-19 10:34     ` Maxime Ripard
  0 siblings, 1 reply; 4+ messages in thread
From: Clément Péron @ 2020-10-18 17:25 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Rob Herring, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

HI Maxime,

On Mon, 12 Oct 2020 at 13:22, Maxime Ripard <maxime@cerno.tech> wrote:
>
> Hi!
>
> On Sun, Oct 11, 2020 at 11:22:37PM +0200, Clément Péron wrote:
> > Beelink GS1 LED trigger a warning when running dtbs_check.
> >
> > Update the node with a valid pattern property.
> >
> > Also add the function and the color of the LED and drop the
> > label which is deprecated.
> >
> > Signed-off-by: Clément Péron <peron.clem@gmail.com>
> > ---
> >  arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
> > index 3f7ceeb1a767..a364cb4e5b3f 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
> > @@ -7,6 +7,7 @@
> >  #include "sun50i-h6-cpu-opp.dtsi"
> >
> >  #include <dt-bindings/gpio/gpio.h>
> > +#include <dt-bindings/leds/common.h>
> >
> >  / {
> >       model = "Beelink GS1";
> > @@ -43,8 +44,9 @@ ext_osc32k: ext_osc32k_clk {
> >       leds {
> >               compatible = "gpio-leds";
> >
> > -             power {
> > -                     label = "beelink:white:power";
> > +             led-0 {
> > +                     function = LED_FUNCTION_POWER;
> > +                     color = <LED_COLOR_ID_WHITE>;
> >                       gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
> >                       default-state = "on";
> >               };
>
> Doesn't that also change the sysfs file that LED is exposed to the userspace with?

Indeed the previous led sysfs:
/sys/class/leds/beelink:white:power/
is now
/sys/class/leds/white:power/

Do you want me to keep the label property to avoid this sysfs change ?

Regards,
Clement

>
> Maxime

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

* Re: [PATCH v2] arm64: dts: allwinner: beelink-gs1: Update LED power node
  2020-10-18 17:25   ` Clément Péron
@ 2020-10-19 10:34     ` Maxime Ripard
  0 siblings, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2020-10-19 10:34 UTC (permalink / raw)
  To: Clément Péron
  Cc: Rob Herring, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel


[-- Attachment #1: Type: text/plain, Size: 2219 bytes --]

On Sun, Oct 18, 2020 at 07:25:10PM +0200, Clément Péron wrote:
> HI Maxime,
> 
> On Mon, 12 Oct 2020 at 13:22, Maxime Ripard <maxime@cerno.tech> wrote:
> >
> > Hi!
> >
> > On Sun, Oct 11, 2020 at 11:22:37PM +0200, Clément Péron wrote:
> > > Beelink GS1 LED trigger a warning when running dtbs_check.
> > >
> > > Update the node with a valid pattern property.
> > >
> > > Also add the function and the color of the LED and drop the
> > > label which is deprecated.
> > >
> > > Signed-off-by: Clément Péron <peron.clem@gmail.com>
> > > ---
> > >  arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 6 ++++--
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
> > > index 3f7ceeb1a767..a364cb4e5b3f 100644
> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
> > > @@ -7,6 +7,7 @@
> > >  #include "sun50i-h6-cpu-opp.dtsi"
> > >
> > >  #include <dt-bindings/gpio/gpio.h>
> > > +#include <dt-bindings/leds/common.h>
> > >
> > >  / {
> > >       model = "Beelink GS1";
> > > @@ -43,8 +44,9 @@ ext_osc32k: ext_osc32k_clk {
> > >       leds {
> > >               compatible = "gpio-leds";
> > >
> > > -             power {
> > > -                     label = "beelink:white:power";
> > > +             led-0 {
> > > +                     function = LED_FUNCTION_POWER;
> > > +                     color = <LED_COLOR_ID_WHITE>;
> > >                       gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
> > >                       default-state = "on";
> > >               };
> >
> > Doesn't that also change the sysfs file that LED is exposed to the userspace with?
> 
> Indeed the previous led sysfs:
> /sys/class/leds/beelink:white:power/
> is now
> /sys/class/leds/white:power/
> 
> Do you want me to keep the label property to avoid this sysfs change ?

I don't know, the documentation seems to indicate that we should use one
or the other, but I'm not sure if both makes sense or not. I guess we
should ask Pavel or Rob?

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-11 21:22 [PATCH v2] arm64: dts: allwinner: beelink-gs1: Update LED power node Clément Péron
2020-10-12 11:22 ` Maxime Ripard
2020-10-18 17:25   ` Clément Péron
2020-10-19 10:34     ` Maxime Ripard

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git