mbox series

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

Message ID 20200105191056.12571-1-luka.kovacic@sartura.hr
Headers show
Series cmd: gpio: Correct do_gpio() return value | expand

Message

Luka Kovacic Jan. 5, 2020, 7:10 p.m. UTC
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(-)