From patchwork Sun Jan 5 19:10:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luka Kovacic X-Patchwork-Id: 239156 List-Id: U-Boot discussion From: luka.kovacic at sartura.hr (Luka Kovacic) Date: Sun, 5 Jan 2020 20:10:55 +0100 Subject: [PATCH 0/1 v1] cmd: gpio: Correct do_gpio() return value Message-ID: <20200105191056.12571-1-luka.kovacic@sartura.hr> 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(-)