Skip to content

Commit

Permalink
tools: gpio: add bias flags to lsgpio
Browse files Browse the repository at this point in the history
Add display of the bias flags.

Signed-off-by: Kent Gibson <[email protected]>
Signed-off-by: Bartosz Golaszewski <[email protected]>
  • Loading branch information
warthog618 authored and brgl committed May 5, 2020
1 parent 17f96ee commit 3831c05
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tools/gpio/lsgpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3831c05

Please sign in to comment.