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.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index d494001b122..8c8621097fa 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -41,6 +41,7 @@ static inline bool gpio_is_valid(int number)
41} 41}
42 42
43struct device; 43struct device;
44struct gpio;
44struct seq_file; 45struct seq_file;
45struct module; 46struct module;
46struct device_node; 47struct device_node;
@@ -170,18 +171,6 @@ extern int __gpio_cansleep(unsigned gpio);
170 171
171extern int __gpio_to_irq(unsigned gpio); 172extern int __gpio_to_irq(unsigned gpio);
172 173
173/**
174 * struct gpio - a structure describing a GPIO with configuration
175 * @gpio: the GPIO number
176 * @flags: GPIO configuration as specified by GPIOF_*
177 * @label: a literal description string of this GPIO
178 */
179struct gpio {
180 unsigned gpio;
181 unsigned long flags;
182 const char *label;
183};
184
185extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label); 174extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
186extern int gpio_request_array(const struct gpio *array, size_t num); 175extern int gpio_request_array(const struct gpio *array, size_t num);
187extern void gpio_free_array(const struct gpio *array, size_t num); 176extern void gpio_free_array(const struct gpio *array, size_t num);
@@ -220,13 +209,13 @@ static inline int gpio_cansleep(unsigned gpio)
220static inline int gpio_get_value_cansleep(unsigned gpio) 209static inline int gpio_get_value_cansleep(unsigned gpio)
221{ 210{
222 might_sleep(); 211 might_sleep();
223 return gpio_get_value(gpio); 212 return __gpio_get_value(gpio);
224} 213}
225 214
226static inline void gpio_set_value_cansleep(unsigned gpio, int value) 215static inline void gpio_set_value_cansleep(unsigned gpio, int value)
227{ 216{
228 might_sleep(); 217 might_sleep();
229 gpio_set_value(gpio, value); 218 __gpio_set_value(gpio, value);
230} 219}
231 220
232#endif /* !CONFIG_GPIOLIB */ 221#endif /* !CONFIG_GPIOLIB */