[U-Boot] [PATCH v2 2/3] dm: gpio: Add methods for open drain setting
Simon Glass
sjg at chromium.org
Thu May 19 05:59:44 CEST 2016
Hi Mario,
On 10 May 2016 at 01:51, Mario Six <mario.six at gdsys.cc> wrote:
> Certain GPIO devices have the capability to switch their GPIOs into
> open-drain mode, that is, instead of actively driving the output
> (Push-pull output), the pin is connected to the collector (for a NPN
> transistor) or the drain (for a MOSFET) of a transistor, respectively.
> The pin then either forms an open circuit or a connection to ground,
> depending on the state of the transistor.
>
> This patch adds functions to the GPIO uclass to switch GPIOs to
> open-drain mode on devices that support it.
>
> Signed-off-by: Mario Six <mario.six at gdsys.cc>
> ---
>
> v2:
> - Added missing commit message
> - Fixed error return value of dm_gpio_get_open_drain
> - Fixed return value passing in dm_gpio_set_open_drain and added comment
> - Added description of open-drain mode
>
> ---
> drivers/gpio/gpio-uclass.c | 32 ++++++++++++++++++++++++++++++++
> include/asm-generic/gpio.h | 34 ++++++++++++++++++++++++++++++++++
> 2 files changed, 66 insertions(+)
Reviewed-by: Simon Glass <sjg at chromium.org>
Can you please do a follow-up patch to update the test/dm/gpio.c file
to call these two methods? You'll need to update
drivers/gpio/sandbox.c a little also.
Regards,
Simon
More information about the U-Boot
mailing list