summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2020-03-13 13:21:17 -0400
committerTom Rini <[email protected]>2020-03-13 13:21:17 -0400
commit50be9f0e1ccc0909e65132cff216743a49046f97 (patch)
treecbb6f9c3031ab81d5b0a775906727df844b0a618 /cmd
parentdb3b1818b7a9711084255713ec14cb886eb79b12 (diff)
parentd21ffa2a2ebc366b8ca644324d76bb2924947373 (diff)
Merge branch '2020-03-13-master-imports'
- Address the regression with the 'gpio' command - Fix mcfuart regression - Other minor fixes
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gpio.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/gpio.c b/cmd/gpio.c
index 16c2cebb3d4..408a942455b 100644
--- a/cmd/gpio.c
+++ b/cmd/gpio.c
@@ -248,7 +248,12 @@ static int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (ret != -EBUSY)
gpio_free(gpio);
- return CMD_RET_SUCCESS;
+ /*
+ * Whilst wrong, the legacy gpio input command returns the pin
+ * value, or CMD_RET_FAILURE (which is indistinguishable from a
+ * valid pin value).
+ */
+ return (sub_cmd == GPIOC_INPUT) ? value : CMD_RET_SUCCESS;
err:
if (ret != -EBUSY)