Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1207775ybz; Wed, 29 Apr 2020 17:11:59 -0700 (PDT) X-Google-Smtp-Source: APiQypJSNODR0btrHh7JJGmyqpHTVZIPueF7Mkw8jYQcgsk/iIFJhLIB6o4aUjoG8CzFSBi1XcrQ X-Received: by 2002:aa7:dd95:: with SMTP id g21mr457354edv.148.1588205518876; Wed, 29 Apr 2020 17:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588205518; cv=none; d=google.com; s=arc-20160816; b=akT6wlqKzvX+WTNp5Kap9+Hu5lztRyWKUh6uxOrvCBAwKOGHxbDE/5nR2sRKsn+3dy cuG30tXKb0fR38WSvQIw04w0LwnxbhZjQZ/EAt2PcfqL0rht/1AEvo2pxiaF/2WueQXW W2KRqYbBhY7F9Y53kIfGwU6zmXpUwHI7CMqQ3tAOeD5MpkLyP21mS++5lLqZXWbPcuM7 pfvRKl1vsuFLTtTpExSVu197ZJSR9cPnZJiqBaufgOfKf+IPwfgiwD98k5Z3JMKEwU4z umvqaUwLUoXdsvjclsVdLePmNYP3Pmhtpeq67ieKTPT0ufVR7gWCBDKCXGHFBMLCjrdN ER6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=X0Uv2a8SpWt1dTnmxZxhtVMKOvjS4ym5W5xsfvNLKFk=; b=NfILTAqPUlxDknJjsqMmLYR7uYcqnM0CBRTfOkDURqAqPXDw4AgNHBUyKxbSFq5ncP 25lBiXIURUnCX9iT6wc8QWAozK+GxFfpeDfv0Nnek/Wb06JLFuUFgxhVxJVUbozVGiCb AcOi6klBZr1tZiL+j11X/4845XpuWjgH27Y3XDyEyHJCg2fZPxw0uH4cKZzVeAj1BuzS ch4l9ZLK2AzOAjhDKhX7kSpASsM5v/h+l5F1Sj56w+xuTCe1+OZza+HYBdMi6aULaim/ N+eRGSuZTL04Ajyyg0vrZ0nBTv1QlrkFLFJWKaztFC7qItsyzS9aop/3bxA13YtXJ9KC 71Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cqZlXLKl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h11si3944108edr.106.2020.04.29.17.11.35; Wed, 29 Apr 2020 17:11:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cqZlXLKl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726386AbgD3AKF (ORCPT + 99 others); Wed, 29 Apr 2020 20:10:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726282AbgD3AKF (ORCPT ); Wed, 29 Apr 2020 20:10:05 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2656AC03C1AE; Wed, 29 Apr 2020 17:10:05 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id w65so1951267pfc.12; Wed, 29 Apr 2020 17:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=X0Uv2a8SpWt1dTnmxZxhtVMKOvjS4ym5W5xsfvNLKFk=; b=cqZlXLKlr6kvQbC0dL7m42EaWEosWMCnT7t7YFh0HujWAh492foEsN/2JJdJimAx8K LxZnPhu35w27UkiJt9ED7pUXUn/0g1kU+yfHaKM9xmMM5+dRu9eJnuAyLKWUilRUZq9z YI9LEhBrx++jmdHpvoAtuqS5kzvCKtcXaJIUwxiiTvlQvXN7xR0haNkjar7AaS9xIWNz fXq0lyWucBs4aaToG16hy0cII4NBeMDuFXuMvadKDI3M9LXbgTby23hUpN5ZupHs3lML dtHI2yMxi9K9QnP34MaE9OBy2zk5JuoTTE20Yu8Xi1PPCFEB7nObb2eAd6LxvNdvArjX dJfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=X0Uv2a8SpWt1dTnmxZxhtVMKOvjS4ym5W5xsfvNLKFk=; b=UbHswpBIlvw+SXm7zYCDquPWknQD0rakW+UqPiDJyCkzCIXgV0ayd2yb+5I4g1btx7 yC1V59BtK7jt2kSA8wyQv0wYuATR1qUapvFI9ao5awCpgFAJGV19YDf8uOOiiI4kuHn5 k9qK2mX4VZABlm6WVc2GwLOGVEveC/Er5S2MGDohbxHWsGONlMTmMJjvUICETOLfxbg2 XKdxUzp2BV9EN454zMehPVF8ocWzEDmZ1FphDv9KuoJyA0j5a2aOdeeymfHmoFhLl+fO fyTj6YYkNCKNDKnAJycf21L3hTpASsQup/SYkSSHWgg0JzI23bz9IzKIs/D4PZ51A9xd U4wQ== X-Gm-Message-State: AGi0PuZIdsS5kS616/7t9v0LHSxcno1aaoplRffHvV1ADvNPbS74z+un wh9XiYdqObxTMjVQ/MPcymahZ2TlFW8= X-Received: by 2002:a63:c443:: with SMTP id m3mr803622pgg.262.1588205404045; Wed, 29 Apr 2020 17:10:04 -0700 (PDT) Received: from sol.lan (220-235-85-217.dyn.iinet.net.au. [220.235.85.217]) by smtp.gmail.com with ESMTPSA id 207sm1840592pgh.34.2020.04.29.17.10.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 17:10:03 -0700 (PDT) From: Kent Gibson To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, bgolaszewski@baylibre.com, linus.walleij@linaro.org Cc: Kent Gibson Subject: [PATCH] tools/gpio: add bias flags to lsgpio Date: Thu, 30 Apr 2020 08:09:16 +0800 Message-Id: <20200430000916.8880-1-warthog618@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add display of the bias flags. Signed-off-by: Kent Gibson --- tools/gpio/lsgpio.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c index e1430f504c13..8a71ad36f83b 100644 --- a/tools/gpio/lsgpio.c +++ b/tools/gpio/lsgpio.c @@ -49,6 +49,18 @@ struct gpio_flag flagnames[] = { .name = "open-source", .mask = GPIOLINE_FLAG_OPEN_SOURCE, }, + { + .name = "pull-up", + .mask = GPIOLINE_FLAG_BIAS_PULL_UP, + }, + { + .name = "pull-down", + .mask = GPIOLINE_FLAG_BIAS_PULL_DOWN, + }, + { + .name = "bias-disabled", + .mask = GPIOLINE_FLAG_BIAS_DISABLE, + }, }; void print_flags(unsigned long flags) -- 2.26.2