Commit c92b29ec authored by Miguel Aguilar's avatar Miguel Aguilar Committed by Kevin Hilman

DaVinci: DM365: Add the device_enable for the DaVinci Keyscan

Adds the device_enable function to the DaVinci Keyscan platform data
to setup the PINMUX configuration.

It also removes #ifdef from the DM365 EVM board in order to load it
properly as a module.
Signed-off-by: default avatarMiguel Aguilar <miguel.aguilar@ridgerun.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent ae88e05a
...@@ -192,7 +192,11 @@ static struct davinci_i2c_platform_data i2c_pdata = { ...@@ -192,7 +192,11 @@ static struct davinci_i2c_platform_data i2c_pdata = {
.bus_delay = 0 /* usec */, .bus_delay = 0 /* usec */,
}; };
#ifdef CONFIG_KEYBOARD_DAVINCI static int dm365evm_keyscan_enable(struct device *dev)
{
return davinci_cfg_reg(DM365_KEYSCAN);
}
static unsigned short dm365evm_keymap[] = { static unsigned short dm365evm_keymap[] = {
KEY_KP2, KEY_KP2,
KEY_LEFT, KEY_LEFT,
...@@ -214,6 +218,7 @@ static unsigned short dm365evm_keymap[] = { ...@@ -214,6 +218,7 @@ static unsigned short dm365evm_keymap[] = {
}; };
static struct davinci_ks_platform_data dm365evm_ks_data = { static struct davinci_ks_platform_data dm365evm_ks_data = {
.device_enable = dm365evm_keyscan_enable,
.keymap = dm365evm_keymap, .keymap = dm365evm_keymap,
.keymapsize = ARRAY_SIZE(dm365evm_keymap), .keymapsize = ARRAY_SIZE(dm365evm_keymap),
.rep = 1, .rep = 1,
...@@ -222,7 +227,6 @@ static struct davinci_ks_platform_data dm365evm_ks_data = { ...@@ -222,7 +227,6 @@ static struct davinci_ks_platform_data dm365evm_ks_data = {
.interval = 0x2, .interval = 0x2,
.matrix_type = DAVINCI_KEYSCAN_MATRIX_4X4, .matrix_type = DAVINCI_KEYSCAN_MATRIX_4X4,
}; };
#endif
static int cpld_mmc_get_cd(int module) static int cpld_mmc_get_cd(int module)
{ {
...@@ -511,10 +515,7 @@ static __init void dm365_evm_init(void) ...@@ -511,10 +515,7 @@ static __init void dm365_evm_init(void)
dm365_init_asp(&dm365_evm_snd_data); dm365_init_asp(&dm365_evm_snd_data);
dm365_init_rtc(); dm365_init_rtc();
#ifdef CONFIG_KEYBOARD_DAVINCI
dm365_init_ks(&dm365evm_ks_data); dm365_init_ks(&dm365evm_ks_data);
#endif
} }
static __init void dm365_evm_irq_init(void) static __init void dm365_evm_irq_init(void)
......
...@@ -993,7 +993,6 @@ void __init dm365_init_asp(struct snd_platform_data *pdata) ...@@ -993,7 +993,6 @@ void __init dm365_init_asp(struct snd_platform_data *pdata)
void __init dm365_init_ks(struct davinci_ks_platform_data *pdata) void __init dm365_init_ks(struct davinci_ks_platform_data *pdata)
{ {
davinci_cfg_reg(DM365_KEYSCAN);
dm365_ks_device.dev.platform_data = pdata; dm365_ks_device.dev.platform_data = pdata;
platform_device_register(&dm365_ks_device); platform_device_register(&dm365_ks_device);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment