Skip to content
  • Simon Glass's avatar
    tegra: gpio: Show the GPIO value for outputs · 651827c0
    Simon Glass authored
    
    
    The tegra GPIO controller has two ways of reading the value of a GPIO. It
    can supply the 'input' value (which is the value read from the pin) and the
    'output' value (which is the value being driven from the pin. With a GPIO
    set to output mode, the 'input' value is always low which is not very
    useful.
    
    This has the unfortunate result that setting a GPIO high still leaves it
    showing as low in the 'gpio status' command.
    
    Adjust the driver to check which direction the GPIO is set to, then read
    the value from the appropriate register: 'input' for input GPIOs, 'output'
    for output GPIOs.
    
    Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
    Reviewed-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
    Signed-off-by: default avatarTom Warren <twarren@nvidia.com>
    651827c0