tools: gpio: add bias flags to lsgpio
authorKent Gibson <warthog618@gmail.com>
Thu, 30 Apr 2020 00:09:16 +0000 (08:09 +0800)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 5 May 2020 16:27:09 +0000 (18:27 +0200)
Add display of the bias flags.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
tools/gpio/lsgpio.c

index e1430f5..8a71ad3 100644 (file)
@@ -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)