mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
of/gpio: Implement of_gpio_count()
This function is used to count how many GPIOs are specified for a device node. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
7736a3db98
commit
749820928a
2 changed files with 40 additions and 0 deletions
|
@ -65,6 +65,7 @@ static inline struct of_mm_gpio_chip *to_of_mm_gpio_chip(struct gpio_chip *gc)
|
|||
|
||||
extern int of_get_gpio_flags(struct device_node *np, int index,
|
||||
enum of_gpio_flags *flags);
|
||||
extern unsigned int of_gpio_count(struct device_node *np);
|
||||
|
||||
extern int of_mm_gpiochip_add(struct device_node *np,
|
||||
struct of_mm_gpio_chip *mm_gc);
|
||||
|
@ -81,6 +82,11 @@ static inline int of_get_gpio_flags(struct device_node *np, int index,
|
|||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline unsigned int of_gpio_count(struct device_node *np)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_OF_GPIO */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue