[PATCH] cmd: gpio: Make `gpio input` return pin value again

Simon Glass sjg at chromium.org
Wed Mar 11 02:56:26 CET 2020


On Tue, 10 Mar 2020 at 04:33, Alex Kiernan <alex.kiernan at gmail.com> wrote:
>
> 4dbc107f4683 ("cmd: gpio: Correct do_gpio() return value") correctly
> changed the behaviour of the gpio command to return CMD_RET_SUCCESS or
> CMD_RET_FAILURE.
>
> But any existing script which expects the return value to be the pin
> value is broken by this change.
>
> Reinstate the legacy behaviour for `gpio input` only.
>
> Fixes: 4dbc107f4683 ("cmd: gpio: Correct do_gpio() return value")
> Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
> ---
>
>  cmd/gpio.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

Please also add a test for this.


More information about the U-Boot mailing list