aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/gpio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic/gpio.h')
-rw-r--r--include/asm-generic/gpio.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 66d6106a2067..485eeb6c4ef3 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -28,6 +28,7 @@ static inline int gpio_is_valid(int number)
28 return ((unsigned)number) < ARCH_NR_GPIOS; 28 return ((unsigned)number) < ARCH_NR_GPIOS;
29} 29}
30 30
31struct device;
31struct seq_file; 32struct seq_file;
32struct module; 33struct module;
33 34
@@ -144,6 +145,7 @@ extern int __gpio_to_irq(unsigned gpio);
144extern int gpio_export(unsigned gpio, bool direction_may_change); 145extern int gpio_export(unsigned gpio, bool direction_may_change);
145extern int gpio_export_link(struct device *dev, const char *name, 146extern int gpio_export_link(struct device *dev, const char *name,
146 unsigned gpio); 147 unsigned gpio);
148extern int gpio_sysfs_set_active_low(unsigned gpio, int value);
147extern void gpio_unexport(unsigned gpio); 149extern void gpio_unexport(unsigned gpio);
148 150
149#endif /* CONFIG_GPIO_SYSFS */ 151#endif /* CONFIG_GPIO_SYSFS */
@@ -181,6 +183,8 @@ static inline void gpio_set_value_cansleep(unsigned gpio, int value)
181 183
182#ifndef CONFIG_GPIO_SYSFS 184#ifndef CONFIG_GPIO_SYSFS
183 185
186struct device;
187
184/* sysfs support is only available with gpiolib, where it's optional */ 188/* sysfs support is only available with gpiolib, where it's optional */
185 189
186static inline int gpio_export(unsigned gpio, bool direction_may_change) 190static inline int gpio_export(unsigned gpio, bool direction_may_change)
@@ -194,6 +198,11 @@ static inline int gpio_export_link(struct device *dev, const char *name,
194 return -ENOSYS; 198 return -ENOSYS;
195} 199}
196 200
201static inline int gpio_sysfs_set_active_low(unsigned gpio, int value)
202{
203 return -ENOSYS;
204}
205
197static inline void gpio_unexport(unsigned gpio) 206static inline void gpio_unexport(unsigned gpio)
198{ 207{
199} 208}