aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/board-mop500-keypads.c
diff options
context:
space:
mode:
authorSundar Iyer <sundar.iyer@stericsson.com>2010-12-03 10:05:38 -0500
committerLinus Walleij <linus.walleij@stericsson.com>2010-12-19 14:54:55 -0500
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 = {
128 .debounce_ms = 40, /* in millisecs */ 128 .debounce_ms = 40, /* in millisecs */
129}; 129};
130 130
131/*
132 * STMPE1601
133 */
134static struct stmpe_keypad_platform_data stmpe1601_keypad_data = {
135 .debounce_ms = 64,
136 .scan_count = 8,
137 .no_autorepeat = true,
138 .keymap_data = &mop500_keymap_data,
139};
140
141static struct stmpe_platform_data stmpe1601_data = {
142 .id = 1,
143 .blocks = STMPE_BLOCK_KEYPAD,
144 .irq_trigger = IRQF_TRIGGER_FALLING,
145 .irq_base = MOP500_STMPE1601_IRQ(0),
146 .keypad = &stmpe1601_keypad_data,
147 .autosleep = true,
148 .autosleep_timeout = 1024,
149};
150
151static struct i2c_board_info __initdata mop500_i2c0_devices_stuib[] = {
152 {
153 I2C_BOARD_INFO("stmpe1601", 0x40),
154 .irq = NOMADIK_GPIO_TO_IRQ(218),
155 .platform_data = &stmpe1601_data,
156 .flags = I2C_CLIENT_WAKE,
157 },
158};
159
131void mop500_keypad_init(void) 160void mop500_keypad_init(void)
132{ 161{
133 db8500_add_ske_keypad(&ske_keypad_board); 162 db8500_add_ske_keypad(&ske_keypad_board);
163
164 i2c_register_board_info(0, mop500_i2c0_devices_stuib,
165 ARRAY_SIZE(mop500_i2c0_devices_stuib));
134} 166}