diff options
author | Eric Bénard <eric@eukrea.com> | 2010-05-19 18:46:07 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-07-26 14:17:50 +0200 |
commit | 5203b99c14fef139e5a61ed7cb1105aaa306df45 (patch) | |
tree | 786a2e81872953e99cd3fb164da4d9b9ab9c0118 | |
parent | 0896a9e5ed2616e2c41d3bd9cbb265251fbc733a (diff) |
eukrea_mbimx27: add support for the keyboard
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c b/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c index 3bb94e84efc..34bdc26a75b 100644 --- a/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-mx2/eukrea_mbimx27-baseboard.c @@ -26,6 +26,7 @@ #include <linux/spi/ads7846.h> #include <linux/backlight.h> #include <video/platform_lcd.h> +#include <linux/input/matrix_keypad.h> #include <asm/mach/arch.h> @@ -94,6 +95,18 @@ static int eukrea_mbimx27_pins[] = { PD31_PF_CSPI1_MOSI, }; +static const uint32_t eukrea_mbimx27_keymap[] = { + KEY(0, 0, KEY_UP), + KEY(0, 1, KEY_DOWN), + KEY(1, 0, KEY_RIGHT), + KEY(1, 1, KEY_LEFT), +}; + +static struct matrix_keymap_data eukrea_mbimx27_keymap_data = { + .keymap = eukrea_mbimx27_keymap, + .keymap_size = ARRAY_SIZE(eukrea_mbimx27_keymap), +}; + static struct gpio_led gpio_leds[] = { { .name = "led1", @@ -337,5 +350,7 @@ void __init eukrea_mbimx27_baseboard_init(void) gpio_request(GPIO_PORTA | 25, "lcd_enable"); platform_device_register(&eukrea_mbimx27_lcd_powerdev); + mxc_register_device(&imx_kpp_device, &eukrea_mbimx27_keymap_data); + platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); } |