diff mbox

[01/68] ARM: dts: gose: Add GPIO keys to DT

Message ID d7d5974b156e2ef7436483de00ccada5987c9d31.1455303422.git.horms+renesas@verge.net.au (mailing list archive)
State Accepted
Commit d7d5974b156e2ef7436483de00ccada5987c9d31
Headers show

Commit Message

Simon Horman Feb. 12, 2016, 7:04 p.m. UTC
Instantiate the GPIO keys in the gose device tree.

Based on similar work for the koelsch board by Laurent Pinchart.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Tested-by: Magnus Damm <damm+renesas@opensource.se>
---
 arch/arm/boot/dts/r8a7793-gose.dts | 82 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

Comments

Geert Uytterhoeven Feb. 13, 2016, 8:23 p.m. UTC | #1
On Fri, Feb 12, 2016 at 8:04 PM, Simon Horman
<horms+renesas@verge.net.au> wrote:
> Instantiate the GPIO keys in the gose device tree.
>
> Based on similar work for the koelsch board by Laurent Pinchart.
>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> Tested-by: Magnus Damm <damm+renesas@opensource.se>
> ---
>  arch/arm/boot/dts/r8a7793-gose.dts | 82 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 82 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7793-gose.dts b/arch/arm/boot/dts/r8a7793-gose.dts
> index baa59fe84298..ccbc1c66cc6c 100644
> --- a/arch/arm/boot/dts/r8a7793-gose.dts
> +++ b/arch/arm/boot/dts/r8a7793-gose.dts
> @@ -31,6 +31,88 @@
>                 device_type = "memory";
>                 reg = <0 0x40000000 0 0x40000000>;
>         };
> +
> +       gpio-keys {
> +               compatible = "gpio-keys";
> +
> +               key-1 {
> +                       gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
> +                       linux,code = <KEY_1>;
> +                       label = "SW2-1";
> +                       gpio-key,wakeup;

In the mean time, "gpio-key,wakeup" has been deprecated in favor of
"wakeup-source".

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
Simon Horman Feb. 15, 2016, 7:18 a.m. UTC | #2
On Sat, Feb 13, 2016 at 09:23:47PM +0100, Geert Uytterhoeven wrote:
> On Fri, Feb 12, 2016 at 8:04 PM, Simon Horman
> <horms+renesas@verge.net.au> wrote:
> > Instantiate the GPIO keys in the gose device tree.
> >
> > Based on similar work for the koelsch board by Laurent Pinchart.
> >
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > Tested-by: Magnus Damm <damm+renesas@opensource.se>
> > ---
> >  arch/arm/boot/dts/r8a7793-gose.dts | 82 ++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 82 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/r8a7793-gose.dts b/arch/arm/boot/dts/r8a7793-gose.dts
> > index baa59fe84298..ccbc1c66cc6c 100644
> > --- a/arch/arm/boot/dts/r8a7793-gose.dts
> > +++ b/arch/arm/boot/dts/r8a7793-gose.dts
> > @@ -31,6 +31,88 @@
> >                 device_type = "memory";
> >                 reg = <0 0x40000000 0 0x40000000>;
> >         };
> > +
> > +       gpio-keys {
> > +               compatible = "gpio-keys";
> > +
> > +               key-1 {
> > +                       gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
> > +                       linux,code = <KEY_1>;
> > +                       label = "SW2-1";
> > +                       gpio-key,wakeup;
> 
> In the mean time, "gpio-key,wakeup" has been deprecated in favor of
> "wakeup-source".

Is the change just a matter of s/gpio-key,wakeup/wakeup-source/ ?
If so I'll sort things out.
Geert Uytterhoeven Feb. 15, 2016, 7:45 a.m. UTC | #3
On Mon, Feb 15, 2016 at 8:18 AM, Simon Horman <horms@verge.net.au> wrote:
> On Sat, Feb 13, 2016 at 09:23:47PM +0100, Geert Uytterhoeven wrote:
>> On Fri, Feb 12, 2016 at 8:04 PM, Simon Horman
>> <horms+renesas@verge.net.au> wrote:
>> > Instantiate the GPIO keys in the gose device tree.
>> >
>> > Based on similar work for the koelsch board by Laurent Pinchart.
>> >
>> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>> > Tested-by: Magnus Damm <damm+renesas@opensource.se>
>> > ---
>> >  arch/arm/boot/dts/r8a7793-gose.dts | 82 ++++++++++++++++++++++++++++++++++++++
>> >  1 file changed, 82 insertions(+)
>> >
>> > diff --git a/arch/arm/boot/dts/r8a7793-gose.dts b/arch/arm/boot/dts/r8a7793-gose.dts
>> > index baa59fe84298..ccbc1c66cc6c 100644
>> > --- a/arch/arm/boot/dts/r8a7793-gose.dts
>> > +++ b/arch/arm/boot/dts/r8a7793-gose.dts
>> > @@ -31,6 +31,88 @@
>> >                 device_type = "memory";
>> >                 reg = <0 0x40000000 0 0x40000000>;
>> >         };
>> > +
>> > +       gpio-keys {
>> > +               compatible = "gpio-keys";
>> > +
>> > +               key-1 {
>> > +                       gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
>> > +                       linux,code = <KEY_1>;
>> > +                       label = "SW2-1";
>> > +                       gpio-key,wakeup;
>>
>> In the mean time, "gpio-key,wakeup" has been deprecated in favor of
>> "wakeup-source".
>
> Is the change just a matter of s/gpio-key,wakeup/wakeup-source/ ?
> If so I'll sort things out.

Yes, cfr. e.g. commit 0cc16889e77a95568806b1e45af104f75547eac9
("ARM: dts: shmobile/r8a7xxx: replace gpio-key, wakeup with
wakeup-source property")

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
diff mbox

Patch

diff --git a/arch/arm/boot/dts/r8a7793-gose.dts b/arch/arm/boot/dts/r8a7793-gose.dts
index baa59fe84298..ccbc1c66cc6c 100644
--- a/arch/arm/boot/dts/r8a7793-gose.dts
+++ b/arch/arm/boot/dts/r8a7793-gose.dts
@@ -31,6 +31,88 @@ 
 		device_type = "memory";
 		reg = <0 0x40000000 0 0x40000000>;
 	};
+
+	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 = <KEY_A>;
+		        label = "SW30";
+		        gpio-key,wakeup;
+		        debounce-interval = <20>;
+		};
+		key-b {
+		        gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
+		        linux,code = <KEY_B>;
+		        label = "SW31";
+		        gpio-key,wakeup;
+		        debounce-interval = <20>;
+		};
+		key-c {
+		        gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
+		        linux,code = <KEY_C>;
+		        label = "SW32";
+		        gpio-key,wakeup;
+		        debounce-interval = <20>;
+		};
+		key-d {
+		        gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
+		        linux,code = <KEY_D>;
+		        label = "SW33";
+		        gpio-key,wakeup;
+		        debounce-interval = <20>;
+		};
+		key-e {
+		        gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
+		        linux,code = <KEY_E>;
+		        label = "SW34";
+		        gpio-key,wakeup;
+		        debounce-interval = <20>;
+		};
+		key-f {
+		        gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
+		        linux,code = <KEY_F>;
+		        label = "SW35";
+		        gpio-key,wakeup;
+		        debounce-interval = <20>;
+		};
+		key-g {
+		        gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
+		        linux,code = <KEY_G>;
+		        label = "SW36";
+		        gpio-key,wakeup;
+		        debounce-interval = <20>;
+		};
+	};
 };
 
 &extal_clk {