gpiolib: of: Move enum of_gpio_flags to its only user
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 12 Jan 2023 14:51:40 +0000 (16:51 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 30 Jan 2023 14:55:31 +0000 (15:55 +0100)
GPIO library for OF is the only user for enum of_gpio_flags.
Move it there.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpiolib-of.c
include/linux/of_gpio.h

index edc769d2d338b78266922a284f42a362efbe90e6..72d8a3da31e3d0a68efe71faa5d8be346f393284 100644 (file)
 #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
index 935225caf70de2738e2ea2c8d5a0c21a7fa1cfc5..5d58b3b0a97e1dfa5181f3f3bac75b16a8070aa7 100644 (file)
 
 struct device_node;
 
-/*
- * 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,
-};
-
 #ifdef CONFIG_OF_GPIO
 
 #include <linux/container_of.h>