aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci
diff options
context:
space:
mode:
authorCyril Chemparathy <cyril@ti.com>2010-09-20 12:26:42 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2010-09-24 10:40:31 -0400
commita1b4440314edca8e2016f2819d4655453e6aff44 (patch)
treedeaa8dc72a5c1883995aeef80af601cdd44d4c35 /arch/arm/mach-davinci
parentd45b1ed4e47d2f585d2acdf5b957bfc5ff465aab (diff)
davinci: add keypad config for tnetv107x evm board
This patch adds evm board specific keymap definitions and controller configuration data for on-chip keypad controller on tnetv107x silicon. Signed-off-by: Cyril Chemparathy <cyril@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r--arch/arm/mach-davinci/board-tnetv107x-evm.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/board-tnetv107x-evm.c b/arch/arm/mach-davinci/board-tnetv107x-evm.c
index fe2a9d9c8bb7..5afa8fc48e7b 100644
--- a/arch/arm/mach-davinci/board-tnetv107x-evm.c
+++ b/arch/arm/mach-davinci/board-tnetv107x-evm.c
@@ -23,6 +23,9 @@
23#include <linux/ratelimit.h> 23#include <linux/ratelimit.h>
24#include <linux/mtd/mtd.h> 24#include <linux/mtd/mtd.h>
25#include <linux/mtd/partitions.h> 25#include <linux/mtd/partitions.h>
26#include <linux/input.h>
27#include <linux/input/matrix_keypad.h>
28
26#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
27#include <asm/mach-types.h> 30#include <asm/mach-types.h>
28 31
@@ -141,10 +144,63 @@ static struct davinci_uart_config serial_config __initconst = {
141 .enabled_uarts = BIT(1), 144 .enabled_uarts = BIT(1),
142}; 145};
143 146
147static const uint32_t keymap[] = {
148 KEY(0, 0, KEY_NUMERIC_1),
149 KEY(0, 1, KEY_NUMERIC_2),
150 KEY(0, 2, KEY_NUMERIC_3),
151 KEY(0, 3, KEY_FN_F1),
152 KEY(0, 4, KEY_MENU),
153
154 KEY(1, 0, KEY_NUMERIC_4),
155 KEY(1, 1, KEY_NUMERIC_5),
156 KEY(1, 2, KEY_NUMERIC_6),
157 KEY(1, 3, KEY_UP),
158 KEY(1, 4, KEY_FN_F2),
159
160 KEY(2, 0, KEY_NUMERIC_7),
161 KEY(2, 1, KEY_NUMERIC_8),
162 KEY(2, 2, KEY_NUMERIC_9),
163 KEY(2, 3, KEY_LEFT),
164 KEY(2, 4, KEY_ENTER),
165
166 KEY(3, 0, KEY_NUMERIC_STAR),
167 KEY(3, 1, KEY_NUMERIC_0),
168 KEY(3, 2, KEY_NUMERIC_POUND),
169 KEY(3, 3, KEY_DOWN),
170 KEY(3, 4, KEY_RIGHT),
171
172 KEY(4, 0, KEY_FN_F3),
173 KEY(4, 1, KEY_FN_F4),
174 KEY(4, 2, KEY_MUTE),
175 KEY(4, 3, KEY_HOME),
176 KEY(4, 4, KEY_BACK),
177
178 KEY(5, 0, KEY_VOLUMEDOWN),
179 KEY(5, 1, KEY_VOLUMEUP),
180 KEY(5, 2, KEY_F1),
181 KEY(5, 3, KEY_F2),
182 KEY(5, 4, KEY_F3),
183};
184
185static const struct matrix_keymap_data keymap_data = {
186 .keymap = keymap,
187 .keymap_size = ARRAY_SIZE(keymap),
188};
189
190static struct matrix_keypad_platform_data keypad_config = {
191 .keymap_data = &keymap_data,
192 .num_row_gpios = 6,
193 .num_col_gpios = 5,
194 .debounce_ms = 0, /* minimum */
195 .active_low = 0, /* pull up realization */
196 .no_autorepeat = 0,
197};
198
144static struct tnetv107x_device_info evm_device_info __initconst = { 199static struct tnetv107x_device_info evm_device_info __initconst = {
145 .serial_config = &serial_config, 200 .serial_config = &serial_config,
146 .mmc_config[1] = &mmc_config, /* controller 1 */ 201 .mmc_config[1] = &mmc_config, /* controller 1 */
147 .nand_config[0] = &nand_config, /* chip select 0 */ 202 .nand_config[0] = &nand_config, /* chip select 0 */
203 .keypad_config = &keypad_config,
148}; 204};
149 205
150static __init void tnetv107x_evm_board_init(void) 206static __init void tnetv107x_evm_board_init(void)