Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226096
b: refs/heads/master
c: fcbd0c5
h: refs/heads/master
v: v3
  • Loading branch information
Arnaud Patard (Rtp) authored and Sascha Hauer committed Nov 24, 2010
1 parent cd73de6 commit e2f1704
Show file tree
Hide file tree
Showing 2 changed files with 25 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: 9d2c0ef76f429c038de27e1b734d65a67dbc8088
refs/heads/master: fcbd0c5f20918c6db0c72d4e7546880833713f9c
24 changes: 24 additions & 0 deletions trunk/arch/arm/mach-mx5/board-mx51_efikamx.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/i2c.h>
#include <linux/gpio.h>
#include <linux/leds.h>
#include <linux/input.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/fsl_devices.h>
Expand Down Expand Up @@ -48,10 +49,13 @@
#define EFIKAMX_GREEN_LED (2*32 + 14)
#define EFIKAMX_RED_LED (2*32 + 15)

#define EFIKAMX_POWER_KEY (1*32 + 31)

/* the pci ids pin have pull up. they're driven low according to board id */
#define MX51_PAD_PCBID0 IOMUX_PAD(0x518, 0x130, 3, 0x0, 0, PAD_CTL_PUS_100K_UP)
#define MX51_PAD_PCBID1 IOMUX_PAD(0x51C, 0x134, 3, 0x0, 0, PAD_CTL_PUS_100K_UP)
#define MX51_PAD_PCBID2 IOMUX_PAD(0x504, 0x128, 3, 0x0, 0, PAD_CTL_PUS_100K_UP)
#define MX51_PAD_PWRKEY IOMUX_PAD(0x48c, 0x0f8, 1, 0x0, 0, PAD_CTL_PUS_100K_UP | PAD_CTL_PKE)

static iomux_v3_cfg_t mx51efikamx_pads[] = {
/* UART1 */
Expand Down Expand Up @@ -90,6 +94,9 @@ static iomux_v3_cfg_t mx51efikamx_pads[] = {
MX51_PAD_CSI1_D9__GPIO_3_13,
MX51_PAD_CSI1_VSYNC__GPIO_3_14,
MX51_PAD_CSI1_HSYNC__GPIO_3_15,

/* power key */
MX51_PAD_PWRKEY,
};

/* Serial ports */
Expand Down Expand Up @@ -219,6 +226,22 @@ static struct platform_device mx51_efikamx_leds_device = {
},
};

static struct gpio_keys_button mx51_efikamx_powerkey[] = {
{
.code = KEY_POWER,
.gpio = EFIKAMX_POWER_KEY,
.type = EV_PWR,
.desc = "Power Button (CM)",
.wakeup = 1,
.debounce_interval = 10, /* ms */
},
};

static const struct gpio_keys_platform_data mx51_efikamx_powerkey_data __initconst = {
.buttons = mx51_efikamx_powerkey,
.nbuttons = ARRAY_SIZE(mx51_efikamx_powerkey),
};

static void __init mxc_board_init(void)
{
mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads,
Expand All @@ -235,6 +258,7 @@ static void __init mxc_board_init(void)
}

platform_device_register(&mx51_efikamx_leds_device);
imx51_add_gpio_keys(&mx51_efikamx_powerkey_data);
}

static void __init mx51_efikamx_timer_init(void)
Expand Down

0 comments on commit e2f1704

Please sign in to comment.