ARM: shmobile: Add DTS gpio-keys support for SW2 on Lager
Subsystems (2)
PATCH 1/1 ARM: shmobile: Add DTS gpio-keys support for SW2 on Lager
From: Magnus Damm <[email protected]>
Add DTS gpio-keys support for SW2 on the Lager board. This makes the DT code match the legacy board code.
---
Written against renesas-devel-v3.14-rc7-20140318
arch/arm/boot/dts/r8a7790-lager.dts | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
arch/arm/boot/dts/r8a7790-lager.dts +34 -0
@@ -12,6 +12,7 @@ /dts-v1/; #include "r8a7790.dtsi" #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> / { model = "Lager";
@@ -36,6 +37,39 @@ #size-cells = <1>; }; + gpio_keys { + compatible = "gpio-keys"; + + button@1 { + linux,code = <KEY_1>; + label = "SW2-1"; + gpio-key,wakeup; + debounce-interval = <20>; + gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; + }; + button@2 { + linux,code = <KEY_2>; + label = "SW2-2"; + gpio-key,wakeup; + debounce-interval = <20>; + gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; + }; + button@3 { + linux,code = <KEY_3>; + label = "SW2-3"; + gpio-key,wakeup; + debounce-interval = <20>; + gpios = <&gpio1 26 GPIO_ACTIVE_LOW>; + }; + button@4 { + linux,code = <KEY_4>; + label = "SW2-4"; + gpio-key,wakeup; + debounce-interval = <20>; + gpios = <&gpio1 28 GPIO_ACTIVE_LOW>; + }; + }; + leds { compatible = "gpio-leds"; led6 {
PATCH 1/1 ARM: shmobile: Add DTS gpio-keys support for SW2 on Koelsch
From: Magnus Damm <[email protected]>
Add DTS gpio-keys support for SW2 on the Koelsch board. This makes the DT code match the legacy board code. Also update the existing gpio-keys nodes to make use of KEY_n.
---
Written against renesas-devel-v3.14-rc7-20140318
arch/arm/boot/dts/r8a7791-koelsch.dts | 43 +++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 7 deletions(-)
arch/arm/boot/dts/r8a7791-koelsch.dts +36 -7
@@ -13,6 +13,7 @@ /dts-v1/; #include "r8a7791.dtsi" #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> / { model = "Koelsch";
@@ -40,51 +41,79 @@ gpio-keys { compatible = "gpio-keys"; + key-1 { + gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; + linux,code = <KEY_1>; + label = "SW2-1"; + gpio-key,wakeup; + debounce-interval = <20>; + }; + key-2 { + gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; + linux,code = <KEY_2>; + label = "SW2-2"; + gpio-key,wakeup; + debounce-interval = <20>; + }; + key-3 { + gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; + linux,code = <KEY_3>; + label = "SW2-3"; + gpio-key,wakeup; + debounce-interval = <20>; + }; + key-4 { + gpios = <&gpio5 3 GPIO_ACTIVE_LOW>; + linux,code = <KEY_4>; + label = "SW2-4"; + gpio-key,wakeup; + debounce-interval = <20>; + }; key-a { gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; - linux,code = <30>; + linux,code = <KEY_A>; label = "SW30"; gpio-key,wakeup; debounce-interval = <20>; }; key-b { gpios = <&gpio7 1 GPIO_ACTIVE_LOW>; - linux,code = <48>; + linux,code = <KEY_B>; label = "SW31"; gpio-key,wakeup; debounce-interval = <20>; }; key-c { gpios = <&gpio7 2 GPIO_ACTIVE_LOW>; - linux,code = <46>; + linux,code = <KEY_C>; label = "SW32"; gpio-key,wakeup; debounce-interval = <20>; }; key-d { gpios = <&gpio7 3 GPIO_ACTIVE_LOW>; - linux,code = <32>; + linux,code = <KEY_D>; label = "SW33"; gpio-key,wakeup; debounce-interval = <20>; }; key-e { gpios = <&gpio7 4 GPIO_ACTIVE_LOW>; - linux,code = <18>; + linux,code = <KEY_E>; label = "SW34"; gpio-key,wakeup; debounce-interval = <20>; }; key-f { gpios = <&gpio7 5 GPIO_ACTIVE_LOW>; - linux,code = <33>; + linux,code = <KEY_F>; label = "SW35"; gpio-key,wakeup; debounce-interval = <20>; }; key-g { gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; - linux,code = <34>; + linux,code = <KEY_G>; label = "SW36"; gpio-key,wakeup; debounce-interval = <20>;
Re: [PATCH] ARM: shmobile: Add DTS gpio-keys support for SW2 on Koelsch
In reply to Magnus DammQuoted 5 lines · Magnus Damm
Add DTS gpio-keys support for SW2 on the Koelsch board. This makes the DT code match the legacy board code. Also update the existing gpio-keys nodes to make use of
KEY_n.Signed-off-by Magnus Damm <[email protected]>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: [PATCH] ARM: shmobile: Add DTS gpio-keys support for SW2 on Koelsch
In reply to Magnus DammQuoted 8 lines · Geert Uytterhoeven
Quoted 5 lines · Magnus Damm
Add DTS gpio-keys support for SW2 on the Koelsch board. This makes the DT code match the legacy board code. Also update the existing gpio-keys nodes to make use of
KEY_n.Signed-off-by Magnus Damm <[email protected]>
Thanks, I have queued this up.
Quoted 6 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Add DTS gpio-keys support for SW2 on the Lager board. This makes the DT code match the legacy board code.
Signed-off-by Magnus Damm <[email protected]>
Thanks, I have queued this up.