* [PATCH] ARM: dts: koelsch: Configure pull-up for SOFT_SW GPIO keys
@ 2021-03-03 13:29 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2021-03-03 13:29 UTC (permalink / raw)
To: Magnus Damm
Cc: Ulrich Hecht, Linus Walleij, linux-renesas-soc, linux-arm-kernel,
Geert Uytterhoeven
The GPIO pins connected to the 4 Software Switches ("SOFT_SW", SW2) do
not have external pull-up resistors, but rely on internal pull-ups being
enabled. Fortunately this is satisfied by the initial state of these
pins.
Make this explicit by enabling bias-pull-up, to remove the dependency on
initial state and/or boot loader configuration.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
To be queued in renesas-devel for v5.13.
It is safe to apply this before R-Car M2-W bias support[1] has landed,
as pinctrl_bind_pins() does not consider -ENOTSUPP a fatal error.
[1] https://lore.kernel.org/r/20210303132619.3938128-1-geert+renesas@glider.be
---
arch/arm/boot/dts/r8a7791-koelsch.dts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
index 751e07fb102cf454..c6c93c4452ee1e88 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -81,6 +81,9 @@ lbsc {
keyboard {
compatible = "gpio-keys";
+ pinctrl-0 = <&sw2_pins>;
+ pinctrl-names = "default";
+
key-1 {
gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
linux,code = <KEY_1>;
@@ -615,6 +618,11 @@ sound_clk_pins: sound_clk {
groups = "audio_clk_a";
function = "audio_clk";
};
+
+ sw2_pins: sw2 {
+ pins = "GP_5_0", "GP_5_1", "GP_5_2", "GP_5_3";
+ bias-pull-up;
+ };
};
ðer {
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ARM: dts: koelsch: Configure pull-up for SOFT_SW GPIO keys
@ 2021-03-03 13:29 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2021-03-03 13:29 UTC (permalink / raw)
To: Magnus Damm
Cc: Ulrich Hecht, Linus Walleij, linux-renesas-soc, linux-arm-kernel,
Geert Uytterhoeven
The GPIO pins connected to the 4 Software Switches ("SOFT_SW", SW2) do
not have external pull-up resistors, but rely on internal pull-ups being
enabled. Fortunately this is satisfied by the initial state of these
pins.
Make this explicit by enabling bias-pull-up, to remove the dependency on
initial state and/or boot loader configuration.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
To be queued in renesas-devel for v5.13.
It is safe to apply this before R-Car M2-W bias support[1] has landed,
as pinctrl_bind_pins() does not consider -ENOTSUPP a fatal error.
[1] https://lore.kernel.org/r/20210303132619.3938128-1-geert+renesas@glider.be
---
arch/arm/boot/dts/r8a7791-koelsch.dts | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
index 751e07fb102cf454..c6c93c4452ee1e88 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -81,6 +81,9 @@ lbsc {
keyboard {
compatible = "gpio-keys";
+ pinctrl-0 = <&sw2_pins>;
+ pinctrl-names = "default";
+
key-1 {
gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
linux,code = <KEY_1>;
@@ -615,6 +618,11 @@ sound_clk_pins: sound_clk {
groups = "audio_clk_a";
function = "audio_clk";
};
+
+ sw2_pins: sw2 {
+ pins = "GP_5_0", "GP_5_1", "GP_5_2", "GP_5_3";
+ bias-pull-up;
+ };
};
ðer {
--
2.25.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] 4+ messages in thread
* Re: [PATCH] ARM: dts: koelsch: Configure pull-up for SOFT_SW GPIO keys
2021-03-03 13:29 ` Geert Uytterhoeven
@ 2021-03-22 23:03 ` Niklas Söderlund
-1 siblings, 0 replies; 4+ messages in thread
From: Niklas Söderlund @ 2021-03-22 23:03 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Magnus Damm, Ulrich Hecht, Linus Walleij, linux-renesas-soc,
linux-arm-kernel
Hi Geert,
Thanks for your work.
On 2021-03-03 14:29:41 +0100, Geert Uytterhoeven wrote:
> The GPIO pins connected to the 4 Software Switches ("SOFT_SW", SW2) do
> not have external pull-up resistors, but rely on internal pull-ups being
> enabled. Fortunately this is satisfied by the initial state of these
> pins.
>
> Make this explicit by enabling bias-pull-up, to remove the dependency on
> initial state and/or boot loader configuration.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> To be queued in renesas-devel for v5.13.
>
> It is safe to apply this before R-Car M2-W bias support[1] has landed,
> as pinctrl_bind_pins() does not consider -ENOTSUPP a fatal error.
>
> [1] https://lore.kernel.org/r/20210303132619.3938128-1-geert+renesas@glider.be
> ---
> arch/arm/boot/dts/r8a7791-koelsch.dts | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
> index 751e07fb102cf454..c6c93c4452ee1e88 100644
> --- a/arch/arm/boot/dts/r8a7791-koelsch.dts
> +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
> @@ -81,6 +81,9 @@ lbsc {
> keyboard {
> compatible = "gpio-keys";
>
> + pinctrl-0 = <&sw2_pins>;
> + pinctrl-names = "default";
> +
> key-1 {
> gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
> linux,code = <KEY_1>;
> @@ -615,6 +618,11 @@ sound_clk_pins: sound_clk {
> groups = "audio_clk_a";
> function = "audio_clk";
> };
> +
> + sw2_pins: sw2 {
> + pins = "GP_5_0", "GP_5_1", "GP_5_2", "GP_5_3";
> + bias-pull-up;
> + };
> };
>
> ðer {
> --
> 2.25.1
>
--
Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: dts: koelsch: Configure pull-up for SOFT_SW GPIO keys
@ 2021-03-22 23:03 ` Niklas Söderlund
0 siblings, 0 replies; 4+ messages in thread
From: Niklas Söderlund @ 2021-03-22 23:03 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Magnus Damm, Ulrich Hecht, Linus Walleij, linux-renesas-soc,
linux-arm-kernel
Hi Geert,
Thanks for your work.
On 2021-03-03 14:29:41 +0100, Geert Uytterhoeven wrote:
> The GPIO pins connected to the 4 Software Switches ("SOFT_SW", SW2) do
> not have external pull-up resistors, but rely on internal pull-ups being
> enabled. Fortunately this is satisfied by the initial state of these
> pins.
>
> Make this explicit by enabling bias-pull-up, to remove the dependency on
> initial state and/or boot loader configuration.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> To be queued in renesas-devel for v5.13.
>
> It is safe to apply this before R-Car M2-W bias support[1] has landed,
> as pinctrl_bind_pins() does not consider -ENOTSUPP a fatal error.
>
> [1] https://lore.kernel.org/r/20210303132619.3938128-1-geert+renesas@glider.be
> ---
> arch/arm/boot/dts/r8a7791-koelsch.dts | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
> index 751e07fb102cf454..c6c93c4452ee1e88 100644
> --- a/arch/arm/boot/dts/r8a7791-koelsch.dts
> +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
> @@ -81,6 +81,9 @@ lbsc {
> keyboard {
> compatible = "gpio-keys";
>
> + pinctrl-0 = <&sw2_pins>;
> + pinctrl-names = "default";
> +
> key-1 {
> gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
> linux,code = <KEY_1>;
> @@ -615,6 +618,11 @@ sound_clk_pins: sound_clk {
> groups = "audio_clk_a";
> function = "audio_clk";
> };
> +
> + sw2_pins: sw2 {
> + pins = "GP_5_0", "GP_5_1", "GP_5_2", "GP_5_3";
> + bias-pull-up;
> + };
> };
>
> ðer {
> --
> 2.25.1
>
--
Regards,
Niklas Söderlund
_______________________________________________
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] 4+ messages in thread
end of thread, other threads:[~2021-03-22 23:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03 13:29 [PATCH] ARM: dts: koelsch: Configure pull-up for SOFT_SW GPIO keys Geert Uytterhoeven
2021-03-03 13:29 ` Geert Uytterhoeven
2021-03-22 23:03 ` Niklas Söderlund
2021-03-22 23:03 ` Niklas Söderlund
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.