Skip to contentSkip to conversation

dm: bcm6345_gpio: Set proper output level in bcm6345_gpio_direction_output

PATCH In review Axel Lin 4 participants 4 messages Jun 8, 2017 – Jun 13, 2017 GPIO

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 dm: bcm6345_gpio: Set proper output level in bcm6345_gpio_direction_output

Current code does not set output level in bcm6345_gpio_direction_output, fix it.

---
 drivers/gpio/bcm6345_gpio.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpio/bcm6345_gpio.c +2 -0
index 009e2fc..b9100cd 100644
@@ -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);
 }
 
Signature · 1 line
2.9.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Axel Lin

Current code does not set output level in bcm6345_gpio_direction_output, fix it.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170612/0c34d6d9/attachment.sig>
#3 lore raw

PATCH 1/1 dm: bcm6345_gpio: Set proper output level in bcm6345_gpio_direction_output

In reply to Axel Lin

Thanks for finding this Axel!

Quoted 22 lines · Axel Lin

Current code does not set output level in bcm6345_gpio_direction_output, fix it.

---
 drivers/gpio/bcm6345_gpio.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpio/bcm6345_gpio.c +2 -0
index 009e2fc..b9100cd 100644
@@ -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);
 }