All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: sun8i: h3: beelink-x2: Add power button
@ 2021-03-06 20:36 ` Jernej Skrabec
  0 siblings, 0 replies; 8+ messages in thread
From: Jernej Skrabec @ 2021-03-06 20:36 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, devicetree, linux-arm-kernel, linux-kernel, linux-sunxi

Beelink X2 has power button. Add node for it.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
index 62b5280ec093..4a2cb072ecf6 100644
--- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
+++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
@@ -111,6 +111,17 @@ spdif_out: spdif-out {
 		#sound-dai-cells = <0>;
 		compatible = "linux,spdif-dit";
 	};
+
+	r_gpio_keys {
+		compatible = "gpio-keys";
+
+		power {
+			label = "power";
+			linux,code = <KEY_POWER>;
+			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+			wakeup-source;
+		};
+	};
 };
 
 &de {
-- 
2.30.1


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

* [PATCH] ARM: dts: sun8i: h3: beelink-x2: Add power button
@ 2021-03-06 20:36 ` Jernej Skrabec
  0 siblings, 0 replies; 8+ messages in thread
From: Jernej Skrabec @ 2021-03-06 20:36 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, devicetree, linux-arm-kernel, linux-kernel, linux-sunxi

Beelink X2 has power button. Add node for it.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
index 62b5280ec093..4a2cb072ecf6 100644
--- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
+++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
@@ -111,6 +111,17 @@ spdif_out: spdif-out {
 		#sound-dai-cells = <0>;
 		compatible = "linux,spdif-dit";
 	};
+
+	r_gpio_keys {
+		compatible = "gpio-keys";
+
+		power {
+			label = "power";
+			linux,code = <KEY_POWER>;
+			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+			wakeup-source;
+		};
+	};
 };
 
 &de {
-- 
2.30.1


_______________________________________________
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] 8+ messages in thread

* Re: [PATCH] ARM: dts: sun8i: h3: beelink-x2: Add power button
  2021-03-06 20:36 ` Jernej Skrabec
@ 2021-03-08 13:05   ` Maxime Ripard
  -1 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2021-03-08 13:05 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: wens, robh+dt, devicetree, linux-arm-kernel, linux-kernel, linux-sunxi

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

Hi

On Sat, Mar 06, 2021 at 09:36:11PM +0100, Jernej Skrabec wrote:
> Beelink X2 has power button. Add node for it.
> 
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> ---
>  arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> index 62b5280ec093..4a2cb072ecf6 100644
> --- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> +++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> @@ -111,6 +111,17 @@ spdif_out: spdif-out {
>  		#sound-dai-cells = <0>;
>  		compatible = "linux,spdif-dit";
>  	};
> +
> +	r_gpio_keys {

Underscores are not valid for node names (and will trigger a dtc warning
when running with W=1).

> +		compatible = "gpio-keys";
> +
> +		power {
> +			label = "power";

IIRC the node name is used as a fallback when the label isn't there?

Maxime

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

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

* Re: [PATCH] ARM: dts: sun8i: h3: beelink-x2: Add power button
@ 2021-03-08 13:05   ` Maxime Ripard
  0 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2021-03-08 13:05 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: wens, robh+dt, devicetree, linux-arm-kernel, linux-kernel, linux-sunxi


[-- Attachment #1.1: Type: text/plain, Size: 948 bytes --]

Hi

On Sat, Mar 06, 2021 at 09:36:11PM +0100, Jernej Skrabec wrote:
> Beelink X2 has power button. Add node for it.
> 
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> ---
>  arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> index 62b5280ec093..4a2cb072ecf6 100644
> --- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> +++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> @@ -111,6 +111,17 @@ spdif_out: spdif-out {
>  		#sound-dai-cells = <0>;
>  		compatible = "linux,spdif-dit";
>  	};
> +
> +	r_gpio_keys {

Underscores are not valid for node names (and will trigger a dtc warning
when running with W=1).

> +		compatible = "gpio-keys";
> +
> +		power {
> +			label = "power";

IIRC the node name is used as a fallback when the label isn't there?

Maxime

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

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 8+ messages in thread

* Re: Re: [PATCH] ARM: dts: sun8i: h3: beelink-x2: Add power button
  2021-03-08 13:05   ` Maxime Ripard
@ 2021-03-11 21:59     ` Jernej Škrabec
  -1 siblings, 0 replies; 8+ messages in thread
From: Jernej Škrabec @ 2021-03-11 21:59 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: wens, robh+dt, devicetree, linux-arm-kernel, linux-kernel, linux-sunxi

Hi!

Dne ponedeljek, 08. marec 2021 ob 14:05:06 CET je Maxime Ripard napisal(a):
> Hi
> 
> On Sat, Mar 06, 2021 at 09:36:11PM +0100, Jernej Skrabec wrote:
> > Beelink X2 has power button. Add node for it.
> > 
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > ---
> >  arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/
sun8i-h3-beelink-x2.dts
> > index 62b5280ec093..4a2cb072ecf6 100644
> > --- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > +++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > @@ -111,6 +111,17 @@ spdif_out: spdif-out {
> >  		#sound-dai-cells = <0>;
> >  		compatible = "linux,spdif-dit";
> >  	};
> > +
> > +	r_gpio_keys {
> 
> Underscores are not valid for node names (and will trigger a dtc warning
> when running with W=1).

Unless I'm doing something wrong, I didn't get any warning with "make dtbs 
W=1". In fact many H3 boards have a node with this name and not a single 
warning is produced with this command for underscores (there are other 
warnings though).

Actually, several H3 DT files have nodes like "sound_spdif" or "wifi_pwrseq". It 
seems like warnings are triggered only for children of soc node.

> 
> > +		compatible = "gpio-keys";
> > +
> > +		power {
> > +			label = "power";
> 
> IIRC the node name is used as a fallback when the label isn't there?

Binding doesn't say anything about what happens if label is missing. Driver 
sets generic description "gpio_keys" in such case, which is not something that 
we want.

Best regards,
Jernej

> 
> Maxime
> 



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

* Re: Re: [PATCH] ARM: dts: sun8i: h3: beelink-x2: Add power button
@ 2021-03-11 21:59     ` Jernej Škrabec
  0 siblings, 0 replies; 8+ messages in thread
From: Jernej Škrabec @ 2021-03-11 21:59 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: wens, robh+dt, devicetree, linux-arm-kernel, linux-kernel, linux-sunxi

Hi!

Dne ponedeljek, 08. marec 2021 ob 14:05:06 CET je Maxime Ripard napisal(a):
> Hi
> 
> On Sat, Mar 06, 2021 at 09:36:11PM +0100, Jernej Skrabec wrote:
> > Beelink X2 has power button. Add node for it.
> > 
> > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > ---
> >  arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/
sun8i-h3-beelink-x2.dts
> > index 62b5280ec093..4a2cb072ecf6 100644
> > --- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > +++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > @@ -111,6 +111,17 @@ spdif_out: spdif-out {
> >  		#sound-dai-cells = <0>;
> >  		compatible = "linux,spdif-dit";
> >  	};
> > +
> > +	r_gpio_keys {
> 
> Underscores are not valid for node names (and will trigger a dtc warning
> when running with W=1).

Unless I'm doing something wrong, I didn't get any warning with "make dtbs 
W=1". In fact many H3 boards have a node with this name and not a single 
warning is produced with this command for underscores (there are other 
warnings though).

Actually, several H3 DT files have nodes like "sound_spdif" or "wifi_pwrseq". It 
seems like warnings are triggered only for children of soc node.

> 
> > +		compatible = "gpio-keys";
> > +
> > +		power {
> > +			label = "power";
> 
> IIRC the node name is used as a fallback when the label isn't there?

Binding doesn't say anything about what happens if label is missing. Driver 
sets generic description "gpio_keys" in such case, which is not something that 
we want.

Best regards,
Jernej

> 
> Maxime
> 



_______________________________________________
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] 8+ messages in thread

* Re: [PATCH] ARM: dts: sun8i: h3: beelink-x2: Add power button
  2021-03-11 21:59     ` Jernej Škrabec
@ 2021-03-15 15:03       ` Maxime Ripard
  -1 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2021-03-15 15:03 UTC (permalink / raw)
  To: Jernej Škrabec
  Cc: wens, robh+dt, devicetree, linux-arm-kernel, linux-kernel, linux-sunxi

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

Hi,

On Thu, Mar 11, 2021 at 10:59:35PM +0100, Jernej Škrabec wrote:
> Hi!
> 
> Dne ponedeljek, 08. marec 2021 ob 14:05:06 CET je Maxime Ripard napisal(a):
> > Hi
> > 
> > On Sat, Mar 06, 2021 at 09:36:11PM +0100, Jernej Skrabec wrote:
> > > Beelink X2 has power button. Add node for it.
> > > 
> > > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > > ---
> > >  arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 11 +++++++++++
> > >  1 file changed, 11 insertions(+)
> > > 
> > > diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/
> sun8i-h3-beelink-x2.dts
> > > index 62b5280ec093..4a2cb072ecf6 100644
> > > --- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > > +++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > > @@ -111,6 +111,17 @@ spdif_out: spdif-out {
> > >  		#sound-dai-cells = <0>;
> > >  		compatible = "linux,spdif-dit";
> > >  	};
> > > +
> > > +	r_gpio_keys {
> > 
> > Underscores are not valid for node names (and will trigger a dtc warning
> > when running with W=1).
> 
> Unless I'm doing something wrong, I didn't get any warning with "make dtbs 
> W=1". In fact many H3 boards have a node with this name and not a single 
> warning is produced with this command for underscores (there are other 
> warnings though).

It looks like I've been remembering it wrong, and it's actually W=2 that
reports it, but it's here nonetheless :)

Maxime

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

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

* Re: [PATCH] ARM: dts: sun8i: h3: beelink-x2: Add power button
@ 2021-03-15 15:03       ` Maxime Ripard
  0 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2021-03-15 15:03 UTC (permalink / raw)
  To: Jernej Škrabec
  Cc: wens, robh+dt, devicetree, linux-arm-kernel, linux-kernel, linux-sunxi


[-- Attachment #1.1: Type: text/plain, Size: 1432 bytes --]

Hi,

On Thu, Mar 11, 2021 at 10:59:35PM +0100, Jernej Škrabec wrote:
> Hi!
> 
> Dne ponedeljek, 08. marec 2021 ob 14:05:06 CET je Maxime Ripard napisal(a):
> > Hi
> > 
> > On Sat, Mar 06, 2021 at 09:36:11PM +0100, Jernej Skrabec wrote:
> > > Beelink X2 has power button. Add node for it.
> > > 
> > > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> > > ---
> > >  arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 11 +++++++++++
> > >  1 file changed, 11 insertions(+)
> > > 
> > > diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/
> sun8i-h3-beelink-x2.dts
> > > index 62b5280ec093..4a2cb072ecf6 100644
> > > --- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > > +++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts
> > > @@ -111,6 +111,17 @@ spdif_out: spdif-out {
> > >  		#sound-dai-cells = <0>;
> > >  		compatible = "linux,spdif-dit";
> > >  	};
> > > +
> > > +	r_gpio_keys {
> > 
> > Underscores are not valid for node names (and will trigger a dtc warning
> > when running with W=1).
> 
> Unless I'm doing something wrong, I didn't get any warning with "make dtbs 
> W=1". In fact many H3 boards have a node with this name and not a single 
> warning is produced with this command for underscores (there are other 
> warnings though).

It looks like I've been remembering it wrong, and it's actually W=2 that
reports it, but it's here nonetheless :)

Maxime

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

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
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] 8+ messages in thread

end of thread, other threads:[~2021-03-15 15:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-06 20:36 [PATCH] ARM: dts: sun8i: h3: beelink-x2: Add power button Jernej Skrabec
2021-03-06 20:36 ` Jernej Skrabec
2021-03-08 13:05 ` Maxime Ripard
2021-03-08 13:05   ` Maxime Ripard
2021-03-11 21:59   ` Jernej Škrabec
2021-03-11 21:59     ` Jernej Škrabec
2021-03-15 15:03     ` Maxime Ripard
2021-03-15 15:03       ` Maxime Ripard

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.