From eed5a3bfafe6840494f7752b5cecd2a610b54fef Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 12 Jan 2023 16:51:40 +0200 Subject: gpiolib: of: Move enum of_gpio_flags to its only user GPIO library for OF is the only user for enum of_gpio_flags. Move it there. Signed-off-by: Andy Shevchenko Acked-by: Rob Herring Reviewed-by: Arnd Bergmann Signed-off-by: Bartosz Golaszewski --- drivers/gpio/gpiolib-of.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'drivers/gpio/gpiolib-of.c') diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index edc769d2d338..72d8a3da31e3 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -23,6 +23,21 @@ #include "gpiolib.h" #include "gpiolib-of.h" +/* + * This is Linux-specific flags. By default controllers' and Linux' mapping + * match, but GPIO controllers are free to translate their own flags to + * Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended. + */ +enum of_gpio_flags { + OF_GPIO_ACTIVE_LOW = 0x1, + OF_GPIO_SINGLE_ENDED = 0x2, + OF_GPIO_OPEN_DRAIN = 0x4, + OF_GPIO_TRANSITORY = 0x8, + OF_GPIO_PULL_UP = 0x10, + OF_GPIO_PULL_DOWN = 0x20, + OF_GPIO_PULL_DISABLE = 0x40, +}; + /** * of_gpio_named_count() - Count GPIOs for a device * @np: device node to count GPIOs for -- cgit