Skip to content

Commit

Permalink
gpio: Add definition for GPIO direction
Browse files Browse the repository at this point in the history
At least for me it is difficult to remember the meaning of GPIO
direction values. Define GPIO_LINE_DIRECTION_IN and
GPIO_LINE_DIRECTION_OUT so that occasional GPIO contributors would
not need to always check the meaning of hard coded values 1 and 0.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Matti Vaittinen authored and Linus Walleij committed Nov 7, 2019
1 parent 5d682fa commit 9208b1e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/linux/gpio/driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ enum gpio_lookup_flags;

struct gpio_chip;

#define GPIO_LINE_DIRECTION_IN 1
#define GPIO_LINE_DIRECTION_OUT 0

/**
* struct gpio_irq_chip - GPIO interrupt controller
*/
Expand Down

0 comments on commit 9208b1e

Please sign in to comment.