summaryrefslogtreecommitdiff
path: root/arch/arm/mach-davinci/board-dm365-evm.c
diff options
context:
space:
mode:
authorMiguel Aguilar <miguel.aguilar@ridgerun.com>2009-10-13 13:57:07 -0600
committerKevin Hilman <khilman@deeprootsystems.com>2009-11-25 10:21:32 -0800
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 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand.h>
+#include <linux/input.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -34,6 +35,7 @@
#include <mach/serial.h>
#include <mach/mmc.h>
#include <mach/nand.h>
+#include <mach/keyscan.h>
static inline int have_imager(void)
{
@@ -190,6 +192,38 @@ static struct davinci_i2c_platform_data i2c_pdata = {
.bus_delay = 0 /* usec */,
};
+#ifdef CONFIG_KEYBOARD_DAVINCI
+static unsigned short dm365evm_keymap[] = {
+ KEY_KP2,
+ KEY_LEFT,
+ KEY_EXIT,
+ KEY_DOWN,
+ KEY_ENTER,
+ KEY_UP,
+ KEY_KP1,
+ KEY_RIGHT,
+ KEY_MENU,
+ KEY_RECORD,
+ KEY_REWIND,
+ KEY_KPMINUS,
+ KEY_STOP,
+ KEY_FASTFORWARD,
+ KEY_KPPLUS,
+ KEY_PLAYPAUSE,
+ 0
+};
+
+static struct davinci_ks_platform_data dm365evm_ks_data = {
+ .keymap = dm365evm_keymap,
+ .keymapsize = ARRAY_SIZE(dm365evm_keymap),
+ .rep = 1,
+ /* Scan period = strobe + interval */
+ .strobe = 0x5,
+ .interval = 0x2,
+ .matrix_type = DAVINCI_KEYSCAN_MATRIX_4X4,
+};
+#endif
+
static int cpld_mmc_get_cd(int module)
{
if (!cpld)
@@ -476,6 +510,10 @@ static __init void dm365_evm_init(void)
evm_init_cpld();
dm365_init_asp(&dm365_evm_snd_data);
+
+#ifdef CONFIG_KEYBOARD_DAVINCI
+ dm365_init_ks(&dm365evm_ks_data);
+#endif
}
static __init void dm365_evm_irq_init(void)