summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/board-mop500-keypads.c
diff options
context:
space:
mode:
authorSundar Iyer <sundar.iyer@stericsson.com>2010-12-03 20:35:38 +0530
committerLinus Walleij <linus.walleij@stericsson.com>2010-12-19 20:54:55 +0100
commit556fb03869ad4d14e5336093a7a8565456a26c21 (patch)
treec101cd16bcf442a82d2b5246b0c5409cd1b55313 /arch/arm/mach-ux500/board-mop500-keypads.c
parente43abe6f98641e40460d74a002f09c7751db48f9 (diff)
mach-ux500: add STMPE1601 platform data
Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com> [Minor fixups to GPIO enumerators] Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500-keypads.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500-keypads.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-keypads.c b/arch/arm/mach-ux500/board-mop500-keypads.c
index b634615b1381..8dbba03eb6c1 100644
--- a/arch/arm/mach-ux500/board-mop500-keypads.c
+++ b/arch/arm/mach-ux500/board-mop500-keypads.c
@@ -128,7 +128,39 @@ static struct ske_keypad_platform_data ske_keypad_board = {
.debounce_ms = 40, /* in millisecs */
};
+/*
+ * STMPE1601
+ */
+static struct stmpe_keypad_platform_data stmpe1601_keypad_data = {
+ .debounce_ms = 64,
+ .scan_count = 8,
+ .no_autorepeat = true,
+ .keymap_data = &mop500_keymap_data,
+};
+
+static struct stmpe_platform_data stmpe1601_data = {
+ .id = 1,
+ .blocks = STMPE_BLOCK_KEYPAD,
+ .irq_trigger = IRQF_TRIGGER_FALLING,
+ .irq_base = MOP500_STMPE1601_IRQ(0),
+ .keypad = &stmpe1601_keypad_data,
+ .autosleep = true,
+ .autosleep_timeout = 1024,
+};
+
+static struct i2c_board_info __initdata mop500_i2c0_devices_stuib[] = {
+ {
+ I2C_BOARD_INFO("stmpe1601", 0x40),
+ .irq = NOMADIK_GPIO_TO_IRQ(218),
+ .platform_data = &stmpe1601_data,
+ .flags = I2C_CLIENT_WAKE,
+ },
+};
+
void mop500_keypad_init(void)
{
db8500_add_ske_keypad(&ske_keypad_board);
+
+ i2c_register_board_info(0, mop500_i2c0_devices_stuib,
+ ARRAY_SIZE(mop500_i2c0_devices_stuib));
}