diff options
Diffstat (limited to 'drivers/gpio/gpiolib-of.h')
| -rw-r--r-- | drivers/gpio/gpiolib-of.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/gpio/gpiolib-of.h b/drivers/gpio/gpiolib-of.h index a6c593e6766c..2257f7a498a1 100644 --- a/drivers/gpio/gpiolib-of.h +++ b/drivers/gpio/gpiolib-of.h @@ -4,12 +4,12 @@ #define GPIOLIB_OF_H #include <linux/err.h> -#include <linux/errno.h> #include <linux/types.h> #include <linux/notifier.h> -struct device; +struct device_node; +struct fwnode_handle; struct gpio_chip; struct gpio_desc; @@ -22,8 +22,8 @@ struct gpio_desc *of_find_gpio(struct device_node *np, unsigned long *lookupflags); int of_gpiochip_add(struct gpio_chip *gc); void of_gpiochip_remove(struct gpio_chip *gc); -int of_gpio_get_count(struct device *dev, const char *con_id); -void of_gpio_dev_init(struct gpio_chip *gc, struct gpio_device *gdev); +bool of_gpiochip_instance_match(struct gpio_chip *gc, unsigned int index); +int of_gpio_count(const struct fwnode_handle *fwnode, const char *con_id); #else static inline struct gpio_desc *of_find_gpio(struct device_node *np, const char *con_id, @@ -34,13 +34,15 @@ static inline struct gpio_desc *of_find_gpio(struct device_node *np, } static inline int of_gpiochip_add(struct gpio_chip *gc) { return 0; } static inline void of_gpiochip_remove(struct gpio_chip *gc) { } -static inline int of_gpio_get_count(struct device *dev, const char *con_id) +static inline bool of_gpiochip_instance_match(struct gpio_chip *gc, + unsigned int index) { - return 0; + return false; } -static inline void of_gpio_dev_init(struct gpio_chip *gc, - struct gpio_device *gdev) +static inline int of_gpio_count(const struct fwnode_handle *fwnode, + const char *con_id) { + return 0; } #endif /* CONFIG_OF_GPIO */ |
