diff options
author | Jingoo Han <jg1.han@samsung.com> | 2011-12-23 21:57:09 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-12-23 21:57:15 -0500 |
commit | 2f4f0b42193322987c534c928e3555e3936090e1 (patch) | |
tree | 0eb599cec62a171e83521a85ccb1087a0a096162 /arch/arm/mach-s5pv210 | |
parent | 7803c7aa8ef262a63e91ee0b04470715a7dc2eb0 (diff) |
ARM: S5PV210: Use gpio_request_one
By using gpio_request_one it is possible to set the direction
and initial value in one shot. Thus, using gpio_request_one can
make the code simpler.
Signed-off-by: Jingoo Han <jg1.han@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/mach-aquila.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-goni.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-smdkv210.c | 10 |
3 files changed, 6 insertions, 13 deletions
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c index 5811a96125f0..404ac7aec3c1 100644 --- a/arch/arm/mach-s5pv210/mach-aquila.c +++ b/arch/arm/mach-s5pv210/mach-aquila.c | |||
@@ -595,8 +595,7 @@ static struct s3c_sdhci_platdata aquila_hsmmc2_data __initdata = { | |||
595 | 595 | ||
596 | static void aquila_setup_sdhci(void) | 596 | static void aquila_setup_sdhci(void) |
597 | { | 597 | { |
598 | gpio_request(AQUILA_EXT_FLASH_EN, "FLASH_EN"); | 598 | gpio_request_one(AQUILA_EXT_FLASH_EN, GPIOF_OUT_INIT_HIGH, "FLASH_EN"); |
599 | gpio_direction_output(AQUILA_EXT_FLASH_EN, 1); | ||
600 | 599 | ||
601 | s3c_sdhci0_set_platdata(&aquila_hsmmc0_data); | 600 | s3c_sdhci0_set_platdata(&aquila_hsmmc0_data); |
602 | s3c_sdhci1_set_platdata(&aquila_hsmmc1_data); | 601 | s3c_sdhci1_set_platdata(&aquila_hsmmc1_data); |
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index 15edcae448b9..e2754e9bd6b4 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c | |||
@@ -227,8 +227,7 @@ static void __init goni_radio_init(void) | |||
227 | i2c1_devs[0].irq = gpio_to_irq(gpio); | 227 | i2c1_devs[0].irq = gpio_to_irq(gpio); |
228 | 228 | ||
229 | gpio = S5PV210_GPJ2(5); /* XMSMDATA_5 */ | 229 | gpio = S5PV210_GPJ2(5); /* XMSMDATA_5 */ |
230 | gpio_request(gpio, "FM_RST"); | 230 | gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "FM_RST"); |
231 | gpio_direction_output(gpio, 1); | ||
232 | } | 231 | } |
233 | 232 | ||
234 | /* TSP */ | 233 | /* TSP */ |
@@ -264,8 +263,7 @@ static void __init goni_tsp_init(void) | |||
264 | int gpio; | 263 | int gpio; |
265 | 264 | ||
266 | gpio = S5PV210_GPJ1(3); /* XMSMADDR_11 */ | 265 | gpio = S5PV210_GPJ1(3); /* XMSMADDR_11 */ |
267 | gpio_request(gpio, "TSP_LDO_ON"); | 266 | gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "TSP_LDO_ON"); |
268 | gpio_direction_output(gpio, 1); | ||
269 | gpio_export(gpio, 0); | 267 | gpio_export(gpio, 0); |
270 | 268 | ||
271 | gpio = S5PV210_GPJ0(5); /* XMSMADDR_5 */ | 269 | gpio = S5PV210_GPJ0(5); /* XMSMADDR_5 */ |
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c index a9106c392398..10a4ec6989c8 100644 --- a/arch/arm/mach-s5pv210/mach-smdkv210.c +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c | |||
@@ -153,15 +153,12 @@ static void smdkv210_lte480wv_set_power(struct plat_lcd_data *pd, | |||
153 | { | 153 | { |
154 | if (power) { | 154 | if (power) { |
155 | #if !defined(CONFIG_BACKLIGHT_PWM) | 155 | #if !defined(CONFIG_BACKLIGHT_PWM) |
156 | gpio_request(S5PV210_GPD0(3), "GPD0"); | 156 | gpio_request_one(S5PV210_GPD0(3), GPIOF_OUT_INIT_HIGH, "GPD0"); |
157 | gpio_direction_output(S5PV210_GPD0(3), 1); | ||
158 | gpio_free(S5PV210_GPD0(3)); | 157 | gpio_free(S5PV210_GPD0(3)); |
159 | #endif | 158 | #endif |
160 | 159 | ||
161 | /* fire nRESET on power up */ | 160 | /* fire nRESET on power up */ |
162 | gpio_request(S5PV210_GPH0(6), "GPH0"); | 161 | gpio_request_one(S5PV210_GPH0(6), GPIOF_OUT_INIT_HIGH, "GPH0"); |
163 | |||
164 | gpio_direction_output(S5PV210_GPH0(6), 1); | ||
165 | 162 | ||
166 | gpio_set_value(S5PV210_GPH0(6), 0); | 163 | gpio_set_value(S5PV210_GPH0(6), 0); |
167 | mdelay(10); | 164 | mdelay(10); |
@@ -172,8 +169,7 @@ static void smdkv210_lte480wv_set_power(struct plat_lcd_data *pd, | |||
172 | gpio_free(S5PV210_GPH0(6)); | 169 | gpio_free(S5PV210_GPH0(6)); |
173 | } else { | 170 | } else { |
174 | #if !defined(CONFIG_BACKLIGHT_PWM) | 171 | #if !defined(CONFIG_BACKLIGHT_PWM) |
175 | gpio_request(S5PV210_GPD0(3), "GPD0"); | 172 | gpio_request_one(S5PV210_GPD0(3), GPIOF_OUT_INIT_LOW, "GPD0"); |
176 | gpio_direction_output(S5PV210_GPD0(3), 0); | ||
177 | gpio_free(S5PV210_GPD0(3)); | 173 | gpio_free(S5PV210_GPD0(3)); |
178 | #endif | 174 | #endif |
179 | } | 175 | } |