aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-10-13 09:14:26 +0530
committerTushar Behera <tushar.behera@linaro.org>2013-03-14 10:46:13 +0530
commitd02316b705e5501d032e0a356b26fd13b081f302 (patch)
tree849292312c52ffb020d103214613b950fb6a5d9e /arch
parent8f49272201760a68795072930a48565f54d56ec6 (diff)
ARM: EXYNOS: Add keypad support on Origen quad
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-exynos/Kconfig6
-rw-r--r--arch/arm/mach-exynos/mach-origen_quad.c21
2 files changed, 25 insertions, 2 deletions
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index da8562324906..5d5691bfeca9 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -421,15 +421,17 @@ config MACH_ORIGEN_QUAD
select S5P_DEV_FIMD0
select S5P_DEV_MFC
select S5P_DEV_TV
- select SAMSUNG_DEV_BACKLIGHT
- select SAMSUNG_DEV_PWM
select EXYNOS_DEV_DMA
select EXYNOS_DEV_DRM
+ select SAMSUNG_DEV_BACKLIGHT
+ select SAMSUNG_DEV_KEYPAD
+ select SAMSUNG_DEV_PWM
select EXYNOS4_SETUP_FIMD0
select EXYNOS4_SETUP_I2C1
select EXYNOS4_SETUP_I2C2
select EXYNOS4_SETUP_I2C3
select EXYNOS4_SETUP_I2C4
+ select EXYNOS4_SETUP_KEYPAD
select EXYNOS4_SETUP_SDHCI
select S5P_DEV_I2C_HDMIPHY
select S3C24XX_PWM
diff --git a/arch/arm/mach-exynos/mach-origen_quad.c b/arch/arm/mach-exynos/mach-origen_quad.c
index 86169e3e8a58..c109aadeb64c 100644
--- a/arch/arm/mach-exynos/mach-origen_quad.c
+++ b/arch/arm/mach-exynos/mach-origen_quad.c
@@ -37,6 +37,7 @@
#include <plat/devs.h>
#include <plat/fb.h>
#include <plat/gpio-cfg.h>
+#include <plat/keypad.h>
#include <plat/mfc.h>
#include <linux/platform_data/i2c-s3c2410.h>
#include <plat/regs-serial.h>
@@ -680,6 +681,23 @@ static struct s3c_fb_platdata origen_quad_lcd_pdata __initdata = {
};
#endif
+static uint32_t origen_quad_keymap[] __initdata = {
+ KEY(0, 0, KEY_HOME), KEY(0, 1, KEY_DOWN),
+ KEY(1, 0, KEY_UP), KEY(1, 1, KEY_MENU),
+ KEY(2, 0, KEY_BACK), KEY(2, 1, KEY_ENTER)
+};
+
+static struct matrix_keymap_data origen_quad_keymap_data __initdata = {
+ .keymap = origen_quad_keymap,
+ .keymap_size = ARRAY_SIZE(origen_quad_keymap),
+};
+
+static struct samsung_keypad_platdata origen_quad_keypad_data __initdata = {
+ .keymap_data = &origen_quad_keymap_data,
+ .rows = 3,
+ .cols = 2,
+};
+
static struct platform_device *origen_quad_devices[] __initdata = {
&s3c_device_wdt,
&s3c_device_rtc,
@@ -699,6 +717,7 @@ static struct platform_device *origen_quad_devices[] __initdata = {
&exynos_device_drm,
#endif
&origen_quad_lcd_hv070wsa,
+ &samsung_device_keypad,
};
/* LCD Backlight data */
@@ -769,6 +788,8 @@ static void __init origen_quad_machine_init(void)
pwm_add_table(origen_quad_pwm_lookup, ARRAY_SIZE(origen_quad_pwm_lookup));
samsung_bl_set(&origen_quad_bl_gpio_info, &origen_quad_bl_data);
+ samsung_keypad_set_platdata(&origen_quad_keypad_data);
+
platform_add_devices(origen_quad_devices, ARRAY_SIZE(origen_quad_devices));
}