Diego Rondini
authored
As explained in commit 4af2a33e ("cmd: gpio: Make `gpio input` return pin value again") the `gpio input` is used in scripts to obtain the value of a pin, despite the fact that CMD_RET_FAILURE is indistinguishable from a valid pin value. To be able to detect failures and properly use the value of a GPIO in scripts we introduce the `gpio read` command that sets the variable `name` to the value of the pin. Return code of the `gpio read` command can be used to check for CMD_RET_SUCCESS or CMD_RET_FAILURE. CONFIG_CMD_GPIO_READ is used to enable the `gpio read` command. Signed-off-by:Diego Rondini <diego.rondini@kynetics.com>
Name | Last commit | Last update |
---|---|---|
.. | ||
cmd | ||
common | ||
dm | ||
env | ||
fs | ||
image | ||
lib | ||
log | ||
optee | ||
overlay | ||
py | ||
stdint | ||
trace | ||
Kconfig | ||
Makefile | ||
bloblist.c | ||
bootm.c | ||
cmd_ut.c | ||
command_ut.c | ||
common.sh | ||
compression.c | ||
nokia_rx51_test.sh | ||
print_ut.c | ||
run | ||
str_ut.c | ||
test-main.c | ||
time_ut.c | ||
unicode_ut.c | ||
ut.c |