hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/of_gpio.h
....@@ -11,9 +11,8 @@
1111 #define __LINUX_OF_GPIO_H
1212
1313 #include <linux/compiler.h>
14
-#include <linux/kernel.h>
15
-#include <linux/errno.h>
16
-#include <linux/gpio.h>
14
+#include <linux/gpio/driver.h>
15
+#include <linux/gpio.h> /* FIXME: Shouldn't be here */
1716 #include <linux/of.h>
1817
1918 struct device_node;
....@@ -28,9 +27,13 @@
2827 OF_GPIO_SINGLE_ENDED = 0x2,
2928 OF_GPIO_OPEN_DRAIN = 0x4,
3029 OF_GPIO_TRANSITORY = 0x8,
30
+ OF_GPIO_PULL_UP = 0x10,
31
+ OF_GPIO_PULL_DOWN = 0x20,
3132 };
3233
3334 #ifdef CONFIG_OF_GPIO
35
+
36
+#include <linux/kernel.h>
3437
3538 /*
3639 * OF GPIO chip for memory mapped banks
....@@ -59,11 +62,9 @@
5962 }
6063 extern void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc);
6164
62
-extern int of_gpio_simple_xlate(struct gpio_chip *gc,
63
- const struct of_phandle_args *gpiospec,
64
- u32 *flags);
65
-
6665 #else /* CONFIG_OF_GPIO */
66
+
67
+#include <linux/errno.h>
6768
6869 /* Drivers may not strictly depend on the GPIO support, so let them link. */
6970 static inline int of_get_named_gpio_flags(struct device_node *np,
....@@ -72,13 +73,6 @@
7273 if (flags)
7374 *flags = 0;
7475
75
- return -ENOSYS;
76
-}
77
-
78
-static inline int of_gpio_simple_xlate(struct gpio_chip *gc,
79
- const struct of_phandle_args *gpiospec,
80
- u32 *flags)
81
-{
8276 return -ENOSYS;
8377 }
8478