[U-Boot] [PATCH 06/23] tegra: gpio: Show the GPIO value for outputs
Joe Hershberger
joe.hershberger at gmail.com
Thu Jan 14 21:40:54 CET 2016
On Thu, Jan 14, 2016 at 12:28 PM, Simon Glass <sjg at chromium.org> wrote:
> 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: Simon Glass <sjg at chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger at ni.com>
More information about the U-Boot
mailing list