aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv210
diff options
context:
space:
mode:
authorNaveen Krishna Ch <ch.naveen@samsung.com>2010-06-21 03:47:16 -0400
committerKukjin Kim <kgene.kim@samsung.com>2010-08-05 05:31:01 -0400
commit88a1cc438aa008584d5657db4372ba468f8c31e6 (patch)
tree9bf7d123167aa878d7830938f824638baabefb62 /arch/arm/mach-s5pv210
parente7d0628ceacf59edc1c9c390a3117fc177486817 (diff)
ARM: S5PV210: Add keypad device to the SMDKV210 board
This patch is to support keypad device to the SMDKV210 board. Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv210')
-rw-r--r--arch/arm/mach-s5pv210/Kconfig2
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkv210.c22
2 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index 1244d6128722..411bc9a529b2 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -103,8 +103,10 @@ config MACH_SMDKV210
103 select ARCH_SPARSEMEM_ENABLE 103 select ARCH_SPARSEMEM_ENABLE
104 select SAMSUNG_DEV_ADC 104 select SAMSUNG_DEV_ADC
105 select SAMSUNG_DEV_IDE 105 select SAMSUNG_DEV_IDE
106 select SAMSUNG_DEV_KEYPAD
106 select SAMSUNG_DEV_TS 107 select SAMSUNG_DEV_TS
107 select S3C_DEV_WDT 108 select S3C_DEV_WDT
109 select S5PV210_SETUP_KEYPAD
108 select HAVE_S3C2410_WATCHDOG 110 select HAVE_S3C2410_WATCHDOG
109 select S5PV210_SETUP_IDE 111 select S5PV210_SETUP_IDE
110 help 112 help
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index cc902c1e8f98..485ea339dbc4 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -28,6 +28,7 @@
28#include <plat/adc.h> 28#include <plat/adc.h>
29#include <plat/ts.h> 29#include <plat/ts.h>
30#include <plat/ata.h> 30#include <plat/ata.h>
31#include <plat/keypad.h>
31 32
32/* Following are default values for UCON, ULCON and UFCON UART registers */ 33/* Following are default values for UCON, ULCON and UFCON UART registers */
33#define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ 34#define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -78,11 +79,31 @@ static struct s3c_ide_platdata smdkv210_ide_pdata __initdata = {
78 .setup_gpio = s5pv210_ide_setup_gpio, 79 .setup_gpio = s5pv210_ide_setup_gpio,
79}; 80};
80 81
82static uint32_t smdkv210_keymap[] __initdata = {
83 /* KEY(row, col, keycode) */
84 KEY(0, 3, KEY_1), KEY(0, 4, KEY_2), KEY(0, 5, KEY_3),
85 KEY(0, 6, KEY_4), KEY(0, 7, KEY_5),
86 KEY(1, 3, KEY_A), KEY(1, 4, KEY_B), KEY(1, 5, KEY_C),
87 KEY(1, 6, KEY_D), KEY(1, 7, KEY_E)
88};
89
90static struct matrix_keymap_data smdkv210_keymap_data __initdata = {
91 .keymap = smdkv210_keymap,
92 .keymap_size = ARRAY_SIZE(smdkv210_keymap),
93};
94
95static struct samsung_keypad_platdata smdkv210_keypad_data __initdata = {
96 .keymap_data = &smdkv210_keymap_data,
97 .rows = 8,
98 .cols = 8,
99};
100
81static struct platform_device *smdkv210_devices[] __initdata = { 101static struct platform_device *smdkv210_devices[] __initdata = {
82 &s5pv210_device_iis0, 102 &s5pv210_device_iis0,
83 &s5pv210_device_ac97, 103 &s5pv210_device_ac97,
84 &s3c_device_adc, 104 &s3c_device_adc,
85 &s3c_device_cfcon, 105 &s3c_device_cfcon,
106 &samsung_device_keypad,
86 &s3c_device_ts, 107 &s3c_device_ts,
87 &s3c_device_wdt, 108 &s3c_device_wdt,
88}; 109};
@@ -102,6 +123,7 @@ static void __init smdkv210_map_io(void)
102 123
103static void __init smdkv210_machine_init(void) 124static void __init smdkv210_machine_init(void)
104{ 125{
126 samsung_keypad_set_platdata(&smdkv210_keypad_data);
105 s3c24xx_ts_set_platdata(&s3c_ts_platform); 127 s3c24xx_ts_set_platdata(&s3c_ts_platform);
106 s3c_ide_set_platdata(&smdkv210_ide_pdata); 128 s3c_ide_set_platdata(&smdkv210_ide_pdata);
107 129