summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-06-15 22:19:45 +0800
committerMinkyu Kang <mk7.kang@samsung.com>2013-06-25 10:56:46 +0900
commit70125f341152c3f29d5552c5490cc5eb15a0215d (patch)
treed9fc2369a5bea4b1e9707086c6173ffaeefc6772 /drivers
parent79a6fcf2573e1a2ccdc8703f8e62d6efe890fdf4 (diff)
downloadu-boot-imx-70125f341152c3f29d5552c5490cc5eb15a0215d.zip
u-boot-imx-70125f341152c3f29d5552c5490cc5eb15a0215d.tar.gz
u-boot-imx-70125f341152c3f29d5552c5490cc5eb15a0215d.tar.bz2
gpio: s5p_gpio: Call s5p_gpio_set_value() instead of open-code
Call s5p_gpio_set_value() to avoid code duplication. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/s5p_gpio.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c
index 656bf4a..4efb768 100644
--- a/drivers/gpio/s5p_gpio.c
+++ b/drivers/gpio/s5p_gpio.c
@@ -48,15 +48,8 @@ void s5p_gpio_cfg_pin(struct s5p_gpio_bank *bank, int gpio, int cfg)
void s5p_gpio_direction_output(struct s5p_gpio_bank *bank, int gpio, int en)
{
- unsigned int value;
-
s5p_gpio_cfg_pin(bank, gpio, GPIO_OUTPUT);
-
- value = readl(&bank->dat);
- value &= ~DAT_MASK(gpio);
- if (en)
- value |= DAT_SET(gpio);
- writel(value, &bank->dat);
+ s5p_gpio_set_value(bank, gpio, en);
}
void s5p_gpio_direction_input(struct s5p_gpio_bank *bank, int gpio)