summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2010-12-01 11:11:47 -0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-01-12 14:50:45 +0100
commita5fcfef0b8db574098f2e42827117bc4accf2efd (patch)
treec7c2223b26ae5d37ef10203af2e781e51e43b0cf /arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
parent076762aa52de48688f6e1b6999fe58d736479f37 (diff)
downloadop-kernel-dev-a5fcfef0b8db574098f2e42827117bc4accf2efd.zip
op-kernel-dev-a5fcfef0b8db574098f2e42827117bc4accf2efd.tar.gz
ARM: mx5: dynamically allocate imx-keypad devices
Add support for dynamical allocation of imx-keypad on mx5 platform. After moving to dynamically registration of the keypad, the keypad clock name needs to change accordingly. The reason is that the original mx5 keypad platform_device id was 0, now we use id=-1 as per arch/arm/plat-mxc/devices/platform-imx-keypad.c. Tested keypad successfully on a MX51_3DS board. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c')
-rw-r--r--arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
index c96d018..e83ffad 100644
--- a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
+++ b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
@@ -21,7 +21,6 @@
#include <linux/fsl_devices.h>
#include <linux/i2c/tsc2007.h>
#include <linux/leds.h>
-#include <linux/input/matrix_keypad.h>
#include <mach/common.h>
#include <mach/hardware.h>
@@ -157,7 +156,7 @@ static int mbimx51_keymap[] = {
KEY(3, 3, KEY_ENTER),
};
-static struct matrix_keymap_data mbimx51_map_data = {
+static const struct matrix_keymap_data mbimx51_map_data __initconst = {
.keymap = mbimx51_keymap,
.keymap_size = ARRAY_SIZE(mbimx51_keymap),
};
@@ -209,7 +208,7 @@ void __init eukrea_mbimx51_baseboard_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices));
- mxc_register_device(&mxc_keypad_device, &mbimx51_map_data);
+ imx51_add_imx_keypad(&mbimx51_map_data);
gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq");
gpio_direction_input(MBIMX51_TSC2007_GPIO);
OpenPOWER on IntegriCloud