summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx37/mx37_3stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx37/mx37_3stack.c')
-rw-r--r--arch/arm/mach-mx37/mx37_3stack.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/arch/arm/mach-mx37/mx37_3stack.c b/arch/arm/mach-mx37/mx37_3stack.c
index 8ea8d38c9eb3..cc227a7829ad 100644
--- a/arch/arm/mach-mx37/mx37_3stack.c
+++ b/arch/arm/mach-mx37/mx37_3stack.c
@@ -38,7 +38,6 @@
#include <asm/setup.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
-#include <asm/mach/keypad.h>
#include <asm/arch/memory.h>
#include <asm/arch/gpio.h>
#include <asm/arch/mmc.h>
@@ -159,12 +158,39 @@ static struct mxc_lcd_platform_data lcd_data = {
.reset = lcd_reset,
};
+#if defined(CONFIG_KEYBOARD_MPR084) || defined(CONFIG_KEYBOARD_MPR084_MODULE)
+/*!
+ * These functions are used to configure and the GPIO pins for keypad to
+ * activate and deactivate it.
+ */
+extern void gpio_keypad_active(void);
+
+extern void gpio_keypad_inactive(void);
+
+static u16 keymap[] = {
+ KEY_DOWN, KEY_LEFT, KEY_ENTER,
+ KEY_RIGHT, KEY_UP, KEY_LEFTALT,
+ KEY_TAB, KEY_ESC,
+};
+
+static struct mxc_keyp_platform_data keypad_data = {
+ .matrix = keymap,
+ .active = gpio_keypad_active,
+ .inactive = gpio_keypad_inactive,
+};
+#endif
static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {
{
.driver_name = "TSC2007",
.addr = 0x48,
.irq = IOMUX_TO_IRQ(MX37_PIN_AUD5_RXFS),
},
+ {
+ .driver_name = "MPR084",
+ .addr = 0x5D,
+ .platform_data = &keypad_data,
+ .irq = IOMUX_TO_IRQ(MX37_PIN_GPIO1_3),
+ },
};
static struct spi_board_info mxc_spi_board_info[] __initdata = {