diff options
author | Naveen Krishna Ch <ch.naveen@samsung.com> | 2011-02-22 03:16:58 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-03-15 07:37:02 -0400 |
commit | be4c33be53d85dde787c4261b18b13850cb299f1 (patch) | |
tree | 9b5025dab1649505d70cea4e5d1279ff6e427436 /arch/arm/mach-exynos4 | |
parent | f9d7bcbc41f9b80928d7a46b5e547663f163dc8e (diff) |
ARM: EXYNOS4: Add keypad device to the SMDKV310
This patch is to support keypad device to the SMDKV310 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-exynos4')
-rw-r--r-- | arch/arm/mach-exynos4/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/mach-smdkv310.c | 24 |
2 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index 8a007cc26ac5..a021b5240bba 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig | |||
@@ -117,9 +117,11 @@ config MACH_SMDKV310 | |||
117 | select S3C_DEV_HSMMC1 | 117 | select S3C_DEV_HSMMC1 |
118 | select S3C_DEV_HSMMC2 | 118 | select S3C_DEV_HSMMC2 |
119 | select S3C_DEV_HSMMC3 | 119 | select S3C_DEV_HSMMC3 |
120 | select SAMSUNG_DEV_KEYPAD | ||
120 | select EXYNOS4_DEV_PD | 121 | select EXYNOS4_DEV_PD |
121 | select EXYNOS4_DEV_SYSMMU | 122 | select EXYNOS4_DEV_SYSMMU |
122 | select EXYNOS4_SETUP_I2C1 | 123 | select EXYNOS4_SETUP_I2C1 |
124 | select EXYNOS4_SETUP_KEYPAD | ||
123 | select EXYNOS4_SETUP_SDHCI | 125 | select EXYNOS4_SETUP_SDHCI |
124 | help | 126 | help |
125 | Machine support for Samsung SMDKV310 | 127 | Machine support for Samsung SMDKV310 |
diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c index 07860a5b2f5d..88e0275143be 100644 --- a/arch/arm/mach-exynos4/mach-smdkv310.c +++ b/arch/arm/mach-exynos4/mach-smdkv310.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/smsc911x.h> | 15 | #include <linux/smsc911x.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/input.h> | ||
18 | 19 | ||
19 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
@@ -24,6 +25,7 @@ | |||
24 | #include <plat/exynos4.h> | 25 | #include <plat/exynos4.h> |
25 | #include <plat/cpu.h> | 26 | #include <plat/cpu.h> |
26 | #include <plat/devs.h> | 27 | #include <plat/devs.h> |
28 | #include <plat/keypad.h> | ||
27 | #include <plat/sdhci.h> | 29 | #include <plat/sdhci.h> |
28 | #include <plat/iic.h> | 30 | #include <plat/iic.h> |
29 | #include <plat/pd.h> | 31 | #include <plat/pd.h> |
@@ -142,6 +144,25 @@ static struct platform_device smdkv310_smsc911x = { | |||
142 | }, | 144 | }, |
143 | }; | 145 | }; |
144 | 146 | ||
147 | static uint32_t smdkv310_keymap[] __initdata = { | ||
148 | /* KEY(row, col, keycode) */ | ||
149 | KEY(0, 3, KEY_1), KEY(0, 4, KEY_2), KEY(0, 5, KEY_3), | ||
150 | KEY(0, 6, KEY_4), KEY(0, 7, KEY_5), | ||
151 | KEY(1, 3, KEY_A), KEY(1, 4, KEY_B), KEY(1, 5, KEY_C), | ||
152 | KEY(1, 6, KEY_D), KEY(1, 7, KEY_E) | ||
153 | }; | ||
154 | |||
155 | static struct matrix_keymap_data smdkv310_keymap_data __initdata = { | ||
156 | .keymap = smdkv310_keymap, | ||
157 | .keymap_size = ARRAY_SIZE(smdkv310_keymap), | ||
158 | }; | ||
159 | |||
160 | static struct samsung_keypad_platdata smdkv310_keypad_data __initdata = { | ||
161 | .keymap_data = &smdkv310_keymap_data, | ||
162 | .rows = 2, | ||
163 | .cols = 8, | ||
164 | }; | ||
165 | |||
145 | static struct i2c_board_info i2c_devs1[] __initdata = { | 166 | static struct i2c_board_info i2c_devs1[] __initdata = { |
146 | {I2C_BOARD_INFO("wm8994", 0x1a),}, | 167 | {I2C_BOARD_INFO("wm8994", 0x1a),}, |
147 | }; | 168 | }; |
@@ -156,6 +177,7 @@ static struct platform_device *smdkv310_devices[] __initdata = { | |||
156 | &s3c_device_wdt, | 177 | &s3c_device_wdt, |
157 | &exynos4_device_ac97, | 178 | &exynos4_device_ac97, |
158 | &exynos4_device_i2s0, | 179 | &exynos4_device_i2s0, |
180 | &samsung_device_keypad, | ||
159 | &exynos4_device_pd[PD_MFC], | 181 | &exynos4_device_pd[PD_MFC], |
160 | &exynos4_device_pd[PD_G3D], | 182 | &exynos4_device_pd[PD_G3D], |
161 | &exynos4_device_pd[PD_LCD0], | 183 | &exynos4_device_pd[PD_LCD0], |
@@ -210,6 +232,8 @@ static void __init smdkv310_machine_init(void) | |||
210 | s3c_sdhci2_set_platdata(&smdkv310_hsmmc2_pdata); | 232 | s3c_sdhci2_set_platdata(&smdkv310_hsmmc2_pdata); |
211 | s3c_sdhci3_set_platdata(&smdkv310_hsmmc3_pdata); | 233 | s3c_sdhci3_set_platdata(&smdkv310_hsmmc3_pdata); |
212 | 234 | ||
235 | samsung_keypad_set_platdata(&smdkv310_keypad_data); | ||
236 | |||
213 | platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); | 237 | platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); |
214 | } | 238 | } |
215 | 239 | ||