aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/board-mx51_3ds.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/board-mx51_3ds.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/board-mx51_3ds.c')
-rw-r--r--arch/arm/mach-mx5/board-mx51_3ds.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
index e42bd2eb034e..49d644842379 100644
--- a/arch/arm/mach-mx5/board-mx51_3ds.c
+++ b/arch/arm/mach-mx5/board-mx51_3ds.c
@@ -12,7 +12,6 @@
12 12
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/input/matrix_keypad.h>
16#include <linux/spi/spi.h> 15#include <linux/spi/spi.h>
17 16
18#include <asm/mach-types.h> 17#include <asm/mach-types.h>
@@ -120,14 +119,14 @@ static int mx51_3ds_board_keymap[] = {
120 KEY(3, 5, KEY_BACK) 119 KEY(3, 5, KEY_BACK)
121}; 120};
122 121
123static struct matrix_keymap_data mx51_3ds_map_data = { 122static const struct matrix_keymap_data mx51_3ds_map_data __initconst = {
124 .keymap = mx51_3ds_board_keymap, 123 .keymap = mx51_3ds_board_keymap,
125 .keymap_size = ARRAY_SIZE(mx51_3ds_board_keymap), 124 .keymap_size = ARRAY_SIZE(mx51_3ds_board_keymap),
126}; 125};
127 126
128static void mxc_init_keypad(void) 127static void mxc_init_keypad(void)
129{ 128{
130 mxc_register_device(&mxc_keypad_device, &mx51_3ds_map_data); 129 imx51_add_imx_keypad(&mx51_3ds_map_data);
131} 130}
132#else 131#else
133static inline void mxc_init_keypad(void) 132static inline void mxc_init_keypad(void)