From: Tom Rini <trini@konsulko.com>
To: Diego Rondini <diego.rondini@kynetics.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH] cmd: gpio: Add `gpio read` subcommand
Date: Fri, 8 Apr 2022 19:43:59 -0400 [thread overview]
Message-ID: <20220408234359.GA467796@bill-the-cat> (raw)
In-Reply-To: <20220322171435.3558515-1-diego.rondini@kynetics.com>
[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]
On Tue, Mar 22, 2022 at 06:14:35PM +0100, Diego Rondini wrote:
> As explained in commit 4af2a33ee5b9 ("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.
>
> Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
> ---
> cmd/gpio.c | 24 ++++++++++++++++++++----
> test/py/tests/test_gpio.py | 15 +++++++++++++++
> 2 files changed, 35 insertions(+), 4 deletions(-)
Please rework this to add CONFIG_CMD_GPIO_READ, and enable it on sandbox
as it causes a good bit of growth on a large number of platforms,
thanks.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2022-04-08 23:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 17:14 [PATCH] cmd: gpio: Add `gpio read` subcommand Diego Rondini
2022-04-08 23:43 ` Tom Rini [this message]
2022-04-11 10:02 ` [PATCH v2] " Diego Rondini
2022-04-20 19:24 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220408234359.GA467796@bill-the-cat \
--to=trini@konsulko.com \
--cc=diego.rondini@kynetics.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox