aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc
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/plat-mxc
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/plat-mxc')
-rw-r--r--arch/arm/plat-mxc/devices/platform-imx-keypad.c5
-rw-r--r--arch/arm/plat-mxc/include/mach/mx51.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-imx-keypad.c b/arch/arm/plat-mxc/devices/platform-imx-keypad.c
index 40238f0b8643..26366114b021 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-keypad.c
+++ b/arch/arm/plat-mxc/devices/platform-imx-keypad.c
@@ -41,6 +41,11 @@ const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst =
41 imx_imx_keypad_data_entry_single(MX35, SZ_16); 41 imx_imx_keypad_data_entry_single(MX35, SZ_16);
42#endif /* ifdef CONFIG_SOC_IMX35 */ 42#endif /* ifdef CONFIG_SOC_IMX35 */
43 43
44#ifdef CONFIG_SOC_IMX51
45const struct imx_imx_keypad_data imx51_imx_keypad_data __initconst =
46 imx_imx_keypad_data_entry_single(MX51, SZ_16);
47#endif /* ifdef CONFIG_SOC_IMX51 */
48
44struct platform_device *__init imx_add_imx_keypad( 49struct platform_device *__init imx_add_imx_keypad(
45 const struct imx_imx_keypad_data *data, 50 const struct imx_imx_keypad_data *data,
46 const struct matrix_keymap_data *pdata) 51 const struct matrix_keymap_data *pdata)
diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-mxc/include/mach/mx51.h
index ec9ae5afa09a..1eb339e6c857 100644
--- a/arch/arm/plat-mxc/include/mach/mx51.h
+++ b/arch/arm/plat-mxc/include/mach/mx51.h
@@ -301,7 +301,7 @@
301#define MX51_MXC_INT_GPIO4_HIGH 57 301#define MX51_MXC_INT_GPIO4_HIGH 57
302#define MX51_MXC_INT_WDOG1 58 302#define MX51_MXC_INT_WDOG1 58
303#define MX51_MXC_INT_WDOG2 59 303#define MX51_MXC_INT_WDOG2 59
304#define MX51_MXC_INT_KPP 60 304#define MX51_INT_KPP 60
305#define MX51_INT_PWM1 61 305#define MX51_INT_PWM1 61
306#define MX51_INT_I2C1 62 306#define MX51_INT_I2C1 62
307#define MX51_INT_I2C2 63 307#define MX51_INT_I2C2 63