Skip to contentSkip to conversation

tools/gpio: add bias flags to lsgpio

PATCH In review Kent Gibson 2 participants 2 messages Apr 30, 2020 – May 5, 2020

Subsystems (2)
lore
Share & tools
lore

Kent Gibson

author reviewer
#0 lore raw

PATCH 1/1 tools/gpio: add bias flags to lsgpio

Add display of the bias flags.

---
 tools/gpio/lsgpio.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tools/gpio/lsgpio.c +12 -0
index e1430f504c13..8a71ad36f83b 100644
@@ -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)
Signature · 1 line
2.26.2
#1 lore raw

czw., 30 kwi 2020 o 02:10 Kent Gibson <[email protected]> napisał(a):

Quoted 32 lines

Add display of the bias flags.

---
 tools/gpio/lsgpio.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tools/gpio/lsgpio.c +12 -1
index e1430f504c13..8a71ad36f83b 100644
@@ -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)
--
Quoted 2 lines

2.26.2

Patch applied, thanks!

Bart