Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303481
b: refs/heads/master
c: f7e7d31
h: refs/heads/master
i:
  303479: 8070bae
v: v3
  • Loading branch information
Kuninori Morimoto authored and Rafael J. Wysocki committed May 12, 2012
1 parent 0f6ffb7 commit 9824196
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dad29d1c29b7a8699403e45822065d979309f756
refs/heads/master: f7e7d31a1299e11be780f8e2d235570792849e31
26 changes: 26 additions & 0 deletions trunk/arch/arm/mach-shmobile/board-armadillo800eva.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/kernel.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 <mach/irqs.h>
Expand Down Expand Up @@ -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,
};

/*
Expand Down

0 comments on commit 9824196

Please sign in to comment.