From: Matti Vaittinen Date: Wed, 6 Nov 2019 08:51:47 +0000 (+0200) Subject: gpio: Add definition for GPIO direction X-Git-Tag: v5.5-rc1~94^2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9208b1e77d6e8e9776f34f46ef4079ecac9c3c25;p=thirdparty%2Flinux.git gpio: Add definition for GPIO direction 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 Signed-off-by: Linus Walleij --- diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 5dd9c982e2cbe..cc9ade4552d95 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -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 */