aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx/mach-smdk6410.c
diff options
context:
space:
mode:
authorNaveen Krishna Ch <ch.naveen@samsung.com>2010-06-21 18:39:18 -0400
committerKukjin Kim <kgene.kim@samsung.com>2010-08-06 08:28:30 -0400
commit290d0983b86f6243beffaa3ddb02c14adc30f02a (patch)
treed6cc9963c61ea941928341ecd7ed5987c7953730 /arch/arm/mach-s3c64xx/mach-smdk6410.c
parent995c48adde09e04298036501df9dac87661fa66c (diff)
ARM: S3C64XX: Add keypad device to the SMDK6410 board
This patch is to support keypad device to the SMDK6410 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-s3c64xx/mach-smdk6410.c')
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6410.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index 7fd38e9dcfca..b5d78616c774 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -17,6 +17,7 @@
17#include <linux/list.h> 17#include <linux/list.h>
18#include <linux/timer.h> 18#include <linux/timer.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/input.h>
20#include <linux/serial_core.h> 21#include <linux/serial_core.h>
21#include <linux/platform_device.h> 22#include <linux/platform_device.h>
22#include <linux/io.h> 23#include <linux/io.h>
@@ -67,6 +68,7 @@
67#include <plat/cpu.h> 68#include <plat/cpu.h>
68#include <plat/adc.h> 69#include <plat/adc.h>
69#include <plat/ts.h> 70#include <plat/ts.h>
71#include <plat/keypad.h>
70 72
71#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK 73#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
72#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB 74#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
@@ -247,6 +249,25 @@ static struct s3c_ide_platdata smdk6410_ide_pdata __initdata = {
247 .setup_gpio = s3c64xx_ide_setup_gpio, 249 .setup_gpio = s3c64xx_ide_setup_gpio,
248}; 250};
249 251
252static uint32_t smdk6410_keymap[] __initdata = {
253 /* KEY(row, col, keycode) */
254 KEY(0, 3, KEY_1), KEY(0, 4, KEY_2), KEY(0, 5, KEY_3),
255 KEY(0, 6, KEY_4), KEY(0, 7, KEY_5),
256 KEY(1, 3, KEY_A), KEY(1, 4, KEY_B), KEY(1, 5, KEY_C),
257 KEY(1, 6, KEY_D), KEY(1, 7, KEY_E)
258};
259
260static struct matrix_keymap_data smdk6410_keymap_data __initdata = {
261 .keymap = smdk6410_keymap,
262 .keymap_size = ARRAY_SIZE(smdk6410_keymap),
263};
264
265static struct samsung_keypad_platdata smdk6410_keypad_data __initdata = {
266 .keymap_data = &smdk6410_keymap_data,
267 .rows = 2,
268 .cols = 8,
269};
270
250static struct map_desc smdk6410_iodesc[] = {}; 271static struct map_desc smdk6410_iodesc[] = {};
251 272
252static struct platform_device *smdk6410_devices[] __initdata = { 273static struct platform_device *smdk6410_devices[] __initdata = {
@@ -262,6 +283,7 @@ static struct platform_device *smdk6410_devices[] __initdata = {
262 &s3c_device_ohci, 283 &s3c_device_ohci,
263 &s3c_device_usb_hsotg, 284 &s3c_device_usb_hsotg,
264 &s3c64xx_device_iisv4, 285 &s3c64xx_device_iisv4,
286 &samsung_device_keypad,
265 287
266#ifdef CONFIG_REGULATOR 288#ifdef CONFIG_REGULATOR
267 &smdk6410_b_pwr_5v, 289 &smdk6410_b_pwr_5v,
@@ -643,6 +665,8 @@ static void __init smdk6410_machine_init(void)
643 s3c_i2c1_set_platdata(NULL); 665 s3c_i2c1_set_platdata(NULL);
644 s3c_fb_set_platdata(&smdk6410_lcd_pdata); 666 s3c_fb_set_platdata(&smdk6410_lcd_pdata);
645 667
668 samsung_keypad_set_platdata(&smdk6410_keypad_data);
669
646 s3c24xx_ts_set_platdata(&s3c_ts_platform); 670 s3c24xx_ts_set_platdata(&s3c_ts_platform);
647 671
648 /* configure nCS1 width to 16 bits */ 672 /* configure nCS1 width to 16 bits */