Hi Mario, On 10 May 2016 at 01:51, Mario Six <mario....@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....@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 <s...@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 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot