diff options
Diffstat (limited to 'include/asm-generic/gpio.h')
-rw-r--r-- | include/asm-generic/gpio.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 4f3d75e1ad3..af2544ef0b5 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -31,6 +31,7 @@ static inline int gpio_is_valid(int number) struct device; struct seq_file; struct module; +struct device_node; /** * struct gpio_chip - abstract a GPIO controller @@ -106,6 +107,17 @@ struct gpio_chip { const char *const *names; unsigned can_sleep:1; unsigned exported:1; + +#if defined(CONFIG_OF_GPIO) + /* + * If CONFIG_OF is enabled, then all GPIO controllers described in the + * device tree automatically may have an OF translation + */ + struct device_node *of_node; + int of_gpio_n_cells; + int (*of_xlate)(struct gpio_chip *gc, struct device_node *np, + const void *gpio_spec, u32 *flags); +#endif }; extern const char *gpiochip_is_requested(struct gpio_chip *chip, |