diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2010-09-08 19:17:43 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-20 18:52:17 -0400 |
commit | 2a5555822ea83d583b46437cff6829eec0166475 (patch) | |
tree | 7c99db91c3b00a809ee7f9aee6e7178efb36033e /arch/arm/mach-s5pv210/mach-goni.c | |
parent | 8f3b9cff23ed15c1ef2f4e60c677f3c7d5e535ce (diff) |
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/arm/mach-s5pv210/mach-goni.c')
-rw-r--r-- | arch/arm/mach-s5pv210/mach-goni.c | 27 |
1 files changed, 27 insertions, 0 deletions
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 @@ | |||
35 | #include <plat/devs.h> | 35 | #include <plat/devs.h> |
36 | #include <plat/cpu.h> | 36 | #include <plat/cpu.h> |
37 | #include <plat/fb.h> | 37 | #include <plat/fb.h> |
38 | #include <plat/keypad.h> | ||
38 | #include <plat/sdhci.h> | 39 | #include <plat/sdhci.h> |
39 | 40 | ||
40 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 41 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
@@ -111,6 +112,28 @@ static struct s3c_fb_platdata goni_lcd_pdata __initdata = { | |||
111 | .setup_gpio = s5pv210_fb_gpio_setup_24bpp, | 112 | .setup_gpio = s5pv210_fb_gpio_setup_24bpp, |
112 | }; | 113 | }; |
113 | 114 | ||
115 | /* KEYPAD */ | ||
116 | static uint32_t keymap[] __initdata = { | ||
117 | /* KEY(row, col, keycode) */ | ||
118 | KEY(0, 1, KEY_MENU), /* Send */ | ||
119 | KEY(0, 2, KEY_BACK), /* End */ | ||
120 | KEY(1, 1, KEY_CONFIG), /* Half shot */ | ||
121 | KEY(1, 2, KEY_VOLUMEUP), | ||
122 | KEY(2, 1, KEY_CAMERA), /* Full shot */ | ||
123 | KEY(2, 2, KEY_VOLUMEDOWN), | ||
124 | }; | ||
125 | |||
126 | static struct matrix_keymap_data keymap_data __initdata = { | ||
127 | .keymap = keymap, | ||
128 | .keymap_size = ARRAY_SIZE(keymap), | ||
129 | }; | ||
130 | |||
131 | static struct samsung_keypad_platdata keypad_data __initdata = { | ||
132 | .keymap_data = &keymap_data, | ||
133 | .rows = 3, | ||
134 | .cols = 3, | ||
135 | }; | ||
136 | |||
114 | /* MAX8998 regulators */ | 137 | /* MAX8998 regulators */ |
115 | #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE) | 138 | #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE) |
116 | 139 | ||
@@ -465,6 +488,7 @@ static struct platform_device *goni_devices[] __initdata = { | |||
465 | &s3c_device_hsmmc0, | 488 | &s3c_device_hsmmc0, |
466 | &s3c_device_hsmmc1, | 489 | &s3c_device_hsmmc1, |
467 | &s3c_device_hsmmc2, | 490 | &s3c_device_hsmmc2, |
491 | &samsung_device_keypad, | ||
468 | }; | 492 | }; |
469 | 493 | ||
470 | static void __init goni_map_io(void) | 494 | static void __init goni_map_io(void) |
@@ -486,6 +510,9 @@ static void __init goni_machine_init(void) | |||
486 | /* FB */ | 510 | /* FB */ |
487 | s3c_fb_set_platdata(&goni_lcd_pdata); | 511 | s3c_fb_set_platdata(&goni_lcd_pdata); |
488 | 512 | ||
513 | /* KEYPAD */ | ||
514 | samsung_keypad_set_platdata(&keypad_data); | ||
515 | |||
489 | platform_add_devices(goni_devices, ARRAY_SIZE(goni_devices)); | 516 | platform_add_devices(goni_devices, ARRAY_SIZE(goni_devices)); |
490 | } | 517 | } |
491 | 518 | ||