Skip to content
  • mario.six@gdsys.cc's avatar
    dm: gpio: Add methods for open drain setting · 53ecdfb9
    mario.six@gdsys.cc authored
    
    
    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: default avatarMario Six <mario.six@gdsys.cc>
    Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
    Reviewed-by: default avatarYork Sun <york.sun@nxp.com>
    53ecdfb9