aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2010-05-25 17:23:30 +0530
committerJohn Rigby <john.rigby@linaro.org>2010-09-02 22:45:27 -0600
commit457fecbf0f8ce3394d5287e43e3229107ac93ba3 (patch)
treee01140fa5f00d0c08dc77fc0f4567ac586da036b /arch
parent3498e32c0746e1277c11fbb971a7fe8bcf2c3f3d (diff)
downloadlinux-2.6.34-ux500-457fecbf0f8ce3394d5287e43e3229107ac93ba3.tar.gz
nomadik-gpio: set val in ->direction_output()
The ->direction_output() callback needs to set the value it was passed, in addition to setting the direction as output. On this peripheral, we can't set the value before setting the direction, so set it after. ST-Ericsson ID: ER262134 Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Change-Id: I71e8972425309d7b80dc8a8a8c18a97bd294cc55 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/2362 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/plat-nomadik/gpio.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c
index 74dc07b9bd3..7b542ffb144 100644
--- a/arch/arm/plat-nomadik/gpio.c
+++ b/arch/arm/plat-nomadik/gpio.c
@@ -504,16 +504,6 @@ static int nmk_gpio_make_input(struct gpio_chip *chip, unsigned offset)
return 0;
}
-static int nmk_gpio_make_output(struct gpio_chip *chip, unsigned offset,
- int val)
-{
- struct nmk_gpio_chip *nmk_chip =
- container_of(chip, struct nmk_gpio_chip, chip);
-
- writel(1 << offset, nmk_chip->addr + NMK_GPIO_DIRS);
- return 0;
-}
-
static int nmk_gpio_get_input(struct gpio_chip *chip, unsigned offset)
{
struct nmk_gpio_chip *nmk_chip =
@@ -536,6 +526,18 @@ static void nmk_gpio_set_output(struct gpio_chip *chip, unsigned offset,
writel(bit, nmk_chip->addr + NMK_GPIO_DATC);
}
+static int nmk_gpio_make_output(struct gpio_chip *chip, unsigned offset,
+ int val)
+{
+ struct nmk_gpio_chip *nmk_chip =
+ container_of(chip, struct nmk_gpio_chip, chip);
+
+ writel(1 << offset, nmk_chip->addr + NMK_GPIO_DIRS);
+ nmk_gpio_set_output(chip, offset, val);
+
+ return 0;
+}
+
#ifdef CONFIG_DEBUG_FS
#include <linux/seq_file.h>