提交 18cbc7d9 编写于 作者: E Enric Balletbo i Serra 提交者: Tony Lindgren

omap3: igep2: Add keypad support

Support twl4030 keypad and gpio keys on IGEP v2.
Signed-off-by: NEnric Balletbo i Serra <eballetbo@gmail.com>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 a271c6cd
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/regulator/machine.h> #include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h> #include <linux/regulator/fixed.h>
...@@ -535,6 +536,37 @@ static struct twl4030_codec_data igep2_codec_data = { ...@@ -535,6 +536,37 @@ static struct twl4030_codec_data igep2_codec_data = {
.audio = &igep2_audio_data, .audio = &igep2_audio_data,
}; };
static int igep2_keymap[] = {
KEY(0, 0, KEY_LEFT),
KEY(0, 1, KEY_RIGHT),
KEY(0, 2, KEY_A),
KEY(0, 3, KEY_B),
KEY(1, 0, KEY_DOWN),
KEY(1, 1, KEY_UP),
KEY(1, 2, KEY_E),
KEY(1, 3, KEY_F),
KEY(2, 0, KEY_ENTER),
KEY(2, 1, KEY_I),
KEY(2, 2, KEY_J),
KEY(2, 3, KEY_K),
KEY(3, 0, KEY_M),
KEY(3, 1, KEY_N),
KEY(3, 2, KEY_O),
KEY(3, 3, KEY_P)
};
static struct matrix_keymap_data igep2_keymap_data = {
.keymap = igep2_keymap,
.keymap_size = ARRAY_SIZE(igep2_keymap),
};
static struct twl4030_keypad_data igep2_keypad_pdata = {
.keymap_data = &igep2_keymap_data,
.rows = 4,
.cols = 4,
.rep = 1,
};
static struct twl4030_platform_data igep2_twldata = { static struct twl4030_platform_data igep2_twldata = {
.irq_base = TWL4030_IRQ_BASE, .irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END, .irq_end = TWL4030_IRQ_END,
...@@ -543,6 +575,7 @@ static struct twl4030_platform_data igep2_twldata = { ...@@ -543,6 +575,7 @@ static struct twl4030_platform_data igep2_twldata = {
.usb = &igep2_usb_data, .usb = &igep2_usb_data,
.codec = &igep2_codec_data, .codec = &igep2_codec_data,
.gpio = &igep2_twl4030_gpio_pdata, .gpio = &igep2_twl4030_gpio_pdata,
.keypad = &igep2_keypad_pdata,
.vmmc1 = &igep2_vmmc1, .vmmc1 = &igep2_vmmc1,
.vpll2 = &igep2_vpll2, .vpll2 = &igep2_vpll2,
.vio = &igep2_vio, .vio = &igep2_vio,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册