From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8E5ABC433EF for ; Wed, 20 Apr 2022 19:24:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E34C583EA3; Wed, 20 Apr 2022 21:24:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="FwttbDCQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A00D983E90; Wed, 20 Apr 2022 21:24:36 +0200 (CEST) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0FC2783E9D for ; Wed, 20 Apr 2022 21:24:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x830.google.com with SMTP id x24so1717985qtq.11 for ; Wed, 20 Apr 2022 12:24:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=rDtb9sOBAn58sRcDeLs5PTN55UHP+Y20ss3urnKqZGo=; b=FwttbDCQd7GuI/3JNVmy+ObABKJaAGZALWejfuntmOnhHAdtXaVQtrleG8QgcJBIn8 ONF5gu0DpUoWPkgs6VIy/blOS7c9Ojgz4+UMFi+AamLJHb+3gCsGgRTBG3OHD3+uQVJx 56bi48INkN7RRgv7JjJPKvJwUn/C/Mr0lA8lA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=rDtb9sOBAn58sRcDeLs5PTN55UHP+Y20ss3urnKqZGo=; b=WNXuOkrbikvrh7mDO/sGRcFjYVWsuzhc+9ytpxsQW97P9rRDbELBTGErrOeT26zbv0 orAU/z9RM54WsXfg3jmoHE6OiEpdGuVQS0u/Gi5eCFlO9gqnPXcf3ZLgkBwTcfc2Ftw5 M/PryIvm9+qemZByuG+Ezl4Z5796MpcgBuT64T5icGZdJ8DmvfPkag24K7xzWRZf7a6Y xgXfFp8AtUTdtndquzMQT0r/Afqid2jAK28L8fJjTiK8x52x04aQUAXY4eIdOXRcspQa vBYW1bc/jingRIj+NmUxsjZSVN4M9ZCksJKdZWZR/mUH590sdoal6mQA7G7KGMdpXLhm a20g== X-Gm-Message-State: AOAM531iBq1UqRU3OEAQcEwDU7XCega02JAGd+CXC+bomrEnR1d3Ix9k /Qrx9G3ne0zlCR68VlJl1q1IcwYt1rZGPA== X-Google-Smtp-Source: ABdhPJwPF5b4yFBREnDaeOQPhbIxvidhPsvhHSP0DkVXyJ8PbeZj8/nHC0sP3XN0WLbytUupffYgXg== X-Received: by 2002:a05:622a:95:b0:2f1:fa51:be58 with SMTP id o21-20020a05622a009500b002f1fa51be58mr12203126qtw.564.1650482670865; Wed, 20 Apr 2022 12:24:30 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id q8-20020a05622a04c800b002e06d7c1eabsm2174727qtx.16.2022.04.20.12.24.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 12:24:30 -0700 (PDT) Date: Wed, 20 Apr 2022 15:24:28 -0400 From: Tom Rini To: Diego Rondini Cc: u-boot@lists.denx.de Subject: Re: [PATCH v2] cmd: gpio: Add `gpio read` subcommand Message-ID: <20220420192428.GW3045430@bill-the-cat> References: <20220408234359.GA467796@bill-the-cat> <20220411100209.184072-1-diego.rondini@kynetics.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="F4Nz7zOi0wR5AkzI" Content-Disposition: inline In-Reply-To: <20220411100209.184072-1-diego.rondini@kynetics.com> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean --F4Nz7zOi0wR5AkzI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 11, 2022 at 12:02:09PM +0200, 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. > CONFIG_CMD_GPIO_READ is used to enable the `gpio read` command. >=20 > Signed-off-by: Diego Rondini Applied to u-boot/master, thanks! --=20 Tom --F4Nz7zOi0wR5AkzI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJgXewACgkQFHw5/5Y0 tyytyQv/edUGLZx/+oIXmxfOvBZT8bq8uhEniE0ZOVWXwQ/JN/NzJCkuhGYx4hKB te0e1W5MpwLDLrLfEhOPKRurCE13UIbL3nbRpIHBd2whw0bnX1t70880GR0HcQBU 4+yZwjLkI5L6CmoWvsJxlFsKht+Mvfaoe7GIAO0wyuoUDauLfOmN2QtQ2cuOxOS9 +EJ//5s5P5JZ22751uah+F62La8hcng52Fg+e4Qp72fOktg8PNKvYwui48su5vde AnIjrEuGFXM8KsTh+3M/Iwtde6NHI/ITriS9Xm8qINqf3dF26ffZ+BTNr5btpq4p 2SLBgf0hqVKnWXmdHqEqWH9ZOynAlqJowYHjAOmUZYu+hwtDC4oJrznnVHTxNyEg Af3N41XWkznma6wNyk2xwluJ4+PmdkANc8ZFfNsD3UAmLPTvR+J59WlpTzoIxgOV 7Z6KLQYUXMnQIsM9tYQajW+1zeO148kYOSU9yEcA8UceOuQkKde2jCQnE35qOZTv yM4H/4wp =PquQ -----END PGP SIGNATURE----- --F4Nz7zOi0wR5AkzI--