From 98241960002524a15dc54d4bb45c9673f78b2cdd Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Fri, 6 Apr 2012 01:31:33 -0700 Subject: [PATCH] --- yaml --- r: 303481 b: refs/heads/master c: f7e7d31a1299e11be780f8e2d235570792849e31 h: refs/heads/master i: 303479: 8070bae4fd31098988baee936b25cfa02e599929 v: v3 --- [refs] | 2 +- .../arm/mach-shmobile/board-armadillo800eva.c | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4e4829a3517a..ec2cfb2ff0e1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dad29d1c29b7a8699403e45822065d979309f756 +refs/heads/master: f7e7d31a1299e11be780f8e2d235570792849e31 diff --git a/trunk/arch/arm/mach-shmobile/board-armadillo800eva.c b/trunk/arch/arm/mach-shmobile/board-armadillo800eva.c index 5cc17a89f600..0bce9b88b9c2 100644 --- a/trunk/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/trunk/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -22,8 +22,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -149,11 +151,35 @@ static struct platform_device lcdc0_device = { }, }; +/* 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_POWER, 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, }; /*