]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: bcm6345_gpio: Set proper output level in bcm6345_gpio_direction_output
authorAxel Lin <axel.lin@ingics.com>
Thu, 8 Jun 2017 09:20:12 +0000 (17:20 +0800)
committerTom Rini <trini@konsulko.com>
Mon, 12 Jun 2017 12:38:41 +0000 (08:38 -0400)
Current code does not set output level in bcm6345_gpio_direction_output,
fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
drivers/gpio/bcm6345_gpio.c

index 009e2fc5a21e3991b986119f442a6afda08e9c6f..b9100cdc58117b7f56c6f43000b0814d5abfa568 100644 (file)
@@ -64,6 +64,8 @@ static int bcm6345_gpio_direction_output(struct udevice *dev, unsigned offset,
 {
        struct bcm6345_gpio_priv *priv = dev_get_priv(dev);
 
+       bcm6345_gpio_set_value(dev, offset, value);
+
        return bcm6345_gpio_set_direction(priv->reg_dirout, offset, 0);
 }