Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172453
b: refs/heads/master
c: e33c049
h: refs/heads/master
i:
  172451: 00c278e
v: v3
  • Loading branch information
Alberto Panizzo authored and Sascha Hauer committed Nov 14, 2009
1 parent 826b89a commit af225e2
Show file tree
Hide file tree
Showing 2 changed files with 34 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: 115b40c3d7d18d0cb48b4ba306807cc04f259316
refs/heads/master: e33c049cb540602a2554264652e2c717ab7f5ec3
33 changes: 33 additions & 0 deletions trunk/arch/arm/mach-mx3/armadillo5x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include <linux/irq.h>
#include <linux/mtd/physmap.h>
#include <linux/io.h>
#include <linux/input.h>
#include <linux/gpio_keys.h>

#include <mach/hardware.h>
#include <asm/mach-types.h>
Expand Down Expand Up @@ -98,6 +100,36 @@ static int armadillo5x0_pins[] = {
MX31_PIN_DRDY0__DRDY0,
IOMUX_MODE(MX31_PIN_LCS1, IOMUX_CONFIG_GPIO), /*ADV7125_PSAVE*/
};
/* GPIO BUTTONS */
static struct gpio_keys_button armadillo5x0_buttons[] = {
{
.code = KEY_ENTER, /*28*/
.gpio = IOMUX_TO_GPIO(MX31_PIN_SCLK0),
.active_low = 1,
.desc = "menu",
.wakeup = 1,
}, {
.code = KEY_BACK, /*158*/
.gpio = IOMUX_TO_GPIO(MX31_PIN_SRST0),
.active_low = 1,
.desc = "back",
.wakeup = 1,
}
};

static struct gpio_keys_platform_data armadillo5x0_button_data = {
.buttons = armadillo5x0_buttons,
.nbuttons = ARRAY_SIZE(armadillo5x0_buttons),
};

static struct platform_device armadillo5x0_button_device = {
.name = "gpio-keys",
.id = -1,
.num_resources = 0,
.dev = {
.platform_data = &armadillo5x0_button_data,
}
};

/*
* NAND Flash
Expand Down Expand Up @@ -300,6 +332,7 @@ static struct imxuart_platform_data uart_pdata = {

static struct platform_device *devices[] __initdata = {
&armadillo5x0_smc911x_device,
&armadillo5x0_button_device,
};

/*
Expand Down

0 comments on commit af225e2

Please sign in to comment.