1 /* SPDX-License-Identifier: GPL-2.0 */
7 #include <linux/errno.h>
8 #include <linux/types.h>
10 #include <linux/notifier.h>
19 struct gpio_desc *of_find_gpio(struct device_node *np,
22 unsigned long *lookupflags);
23 int of_gpiochip_add(struct gpio_chip *gc);
24 void of_gpiochip_remove(struct gpio_chip *gc);
25 int of_gpio_get_count(struct device *dev, const char *con_id);
26 void of_gpio_dev_init(struct gpio_chip *gc, struct gpio_device *gdev);
28 static inline struct gpio_desc *of_find_gpio(struct device_node *np,
31 unsigned long *lookupflags)
33 return ERR_PTR(-ENOENT);
35 static inline int of_gpiochip_add(struct gpio_chip *gc) { return 0; }
36 static inline void of_gpiochip_remove(struct gpio_chip *gc) { }
37 static inline int of_gpio_get_count(struct device *dev, const char *con_id)
41 static inline void of_gpio_dev_init(struct gpio_chip *gc,
42 struct gpio_device *gdev)
45 #endif /* CONFIG_OF_GPIO */
47 extern struct notifier_block gpio_of_notifier;
49 #endif /* GPIOLIB_OF_H */