aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/board-dm365-evm.c
diff options
context:
space:
mode:
authorMiguel Aguilar <miguel.aguilar@ridgerun.com>2009-10-13 15:57:07 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-11-25 13:21:32 -0500
commit990c09d5f5b2079e8bf3c6615c78fa5ed2b97147 (patch)
tree3f1bd62c06d7cdf354a6e0ea34325e8f60853c06 /arch/arm/mach-davinci/board-dm365-evm.c
parent1ce52121c415457e92c281aaec4b38a864278fa2 (diff)
Davinci: DM365: Enable DaVinci Key Scan support for DM365 EVM
The general structures are defined at DM365 SoC file and the specific platform data structure for the EVM is defined at board file. Signed-off-by: Miguel Aguilar <miguel.aguilar@ridgerun.com>
Diffstat (limited to 'arch/arm/mach-davinci/board-dm365-evm.c')
-rw-r--r--arch/arm/mach-davinci/board-dm365-evm.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
index 3d7b5bbeb97d..19678dc91b09 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -23,6 +23,7 @@
23#include <linux/mtd/mtd.h> 23#include <linux/mtd/mtd.h>
24#include <linux/mtd/partitions.h> 24#include <linux/mtd/partitions.h>
25#include <linux/mtd/nand.h> 25#include <linux/mtd/nand.h>
26#include <linux/input.h>
26 27
27#include <asm/mach-types.h> 28#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
@@ -34,6 +35,7 @@
34#include <mach/serial.h> 35#include <mach/serial.h>
35#include <mach/mmc.h> 36#include <mach/mmc.h>
36#include <mach/nand.h> 37#include <mach/nand.h>
38#include <mach/keyscan.h>
37 39
38static inline int have_imager(void) 40static inline int have_imager(void)
39{ 41{
@@ -190,6 +192,38 @@ static struct davinci_i2c_platform_data i2c_pdata = {
190 .bus_delay = 0 /* usec */, 192 .bus_delay = 0 /* usec */,
191}; 193};
192 194
195#ifdef CONFIG_KEYBOARD_DAVINCI
196static unsigned short dm365evm_keymap[] = {
197 KEY_KP2,
198 KEY_LEFT,
199 KEY_EXIT,
200 KEY_DOWN,
201 KEY_ENTER,
202 KEY_UP,
203 KEY_KP1,
204 KEY_RIGHT,
205 KEY_MENU,
206 KEY_RECORD,
207 KEY_REWIND,
208 KEY_KPMINUS,
209 KEY_STOP,
210 KEY_FASTFORWARD,
211 KEY_KPPLUS,
212 KEY_PLAYPAUSE,
213 0
214};
215
216static struct davinci_ks_platform_data dm365evm_ks_data = {
217 .keymap = dm365evm_keymap,
218 .keymapsize = ARRAY_SIZE(dm365evm_keymap),
219 .rep = 1,
220 /* Scan period = strobe + interval */
221 .strobe = 0x5,
222 .interval = 0x2,
223 .matrix_type = DAVINCI_KEYSCAN_MATRIX_4X4,
224};
225#endif
226
193static int cpld_mmc_get_cd(int module) 227static int cpld_mmc_get_cd(int module)
194{ 228{
195 if (!cpld) 229 if (!cpld)
@@ -476,6 +510,10 @@ static __init void dm365_evm_init(void)
476 evm_init_cpld(); 510 evm_init_cpld();
477 511
478 dm365_init_asp(&dm365_evm_snd_data); 512 dm365_init_asp(&dm365_evm_snd_data);
513
514#ifdef CONFIG_KEYBOARD_DAVINCI
515 dm365_init_ks(&dm365evm_ks_data);
516#endif
479} 517}
480 518
481static __init void dm365_evm_irq_init(void) 519static __init void dm365_evm_irq_init(void)