Skip to content

Commit eed5a3b

Browse files
andy-shevBartosz Golaszewski
authored andcommitted
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 <[email protected]> Acked-by: Rob Herring <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 3101b1e commit eed5a3b

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

drivers/gpio/gpiolib-of.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@
2323
#include "gpiolib.h"
2424
#include "gpiolib-of.h"
2525

26+
/*
27+
* This is Linux-specific flags. By default controllers' and Linux' mapping
28+
* match, but GPIO controllers are free to translate their own flags to
29+
* Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended.
30+
*/
31+
enum of_gpio_flags {
32+
OF_GPIO_ACTIVE_LOW = 0x1,
33+
OF_GPIO_SINGLE_ENDED = 0x2,
34+
OF_GPIO_OPEN_DRAIN = 0x4,
35+
OF_GPIO_TRANSITORY = 0x8,
36+
OF_GPIO_PULL_UP = 0x10,
37+
OF_GPIO_PULL_DOWN = 0x20,
38+
OF_GPIO_PULL_DISABLE = 0x40,
39+
};
40+
2641
/**
2742
* of_gpio_named_count() - Count GPIOs for a device
2843
* @np: device node to count GPIOs for

include/linux/of_gpio.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,6 @@
1717

1818
struct device_node;
1919

20-
/*
21-
* This is Linux-specific flags. By default controllers' and Linux' mapping
22-
* match, but GPIO controllers are free to translate their own flags to
23-
* Linux-specific in their .xlate callback. Though, 1:1 mapping is recommended.
24-
*/
25-
enum of_gpio_flags {
26-
OF_GPIO_ACTIVE_LOW = 0x1,
27-
OF_GPIO_SINGLE_ENDED = 0x2,
28-
OF_GPIO_OPEN_DRAIN = 0x4,
29-
OF_GPIO_TRANSITORY = 0x8,
30-
OF_GPIO_PULL_UP = 0x10,
31-
OF_GPIO_PULL_DOWN = 0x20,
32-
OF_GPIO_PULL_DISABLE = 0x40,
33-
};
34-
3520
#ifdef CONFIG_OF_GPIO
3621

3722
#include <linux/container_of.h>

0 commit comments

Comments
 (0)