All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/6] ARM: mach-shmobile: armadillo800eva: add support gpio_key
@ 2012-04-05  8:34 Kuninori Morimoto
  2012-04-06  1:25 ` Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2012-04-05  8:34 UTC (permalink / raw)
  To: linux-sh

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm/mach-shmobile/board-armadillo800eva.c |   26 ++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index b3754ee..987265a 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -23,8 +23,10 @@
 #include <linux/err.h>
 #include <linux/kernel.h>
 #include <linux/irq.h>
+#include <linux/input.h>
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
+#include <linux/gpio_keys.h>
 #include <linux/videodev2.h>
 #include <mach/common.h>
 #include <asm/page.h>
@@ -157,11 +159,35 @@ static struct i2c_board_info i2c0_devices[] = {
 	},
 };
 
+/* GPIO KEY */
+#define GPIO_KEY(c, g, d) { .code = c, .gpio = g, .desc = d, .active_low = 1 }
+
+static struct gpio_keys_button gpio_buttons[] = {
+	GPIO_KEY(KEY_ENTER,	GPIO_PORT99,	"SW1"),
+	GPIO_KEY(KEY_BACK,	GPIO_PORT100,	"SW2"),
+	GPIO_KEY(KEY_MENU,	GPIO_PORT97,	"SW3"),
+	GPIO_KEY(KEY_HOME,	GPIO_PORT98,	"SW4"),
+};
+
+static struct gpio_keys_platform_data gpio_key_info = {
+	.buttons	= gpio_buttons,
+	.nbuttons	= ARRAY_SIZE(gpio_buttons),
+};
+
+static struct platform_device gpio_keys_device = {
+	.name   = "gpio-keys",
+	.id     = -1,
+	.dev    = {
+		.platform_data  = &gpio_key_info,
+	},
+};
+
 /*
  * board devices
  */
 static struct platform_device *eva_devices[] __initdata = {
 	&lcdc0_device,
+	&gpio_keys_device,
 };
 
 /*
-- 
1.7.5.4


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

* Re: [PATCH 5/6] ARM: mach-shmobile: armadillo800eva: add support gpio_key
  2012-04-05  8:34 [PATCH 5/6] ARM: mach-shmobile: armadillo800eva: add support gpio_key Kuninori Morimoto
@ 2012-04-06  1:25 ` Simon Horman
  2012-04-06  5:21 ` Kuninori Morimoto
  2012-04-06  7:03 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2012-04-06  1:25 UTC (permalink / raw)
  To: linux-sh

Hi Morimoto-san,

I am seeing the following, is it expected?

gpio-keys gpio-keys: Unable to get irq number for GPIO 99, error -38
gpio-keys: probe of gpio-keys failed with error -38

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

* Re: [PATCH 5/6] ARM: mach-shmobile: armadillo800eva: add support gpio_key
  2012-04-05  8:34 [PATCH 5/6] ARM: mach-shmobile: armadillo800eva: add support gpio_key Kuninori Morimoto
  2012-04-06  1:25 ` Simon Horman
@ 2012-04-06  5:21 ` Kuninori Morimoto
  2012-04-06  7:03 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2012-04-06  5:21 UTC (permalink / raw)
  To: linux-sh


Hi Simon

Thank you for checking patch.

> I am seeing the following, is it expected?
> 
> gpio-keys gpio-keys: Unable to get irq number for GPIO 99, error -38
> gpio-keys: probe of gpio-keys failed with error -38

Sorry for confusion.
Yes. gpio-keys support needs +1 patch.

I expected it on [0/6] mail :)

------------------------------------------
#5 patch require R8A7740 .gipo_irq support patch which I posted this morning.
[PATCH] ARM: mach-shmobile: pfc-r8a7740: add .gpio_irq support
------------------------------------------

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH 5/6] ARM: mach-shmobile: armadillo800eva: add support gpio_key
  2012-04-05  8:34 [PATCH 5/6] ARM: mach-shmobile: armadillo800eva: add support gpio_key Kuninori Morimoto
  2012-04-06  1:25 ` Simon Horman
  2012-04-06  5:21 ` Kuninori Morimoto
@ 2012-04-06  7:03 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2012-04-06  7:03 UTC (permalink / raw)
  To: linux-sh

On Thu, Apr 05, 2012 at 10:21:47PM -0700, Kuninori Morimoto wrote:
> 
> Hi Simon
> 
> Thank you for checking patch.
> 
> > I am seeing the following, is it expected?
> > 
> > gpio-keys gpio-keys: Unable to get irq number for GPIO 99, error -38
> > gpio-keys: probe of gpio-keys failed with error -38
> 
> Sorry for confusion.
> Yes. gpio-keys support needs +1 patch.
> 
> I expected it on [0/6] mail :)

Sorry, I should have read that email more thoroughly.

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

end of thread, other threads:[~2012-04-06  7:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-05  8:34 [PATCH 5/6] ARM: mach-shmobile: armadillo800eva: add support gpio_key Kuninori Morimoto
2012-04-06  1:25 ` Simon Horman
2012-04-06  5:21 ` Kuninori Morimoto
2012-04-06  7:03 ` Simon Horman

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.