| .. | .. | 
|---|
| 11 | 11 | #define __LINUX_OF_GPIO_H | 
|---|
| 12 | 12 |  | 
|---|
| 13 | 13 | #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 */ | 
|---|
| 17 | 16 | #include <linux/of.h> | 
|---|
| 18 | 17 |  | 
|---|
| 19 | 18 | struct device_node; | 
|---|
| .. | .. | 
|---|
| 28 | 27 | OF_GPIO_SINGLE_ENDED = 0x2, | 
|---|
| 29 | 28 | OF_GPIO_OPEN_DRAIN = 0x4, | 
|---|
| 30 | 29 | OF_GPIO_TRANSITORY = 0x8, | 
|---|
|  | 30 | +	OF_GPIO_PULL_UP = 0x10, | 
|---|
|  | 31 | +	OF_GPIO_PULL_DOWN = 0x20, | 
|---|
| 31 | 32 | }; | 
|---|
| 32 | 33 |  | 
|---|
| 33 | 34 | #ifdef CONFIG_OF_GPIO | 
|---|
|  | 35 | + | 
|---|
|  | 36 | +#include <linux/kernel.h> | 
|---|
| 34 | 37 |  | 
|---|
| 35 | 38 | /* | 
|---|
| 36 | 39 | * OF GPIO chip for memory mapped banks | 
|---|
| .. | .. | 
|---|
| 59 | 62 | } | 
|---|
| 60 | 63 | extern void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc); | 
|---|
| 61 | 64 |  | 
|---|
| 62 |  | -extern int of_gpio_simple_xlate(struct gpio_chip *gc, | 
|---|
| 63 |  | -				const struct of_phandle_args *gpiospec, | 
|---|
| 64 |  | -				u32 *flags); | 
|---|
| 65 |  | - | 
|---|
| 66 | 65 | #else /* CONFIG_OF_GPIO */ | 
|---|
|  | 66 | + | 
|---|
|  | 67 | +#include <linux/errno.h> | 
|---|
| 67 | 68 |  | 
|---|
| 68 | 69 | /* Drivers may not strictly depend on the GPIO support, so let them link. */ | 
|---|
| 69 | 70 | static inline int of_get_named_gpio_flags(struct device_node *np, | 
|---|
| .. | .. | 
|---|
| 72 | 73 | if (flags) | 
|---|
| 73 | 74 | *flags = 0; | 
|---|
| 74 | 75 |  | 
|---|
| 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 |  | -{ | 
|---|
| 82 | 76 | return -ENOSYS; | 
|---|
| 83 | 77 | } | 
|---|
| 84 | 78 |  | 
|---|