From c817a14003b25e5beb16a798e39a1bad9f2229cd Mon Sep 17 00:00:00 2001 From: Christian Kapeller Date: Mon, 16 Jul 2012 13:40:30 +0200 Subject: input: add i.MX51 platform code for matrix keypad driver Signed-off-by: Sascha Hauer --- arch/arm/mach-imx/devices.c | 5 +++++ arch/arm/mach-imx/include/mach/devices-imx51.h | 4 ++++ arch/arm/mach-imx/include/mach/devices.h | 2 ++ 3 files changed, 11 insertions(+) (limited to 'arch/arm/mach-imx') diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c index 6cd50f31f5..8120f56828 100644 --- a/arch/arm/mach-imx/devices.c +++ b/arch/arm/mach-imx/devices.c @@ -52,3 +52,8 @@ struct device_d *imx_add_esdhc(void *base, int id, struct esdhc_platform_data *p { return imx_add_device("imx-esdhc", id, base, 0x1000, pdata); } + +struct device_d *imx_add_kpp(void *base, struct matrix_keymap_data *pdata) +{ + return imx_add_device("imx-kpp", -1, base, 0x1000, pdata); +} diff --git a/arch/arm/mach-imx/include/mach/devices-imx51.h b/arch/arm/mach-imx/include/mach/devices-imx51.h index dbf58622c9..3d7ff72315 100644 --- a/arch/arm/mach-imx/include/mach/devices-imx51.h +++ b/arch/arm/mach-imx/include/mach/devices-imx51.h @@ -89,3 +89,7 @@ static inline struct device_d *imx51_add_nand(struct imx_nand_platform_data *pda return dev; } +static inline struct device_d *imx51_add_kpp(struct matrix_keymap_data *pdata) +{ + return imx_add_kpp((void *)MX51_KPP_BASE_ADDR, pdata); +} diff --git a/arch/arm/mach-imx/include/mach/devices.h b/arch/arm/mach-imx/include/mach/devices.h index f0f730a3c5..da9164616e 100644 --- a/arch/arm/mach-imx/include/mach/devices.h +++ b/arch/arm/mach-imx/include/mach/devices.h @@ -1,5 +1,6 @@ #include +#include #include #include #include @@ -16,4 +17,5 @@ struct device_d *imx_add_fb(void *base, struct imx_fb_platform_data *pdata); struct device_d *imx_add_ipufb(void *base, struct imx_ipu_fb_platform_data *pdata); struct device_d *imx_add_mmc(void *base, int id, void *pdata); struct device_d *imx_add_esdhc(void *base, int id, struct esdhc_platform_data *pdata); +struct device_d *imx_add_kpp(void *base, struct matrix_keymap_data *pdata); -- cgit v1.2.3