diff mbox

[U-Boot,v2,02/22] stm32: gpio_direction_output: make sure, output is set to push-pull

Message ID 20160620182610.21075.53697.stgit@obelix.dresden.micronet24.de
State Changes Requested
Delegated to: Simon Glass
Headers show

Commit Message

Benjamin Tietz June 20, 2016, 6:26 p.m. UTC
Previously the bit for settting the pin-behaviour was left undefined, which may result in an open-drain behaviour for the affected pin.
Now it is correctly initialized, always.
---
 drivers/gpio/stm32_gpio.c |    1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/drivers/gpio/stm32_gpio.c b/drivers/gpio/stm32_gpio.c
index 2457211..d092c8f 100644
--- a/drivers/gpio/stm32_gpio.c
+++ b/drivers/gpio/stm32_gpio.c
@@ -236,6 +236,7 @@  int gpio_direction_output(unsigned gpio, int value)
 #if defined(CONFIG_STM32F4) || defined(CONFIG_STM32F7)
 	ctl.af = STM32_GPIO_AF0;
 	ctl.mode = STM32_GPIO_MODE_OUT;
+	ctl.otype = STM32_GPIO_OTYPE_PP;
 	ctl.pupd = STM32_GPIO_PUPD_NO;
 	ctl.speed = STM32_GPIO_SPEED_50M;
 #elif defined(CONFIG_STM32F1)