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/arm/mach-exynos/mach-universal_c210.c | |
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/arm/mach-exynos/mach-universal_c210.c')
-rw-r--r-- | arch/arm/mach-exynos/mach-universal_c210.c | 10 |
1 files changed, 3 insertions, 7 deletions
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 | ||