2020-10-12 02:16:39

by Clément Péron

[permalink] [raw]
Subject: [PATCH v2] arm64: dts: allwinner: beelink-gs1: Update LED power node

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 <[email protected]>
---
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


2020-10-12 20:47:30

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v2] arm64: dts: allwinner: beelink-gs1: Update LED power node

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 <[email protected]>
> ---
> 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


Attachments:
(No filename) (1.36 kB)
signature.asc (235.00 B)
Download all attachments

2020-10-18 18:31:51

by Clément Péron

[permalink] [raw]
Subject: Re: [PATCH v2] arm64: dts: allwinner: beelink-gs1: Update LED power node

HI Maxime,

On Mon, 12 Oct 2020 at 13:22, Maxime Ripard <[email protected]> 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 <[email protected]>
> > ---
> > 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

2020-10-19 11:47:01

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v2] arm64: dts: allwinner: beelink-gs1: Update LED power node

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 <[email protected]> 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 <[email protected]>
> > > ---
> > > 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


Attachments:
(No filename) (2.17 kB)
signature.asc (235.00 B)
Download all attachments