linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: shmobile: koelsch: dts: Add gpio-keys device
@ 2013-12-11 15:42 Laurent Pinchart
  2013-12-12 13:23 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Pinchart @ 2013-12-11 15:42 UTC (permalink / raw)
  To: linux-sh

The board has 7 buttons connected to GPIOs, add a corresponding
gpio-keys device.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 arch/arm/boot/dts/r8a7791-koelsch-reference.dts | 54 +++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7791-koelsch-reference.dts b/arch/arm/boot/dts/r8a7791-koelsch-reference.dts
index 1919273..588ca17 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch-reference.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch-reference.dts
@@ -31,6 +31,60 @@
 		#size-cells = <1>;
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		key-a {
+			gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
+			linux,code = <30>;
+			label = "SW30";
+			gpio-key,wakeup;
+			debounce-interval = <20>;
+		};
+		key-b {
+			gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
+			linux,code = <48>;
+			label = "SW31";
+			gpio-key,wakeup;
+			debounce-interval = <20>;
+		};
+		key-c {
+			gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
+			linux,code = <46>;
+			label = "SW32";
+			gpio-key,wakeup;
+			debounce-interval = <20>;
+		};
+		key-d {
+			gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
+			linux,code = <32>;
+			label = "SW33";
+			gpio-key,wakeup;
+			debounce-interval = <20>;
+		};
+		key-e {
+			gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
+			linux,code = <18>;
+			label = "SW34";
+			gpio-key,wakeup;
+			debounce-interval = <20>;
+		};
+		key-f {
+			gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
+			linux,code = <33>;
+			label = "SW35";
+			gpio-key,wakeup;
+			debounce-interval = <20>;
+		};
+		key-g {
+			gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
+			linux,code = <34>;
+			label = "SW36";
+			gpio-key,wakeup;
+			debounce-interval = <20>;
+		};
+	};
+
 	leds {
 		compatible = "gpio-leds";
 		led6 {
-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH] ARM: shmobile: koelsch: dts: Add gpio-keys device
  2013-12-11 15:42 [PATCH] ARM: shmobile: koelsch: dts: Add gpio-keys device Laurent Pinchart
@ 2013-12-12 13:23 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2013-12-12 13:23 UTC (permalink / raw)
  To: linux-sh

On Wed, Dec 11, 2013 at 04:42:51PM +0100, Laurent Pinchart wrote:
> The board has 7 buttons connected to GPIOs, add a corresponding
> gpio-keys device.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  arch/arm/boot/dts/r8a7791-koelsch-reference.dts | 54 +++++++++++++++++++++++++
>  1 file changed, 54 insertions(+)

Thanks, I will queue this up.

> 
> diff --git a/arch/arm/boot/dts/r8a7791-koelsch-reference.dts b/arch/arm/boot/dts/r8a7791-koelsch-reference.dts
> index 1919273..588ca17 100644
> --- a/arch/arm/boot/dts/r8a7791-koelsch-reference.dts
> +++ b/arch/arm/boot/dts/r8a7791-koelsch-reference.dts
> @@ -31,6 +31,60 @@
>  		#size-cells = <1>;
>  	};
>  
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +
> +		key-a {
> +			gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
> +			linux,code = <30>;
> +			label = "SW30";
> +			gpio-key,wakeup;
> +			debounce-interval = <20>;
> +		};
> +		key-b {
> +			gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
> +			linux,code = <48>;
> +			label = "SW31";
> +			gpio-key,wakeup;
> +			debounce-interval = <20>;
> +		};
> +		key-c {
> +			gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
> +			linux,code = <46>;
> +			label = "SW32";
> +			gpio-key,wakeup;
> +			debounce-interval = <20>;
> +		};
> +		key-d {
> +			gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
> +			linux,code = <32>;
> +			label = "SW33";
> +			gpio-key,wakeup;
> +			debounce-interval = <20>;
> +		};
> +		key-e {
> +			gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
> +			linux,code = <18>;
> +			label = "SW34";
> +			gpio-key,wakeup;
> +			debounce-interval = <20>;
> +		};
> +		key-f {
> +			gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
> +			linux,code = <33>;
> +			label = "SW35";
> +			gpio-key,wakeup;
> +			debounce-interval = <20>;
> +		};
> +		key-g {
> +			gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
> +			linux,code = <34>;
> +			label = "SW36";
> +			gpio-key,wakeup;
> +			debounce-interval = <20>;
> +		};
> +	};
> +
>  	leds {
>  		compatible = "gpio-leds";
>  		led6 {
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

end of thread, other threads:[~2013-12-12 13:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-11 15:42 [PATCH] ARM: shmobile: koelsch: dts: Add gpio-keys device Laurent Pinchart
2013-12-12 13:23 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).