summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2016-04-07 07:41:00 +0200
committerStefan Roese <sr@denx.de>2016-04-12 11:13:33 +0200
commitb23005cec3b23a4ac8f7336a427febdddc6451e7 (patch)
treeb5605789a68ef33a2d57e5cef1c2d21be738ee77 /drivers/gpio
parentbbf8bef196ae52517284a0a2e2ffc94a4ff89f5f (diff)
downloadblackbird-obmc-uboot-b23005cec3b23a4ac8f7336a427febdddc6451e7.tar.gz
blackbird-obmc-uboot-b23005cec3b23a4ac8f7336a427febdddc6451e7.zip
gpio: mvebu_gpio: Add missing out value set to gpio_direction_output()
This patch adds the missing configuration of the output value to the gpio_direction_output() function. Without this, calling gpio_direction_output() does not set the out-value at all and only configures the gpio as output. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Kevin Smith <kevin.smith@elecsyscorp.com> Reviewed-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/mvebu_gpio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpio/mvebu_gpio.c b/drivers/gpio/mvebu_gpio.c
index 9564ce2b13..75dc73e586 100644
--- a/drivers/gpio/mvebu_gpio.c
+++ b/drivers/gpio/mvebu_gpio.c
@@ -43,6 +43,10 @@ static int mvebu_gpio_direction_output(struct udevice *dev, unsigned gpio,
struct mvebu_gpio_priv *priv = dev_get_priv(dev);
struct mvebu_gpio_regs *regs = priv->regs;
+ if (value)
+ setbits_le32(&regs->data_out, BIT(gpio));
+ else
+ clrbits_le32(&regs->data_out, BIT(gpio));
clrbits_le32(&regs->io_conf, BIT(gpio));
return 0;
OpenPOWER on IntegriCloud