]> git.baikalelectronics.ru Git - uboot.git/commit
cmd: gpio: Make `gpio input` return pin value again
authorAlex Kiernan <alex.kiernan@gmail.com>
Wed, 11 Mar 2020 08:46:29 +0000 (08:46 +0000)
committerTom Rini <trini@konsulko.com>
Fri, 13 Mar 2020 13:30:30 +0000 (09:30 -0400)
commitcb2ac864d9c2af2a6663b68b3273afeeadcf0d97
tree0df4c0755bfc29e427d76f9cca984464276ebbb8
parent11259d52d782ad30e28e7ae73e9a2852b5a2cb22
cmd: gpio: Make `gpio input` return pin value again

a8f4e9f5cf39 ("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: a8f4e9f5cf39 ("cmd: gpio: Correct do_gpio() return value")
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Alex Kiernan <alex.kiernan@hivehome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/gpio.c
test/py/tests/test_gpio.py [new file with mode: 0644]