summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJoonyoung Shim <jy0922.shim@samsung.com>2010-09-09 08:17:43 +0900
committerKukjin Kim <kgene.kim@samsung.com>2010-10-21 07:52:17 +0900
commit2a5555822ea83d583b46437cff6829eec0166475 (patch)
tree7c99db91c3b00a809ee7f9aee6e7178efb36033e /arch
parent8f3b9cff23ed15c1ef2f4e60c677f3c7d5e535ce (diff)
downloadtalos-obmc-linux-2a5555822ea83d583b46437cff6829eec0166475.tar.gz
talos-obmc-linux-2a5555822ea83d583b46437cff6829eec0166475.zip
ARM: S5PV210: Add keypad device to the GONI board
This patch is to support keypad device to the GONI board. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s5pv210/Kconfig2
-rw-r--r--arch/arm/mach-s5pv210/mach-goni.c27
2 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index 5315fec3db86..b46925bbad6c 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -84,7 +84,9 @@ config MACH_GONI
select S3C_DEV_HSMMC1
select S3C_DEV_HSMMC2
select S5P_DEV_ONENAND
+ select SAMSUNG_DEV_KEYPAD
select S5PV210_SETUP_FB_24BPP
+ select S5PV210_SETUP_KEYPAD
select S5PV210_SETUP_SDHCI
help
Machine support for Samsung GONI board
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index fdc5cca4eb41..d9fe739412fd 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -35,6 +35,7 @@
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/fb.h>
+#include <plat/keypad.h>
#include <plat/sdhci.h>
/* Following are default values for UCON, ULCON and UFCON UART registers */
@@ -111,6 +112,28 @@ static struct s3c_fb_platdata goni_lcd_pdata __initdata = {
.setup_gpio = s5pv210_fb_gpio_setup_24bpp,
};
+/* KEYPAD */
+static uint32_t keymap[] __initdata = {
+ /* KEY(row, col, keycode) */
+ KEY(0, 1, KEY_MENU), /* Send */
+ KEY(0, 2, KEY_BACK), /* End */
+ KEY(1, 1, KEY_CONFIG), /* Half shot */
+ KEY(1, 2, KEY_VOLUMEUP),
+ KEY(2, 1, KEY_CAMERA), /* Full shot */
+ KEY(2, 2, KEY_VOLUMEDOWN),
+};
+
+static struct matrix_keymap_data keymap_data __initdata = {
+ .keymap = keymap,
+ .keymap_size = ARRAY_SIZE(keymap),
+};
+
+static struct samsung_keypad_platdata keypad_data __initdata = {
+ .keymap_data = &keymap_data,
+ .rows = 3,
+ .cols = 3,
+};
+
/* MAX8998 regulators */
#if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
@@ -465,6 +488,7 @@ static struct platform_device *goni_devices[] __initdata = {
&s3c_device_hsmmc0,
&s3c_device_hsmmc1,
&s3c_device_hsmmc2,
+ &samsung_device_keypad,
};
static void __init goni_map_io(void)
@@ -486,6 +510,9 @@ static void __init goni_machine_init(void)
/* FB */
s3c_fb_set_platdata(&goni_lcd_pdata);
+ /* KEYPAD */
+ samsung_keypad_set_platdata(&keypad_data);
+
platform_add_devices(goni_devices, ARRAY_SIZE(goni_devices));
}
OpenPOWER on IntegriCloud