[PATCH 0/1 v1] cmd: gpio: Correct do_gpio() return value

Luka Kovacic luka.kovacic at sartura.hr
Sun Jan 5 20:10:55 CET 2020


Hi,
The U-Boot gpio command always returns the value of the pin, which 
is confusing if you are debugging, since calling the command
gpio set pin always results in failure. 

The patch modifies the GPIO command to return CMD_RET_SUCCESS 
on success and CMD_RET_FAILURE on command failure and doesn't
use the pin value as a return value. 

Should this be changed, since users may rely on this in scripts?
What would be the best workaround?

Luka Kovacic (1):
  cmd: gpio: Correct do_gpio() return value

 cmd/gpio.c          | 22 +++++++++++++++++-----
 doc/README.commands |  4 ++--
 2 files changed, 19 insertions(+), 7 deletions(-)

-- 
2.20.1



More information about the U-Boot mailing list