aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2010-12-01 08:11:47 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2011-01-12 08:50:45 -0500
commita5fcfef0b8db574098f2e42827117bc4accf2efd (patch)
treec7c2223b26ae5d37ef10203af2e781e51e43b0cf /arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
parent076762aa52de48688f6e1b6999fe58d736479f37 (diff)
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 c96d018ff8a2..e83ffadb65f8 100644
--- a/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
+++ b/arch/arm/mach-mx5/eukrea_mbimx51-baseboard.c
@@ -21,7 +21,6 @@
21#include <linux/fsl_devices.h> 21#include <linux/fsl_devices.h>
22#include <linux/i2c/tsc2007.h> 22#include <linux/i2c/tsc2007.h>
23#include <linux/leds.h> 23#include <linux/leds.h>
24#include <linux/input/matrix_keypad.h>
25 24
26#include <mach/common.h> 25#include <mach/common.h>
27#include <mach/hardware.h> 26#include <mach/hardware.h>
@@ -157,7 +156,7 @@ static int mbimx51_keymap[] = {
157 KEY(3, 3, KEY_ENTER), 156 KEY(3, 3, KEY_ENTER),
158}; 157};
159 158
160static struct matrix_keymap_data mbimx51_map_data = { 159static const struct matrix_keymap_data mbimx51_map_data __initconst = {
161 .keymap = mbimx51_keymap, 160 .keymap = mbimx51_keymap,
162 .keymap_size = ARRAY_SIZE(mbimx51_keymap), 161 .keymap_size = ARRAY_SIZE(mbimx51_keymap),
163}; 162};
@@ -209,7 +208,7 @@ void __init eukrea_mbimx51_baseboard_init(void)
209 208
210 platform_add_devices(devices, ARRAY_SIZE(devices)); 209 platform_add_devices(devices, ARRAY_SIZE(devices));
211 210
212 mxc_register_device(&mxc_keypad_device, &mbimx51_map_data); 211 imx51_add_imx_keypad(&mbimx51_map_data);
213 212
214 gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq"); 213 gpio_request(MBIMX51_TSC2007_GPIO, "tsc2007_irq");
215 gpio_direction_input(MBIMX51_TSC2007_GPIO); 214 gpio_direction_input(MBIMX51_TSC2007_GPIO);