diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2008-12-05 03:15:54 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-12-20 22:21:14 -0500 |
commit | 749820928a2fd47ff536773d869d2c3f8038b7d1 (patch) | |
tree | 69f7f37a63f9c194f33fb7a16d12f62b583da6c8 /include | |
parent | 7736a3db98bed028d0e5235f8958a730acfd822e (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/of_gpio.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h index e25abf610cb6..fc2472c3c254 100644 --- a/include/linux/of_gpio.h +++ b/include/linux/of_gpio.h | |||
@@ -65,6 +65,7 @@ static inline struct of_mm_gpio_chip *to_of_mm_gpio_chip(struct gpio_chip *gc) | |||
65 | 65 | ||
66 | extern int of_get_gpio_flags(struct device_node *np, int index, | 66 | extern int of_get_gpio_flags(struct device_node *np, int index, |
67 | enum of_gpio_flags *flags); | 67 | enum of_gpio_flags *flags); |
68 | extern unsigned int of_gpio_count(struct device_node *np); | ||
68 | 69 | ||
69 | extern int of_mm_gpiochip_add(struct device_node *np, | 70 | extern int of_mm_gpiochip_add(struct device_node *np, |
70 | struct of_mm_gpio_chip *mm_gc); | 71 | struct of_mm_gpio_chip *mm_gc); |
@@ -81,6 +82,11 @@ static inline int of_get_gpio_flags(struct device_node *np, int index, | |||
81 | return -ENOSYS; | 82 | return -ENOSYS; |
82 | } | 83 | } |
83 | 84 | ||
85 | static inline unsigned int of_gpio_count(struct device_node *np) | ||
86 | { | ||
87 | return 0; | ||
88 | } | ||
89 | |||
84 | #endif /* CONFIG_OF_GPIO */ | 90 | #endif /* CONFIG_OF_GPIO */ |
85 | 91 | ||
86 | /** | 92 | /** |