mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 05:01:30 +00:00
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>
This commit is contained in:
parent
bbf8bef196
commit
b23005cec3
1 changed files with 4 additions and 0 deletions
|
@ -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(®s->data_out, BIT(gpio));
|
||||
else
|
||||
clrbits_le32(®s->data_out, BIT(gpio));
|
||||
clrbits_le32(®s->io_conf, BIT(gpio));
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue