1 /* SPDX-License-Identifier: GPL-2.0 */
10 struct gpio_desc *of_find_gpio(struct device *dev,
13 unsigned long *lookupflags);
14 int of_gpiochip_add(struct gpio_chip *gc);
15 void of_gpiochip_remove(struct gpio_chip *gc);
16 int of_gpio_get_count(struct device *dev, const char *con_id);
17 bool of_gpio_need_valid_mask(const struct gpio_chip *gc);
18 void of_gpio_dev_init(struct gpio_chip *gc, struct gpio_device *gdev);
20 static inline struct gpio_desc *of_find_gpio(struct device *dev,
23 unsigned long *lookupflags)
25 return ERR_PTR(-ENOENT);
27 static inline int of_gpiochip_add(struct gpio_chip *gc) { return 0; }
28 static inline void of_gpiochip_remove(struct gpio_chip *gc) { }
29 static inline int of_gpio_get_count(struct device *dev, const char *con_id)
33 static inline bool of_gpio_need_valid_mask(const struct gpio_chip *gc)
37 static inline void of_gpio_dev_init(struct gpio_chip *gc,
38 struct gpio_device *gdev)
41 #endif /* CONFIG_OF_GPIO */
43 extern struct notifier_block gpio_of_notifier;
45 #endif /* GPIOLIB_OF_H */