[PATCH v2 1/2] gpio: emulate open drain & open source in dm_gpio_set_value()
Simon Glass
sjg at chromium.org
Wed May 6 16:47:20 CEST 2020
Hi Neil,
+Tom Rini
On Tue, 5 May 2020 at 02:43, Neil Armstrong <narmstrong at baylibre.com> wrote:
>
> Handle the GPIOD_OPEN_DRAIN & GPIOD_OPEN_SOURCE flags to emulate open drain
> and open source by setting the GPIO line as input depending on the
> requested value.
>
> The behaviour is taken from the Linux gpiolib.
>
> Signed-off-by: Neil Armstrong <narmstrong at baylibre.com>
> ---
> drivers/gpio/gpio-uclass.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
Reviewed-by: Simon Glass <sjg at chromium.org>
I wonder how we should handle small increases in functionality, like
this. If a board doesn't want the code-stize hit in SPL, should we
have it behind a Kconfig, like CONFIG_GPIO_EXTRA?
Regards,
Simon
More information about the U-Boot
mailing list