[U-Boot] [PATCH v2 02/22] stm32: gpio_direction_output: make sure, output is set to push-pull
Benjamin Tietz
uboot at dresden.micronet24.de
Mon Jun 20 20:26:10 CEST 2016
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 --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)
More information about the U-Boot
mailing list