mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-30 12:49:36 +00:00
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>
This commit is contained in:
parent
a271c6cd20
commit
18cbc7d94c
1 changed files with 33 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/regulator/fixed.h>
|
||||
|
@ -535,6 +536,37 @@ static struct twl4030_codec_data igep2_codec_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 = {
|
||||
.irq_base = TWL4030_IRQ_BASE,
|
||||
.irq_end = TWL4030_IRQ_END,
|
||||
|
@ -543,6 +575,7 @@ static struct twl4030_platform_data igep2_twldata = {
|
|||
.usb = &igep2_usb_data,
|
||||
.codec = &igep2_codec_data,
|
||||
.gpio = &igep2_twl4030_gpio_pdata,
|
||||
.keypad = &igep2_keypad_pdata,
|
||||
.vmmc1 = &igep2_vmmc1,
|
||||
.vpll2 = &igep2_vpll2,
|
||||
.vio = &igep2_vio,
|
||||
|
|
Loading…
Reference in a new issue