aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-igep0020.c
diff options
context:
space:
mode:
authorEnric Balletbo i Serra <eballetbo@gmail.com>2011-01-10 08:26:14 -0500
committerTony Lindgren <tony@atomide.com>2011-01-10 17:33:19 -0500
commit18cbc7d94c1248fdc850ef6bac1cd8e22ef0738f (patch)
treefe02e2734d134d7e6787013d3418691038ab56e9 /arch/arm/mach-omap2/board-igep0020.c
parenta271c6cd209674118e5ec221de922bc59c0c9454 (diff)
omap3: igep2: Add keypad support
Support twl4030 keypad and gpio keys on IGEP v2. Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-igep0020.c')
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 0afa3011db0f..3a6cce5d3ff4 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -17,6 +17,7 @@
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/gpio.h> 18#include <linux/gpio.h>
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/input.h>
20 21
21#include <linux/regulator/machine.h> 22#include <linux/regulator/machine.h>
22#include <linux/regulator/fixed.h> 23#include <linux/regulator/fixed.h>
@@ -535,6 +536,37 @@ static struct twl4030_codec_data igep2_codec_data = {
535 .audio = &igep2_audio_data, 536 .audio = &igep2_audio_data,
536}; 537};
537 538
539static int igep2_keymap[] = {
540 KEY(0, 0, KEY_LEFT),
541 KEY(0, 1, KEY_RIGHT),
542 KEY(0, 2, KEY_A),
543 KEY(0, 3, KEY_B),
544 KEY(1, 0, KEY_DOWN),
545 KEY(1, 1, KEY_UP),
546 KEY(1, 2, KEY_E),
547 KEY(1, 3, KEY_F),
548 KEY(2, 0, KEY_ENTER),
549 KEY(2, 1, KEY_I),
550 KEY(2, 2, KEY_J),
551 KEY(2, 3, KEY_K),
552 KEY(3, 0, KEY_M),
553 KEY(3, 1, KEY_N),
554 KEY(3, 2, KEY_O),
555 KEY(3, 3, KEY_P)
556};
557
558static struct matrix_keymap_data igep2_keymap_data = {
559 .keymap = igep2_keymap,
560 .keymap_size = ARRAY_SIZE(igep2_keymap),
561};
562
563static struct twl4030_keypad_data igep2_keypad_pdata = {
564 .keymap_data = &igep2_keymap_data,
565 .rows = 4,
566 .cols = 4,
567 .rep = 1,
568};
569
538static struct twl4030_platform_data igep2_twldata = { 570static struct twl4030_platform_data igep2_twldata = {
539 .irq_base = TWL4030_IRQ_BASE, 571 .irq_base = TWL4030_IRQ_BASE,
540 .irq_end = TWL4030_IRQ_END, 572 .irq_end = TWL4030_IRQ_END,
@@ -543,6 +575,7 @@ static struct twl4030_platform_data igep2_twldata = {
543 .usb = &igep2_usb_data, 575 .usb = &igep2_usb_data,
544 .codec = &igep2_codec_data, 576 .codec = &igep2_codec_data,
545 .gpio = &igep2_twl4030_gpio_pdata, 577 .gpio = &igep2_twl4030_gpio_pdata,
578 .keypad = &igep2_keypad_pdata,
546 .vmmc1 = &igep2_vmmc1, 579 .vmmc1 = &igep2_vmmc1,
547 .vpll2 = &igep2_vpll2, 580 .vpll2 = &igep2_vpll2,
548 .vio = &igep2_vio, 581 .vio = &igep2_vio,