diff options
author | Jingoo Han <jg1.han@samsung.com> | 2011-12-23 21:58:32 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-12-23 21:58:32 -0500 |
commit | 321655efad26e03141b0bbfcfa9875056c1acb65 (patch) | |
tree | 63febf6f8db81f9ee3f00595d762dc7d7b84f112 /arch | |
parent | 2f4f0b42193322987c534c928e3555e3936090e1 (diff) |
ARM: EXYNOS: 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')
-rw-r--r-- | arch/arm/mach-exynos/mach-nuri.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-exynos/mach-smdkv310.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-exynos/mach-universal_c210.c | 10 |
3 files changed, 6 insertions, 17 deletions
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index 236bbe187163..205dfed41210 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c | |||
@@ -247,13 +247,8 @@ static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int power) | |||
247 | 247 | ||
248 | static int nuri_bl_init(struct device *dev) | 248 | static int nuri_bl_init(struct device *dev) |
249 | { | 249 | { |
250 | int ret, gpio = EXYNOS4_GPE2(3); | 250 | return gpio_request_one(EXYNOS4_GPE2(3), GPIOF_OUT_INIT_LOW, |
251 | 251 | "LCD_LD0_EN"); | |
252 | ret = gpio_request(gpio, "LCD_LDO_EN"); | ||
253 | if (!ret) | ||
254 | gpio_direction_output(gpio, 0); | ||
255 | |||
256 | return ret; | ||
257 | } | 252 | } |
258 | 253 | ||
259 | static int nuri_bl_notify(struct device *dev, int brightness) | 254 | static int nuri_bl_notify(struct device *dev, int brightness) |
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index cec2afabe7b4..cbf31bd0e2c9 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c | |||
@@ -129,9 +129,7 @@ static void lcd_lte480wv_set_power(struct plat_lcd_data *pd, | |||
129 | gpio_free(EXYNOS4_GPD0(1)); | 129 | gpio_free(EXYNOS4_GPD0(1)); |
130 | #endif | 130 | #endif |
131 | /* fire nRESET on power up */ | 131 | /* fire nRESET on power up */ |
132 | gpio_request(EXYNOS4_GPX0(6), "GPX0"); | 132 | gpio_request_one(EXYNOS4_GPX0(6), GPIOF_OUT_INIT_HIGH, "GPX0"); |
133 | |||
134 | gpio_direction_output(EXYNOS4_GPX0(6), 1); | ||
135 | mdelay(100); | 133 | mdelay(100); |
136 | 134 | ||
137 | gpio_set_value(EXYNOS4_GPX0(6), 0); | 135 | gpio_set_value(EXYNOS4_GPX0(6), 0); |
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index a2a177ff4b44..0a04cd643b07 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c | |||
@@ -608,8 +608,7 @@ static void __init universal_tsp_init(void) | |||
608 | 608 | ||
609 | /* TSP_LDO_ON: XMDMADDR_11 */ | 609 | /* TSP_LDO_ON: XMDMADDR_11 */ |
610 | gpio = EXYNOS4_GPE2(3); | 610 | gpio = EXYNOS4_GPE2(3); |
611 | gpio_request(gpio, "TSP_LDO_ON"); | 611 | gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "TSP_LDO_ON"); |
612 | gpio_direction_output(gpio, 1); | ||
613 | gpio_export(gpio, 0); | 612 | gpio_export(gpio, 0); |
614 | 613 | ||
615 | /* TSP_INT: XMDMADDR_7 */ | 614 | /* TSP_INT: XMDMADDR_7 */ |
@@ -669,8 +668,7 @@ static void __init universal_touchkey_init(void) | |||
669 | i2c_gpio12_devs[0].irq = gpio_to_irq(gpio); | 668 | i2c_gpio12_devs[0].irq = gpio_to_irq(gpio); |
670 | 669 | ||
671 | gpio = EXYNOS4_GPE3(3); /* XMDMDATA_3 */ | 670 | gpio = EXYNOS4_GPE3(3); /* XMDMDATA_3 */ |
672 | gpio_request(gpio, "3_TOUCH_EN"); | 671 | gpio_request_one(gpio, GPIOF_OUT_INIT_HIGH, "3_TOUCH_EN"); |
673 | gpio_direction_output(gpio, 1); | ||
674 | } | 672 | } |
675 | 673 | ||
676 | static struct s3c2410_platform_i2c universal_i2c0_platdata __initdata = { | 674 | static struct s3c2410_platform_i2c universal_i2c0_platdata __initdata = { |
@@ -1000,9 +998,7 @@ static void __init universal_map_io(void) | |||
1000 | void s5p_tv_setup(void) | 998 | void s5p_tv_setup(void) |
1001 | { | 999 | { |
1002 | /* direct HPD to HDMI chip */ | 1000 | /* direct HPD to HDMI chip */ |
1003 | gpio_request(EXYNOS4_GPX3(7), "hpd-plug"); | 1001 | gpio_request_one(EXYNOS4_GPX3(7), GPIOF_IN, "hpd-plug"); |
1004 | |||
1005 | gpio_direction_input(EXYNOS4_GPX3(7)); | ||
1006 | s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3)); | 1002 | s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3)); |
1007 | s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE); | 1003 | s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE); |
1008 | 1004 | ||