linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/gpio: add bias flags to lsgpio
@ 2020-04-30  0:09 Kent Gibson
  2020-05-05 16:27 ` Bartosz Golaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Kent Gibson @ 2020-04-30  0:09 UTC (permalink / raw)
  To: linux-kernel, linux-gpio, bgolaszewski, linus.walleij; +Cc: Kent Gibson

Add display of the bias flags.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-05 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-30  0:09 [PATCH] tools/gpio: add bias flags to lsgpio Kent Gibson
2020-05-05 16:27 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).