From patchwork Mon Sep 14 10:50:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1363511 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=Lt9yBZci; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bqjpv5j0jz9sTm for ; Mon, 14 Sep 2020 20:51:49 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0D1B581BD2; Mon, 14 Sep 2020 12:51:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gmx.de 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; secure) header.d=gmx.net header.i=@gmx.net header.b="Lt9yBZci"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 06A2182174; Mon, 14 Sep 2020 12:51:41 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9A0E4808B2 for ; Mon, 14 Sep 2020 12:51:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600080694; bh=He4VTrVdXFta7vvqO0jyRdAO0k9NLADOJmUwZKsflvU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=Lt9yBZciKdObiUogdNutvZnwMPEwPHtozC1nogo07Wmap/Kwb/muwhvwFYfQ3mMll b4RC/YdsFRap2pip2qM9rUQ3AkqG3U52IvxvSdlfGCtFHjTVUkKw2VkpEN5AEbk8MN KNOvl1liA6SVf3skBXliCqj8a8tTmglSMpzVXzeE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from LT02.fritz.box ([178.202.41.107]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MBm1e-1kNIuw2w1M-00CBHA; Mon, 14 Sep 2020 12:51:34 +0200 From: Heinrich Schuchardt To: Tom Rini Cc: Philippe Reynes , Simon Glass , Patrick Delaunay , Walter Lozano , Wolfgang Wallner , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH v2 0/3] cmd/button: return button status Date: Mon, 14 Sep 2020 12:50:53 +0200 Message-Id: <20200914105056.174287-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:junWa65v8Lw86R0O6Mfhm07cF0A1eLLWaS408poA8SbEe6FsfX+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P4MGAzmV1fJbB0KIyTn6/uZhSf7+j2 SF79B2dcFTPWg272CsCYsN1k4PAPejBcBUsMSOvU7GvxE3ZLdj4HdnHkgmieUh78crJFXDk9i Aab92VQw6BaPzimpxZ9uyUNl3D6xSwIQeAEfR/JfjLl5M7qLCkQLfPJnmdUQV27afQj9YzjWt e46LPuqjkCscXwDy78MJqxUSOrx2JGjaSBWa9KEmTq1gN6n+roIsJuTwx8nPc2TaPGdhJ9lYS SVuhn80dFBXKtE66NGwFxi1Bd0Ln2n2vNptd7Wuuk4jIJ2TXeTVjmW3elakMuIc5Mf1E45Snr vJN7eUktASgcVJFmft/GJAnaFPGwq8deiHHNdC6ypj9JTiptcY36tOv/7kE2K7I8ifVDM1EW7 OlhQJugNeFniAwGJfru+bC46JqDiku8jFPo7SnA== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean To make the button command useful in a shell script it should return the status of the button. Adjust the sandbox GPIO driver to keep the output value as input when switching to input. Adjust the device-tree labels of the sandbox GPIOs used for buttons. Enhance the Python unit test to check the button status returned by the button command. v2: adjust Python test adjust GPIO driver Heinrich Schuchardt (3): test: sharpen button label unit test drivers: gpio: keep output value for input on sandbox cmd/button: return button status arch/sandbox/dts/sandbox.dtsi | 8 ++++---- arch/sandbox/dts/test.dts | 8 ++++---- cmd/button.c | 4 ++-- drivers/gpio/sandbox.c | 10 +++++++++- test/dm/button.c | 6 +++--- test/py/tests/test_button.py | 36 ++++++++++++++++++++++++++--------- 6 files changed, 49 insertions(+), 23 deletions(-) --- 2.28.0