aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c24xx/common-smdk.c
diff options
context:
space:
mode:
authorSylwester Nawrocki <sylvester.nawrocki@gmail.com>2012-07-13 05:04:25 -0400
committerKukjin Kim <kgene.kim@samsung.com>2012-07-13 05:04:25 -0400
commitff40b4b154415eceb54daae989f5459ed74d0ca2 (patch)
tree77a98abc8451b3451a6e82c1f1bb3ab06f74c4fb /arch/arm/mach-s3c24xx/common-smdk.c
parent57370aed40bfb8bfd2daab2eddbdc4faa459e784 (diff)
ARM: S3C24XX: Convert SMDK board file to the gpiolib API
Replace SoC specific GPIO functions with the gpiolib API. The LED gpios are freed right after they are initially configured so they can be acquired in the s3c24xx_led driver. This change is required for converting the s3c24xx_led driver to the gpiolib API. Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s3c24xx/common-smdk.c')
-rw-r--r--arch/arm/mach-s3c24xx/common-smdk.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/arm/mach-s3c24xx/common-smdk.c b/arch/arm/mach-s3c24xx/common-smdk.c
index 084604be6ad1..87e75a250d5e 100644
--- a/arch/arm/mach-s3c24xx/common-smdk.c
+++ b/arch/arm/mach-s3c24xx/common-smdk.c
@@ -182,19 +182,21 @@ static struct platform_device __initdata *smdk_devs[] = {
182 &smdk_led7, 182 &smdk_led7,
183}; 183};
184 184
185static const struct gpio smdk_led_gpios[] = {
186 { S3C2410_GPF(4), GPIOF_OUT_INIT_HIGH, NULL },
187 { S3C2410_GPF(5), GPIOF_OUT_INIT_HIGH, NULL },
188 { S3C2410_GPF(6), GPIOF_OUT_INIT_HIGH, NULL },
189 { S3C2410_GPF(7), GPIOF_OUT_INIT_HIGH, NULL },
190};
191
185void __init smdk_machine_init(void) 192void __init smdk_machine_init(void)
186{ 193{
187 /* Configure the LEDs (even if we have no LED support)*/ 194 /* Configure the LEDs (even if we have no LED support)*/
188 195
189 s3c_gpio_cfgpin(S3C2410_GPF(4), S3C2410_GPIO_OUTPUT); 196 int ret = gpio_request_array(smdk_led_gpios,
190 s3c_gpio_cfgpin(S3C2410_GPF(5), S3C2410_GPIO_OUTPUT); 197 ARRAY_SIZE(smdk_led_gpios));
191 s3c_gpio_cfgpin(S3C2410_GPF(6), S3C2410_GPIO_OUTPUT); 198 if (!WARN_ON(ret < 0))
192 s3c_gpio_cfgpin(S3C2410_GPF(7), S3C2410_GPIO_OUTPUT); 199 gpio_free_array(smdk_led_gpios, ARRAY_SIZE(smdk_led_gpios));
193
194 s3c2410_gpio_setpin(S3C2410_GPF(4), 1);
195 s3c2410_gpio_setpin(S3C2410_GPF(5), 1);
196 s3c2410_gpio_setpin(S3C2410_GPF(6), 1);
197 s3c2410_gpio_setpin(S3C2410_GPF(7), 1);
198 200
199 if (machine_is_smdk2443()) 201 if (machine_is_smdk2443())
200 smdk_nand_info.twrph0 = 50; 202 smdk_nand_info.twrph0 = 50;