diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-29 10:27:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-29 10:27:45 -0400 |
commit | 41684f67af75b04152a1714e1a5375dfb00ee3da (patch) | |
tree | 3b0f51dd8103a4fd40ebb6cefeece7579e348cde /include/asm-generic | |
parent | ec7ae517537ae5c7b0b2cd7f562dfa3e7a05b954 (diff) | |
parent | d92ef29a6fa971d9e314e412cd9c09757906411a (diff) |
Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6
* 'gpio/next' of git://git.secretlab.ca/git/linux-2.6:
h8300: Move gpio.h to gpio-internal.h
gpio: pl061: add DT binding support
gpio: fix build error in include/asm-generic/gpio.h
gpiolib: Ensure struct gpio is always defined
irq: Add EXPORT_SYMBOL_GPL to function of irq generic-chip
gpio-ml-ioh: Use NUMA_NO_NODE not GFP_KERNEL
gpio-pch: Use NUMA_NO_NODE not GFP_KERNEL
gpio: langwell: ensure alternate function is cleared
gpio-pch: Support interrupt function
gpio-pch: Save register value in suspend()
gpio-pch: modify gpio_nums and mask
gpio-pch: support ML7223 IOH n-Bus
gpio-pch: add spinlock in suspend/resume processing
gpio-pch: Delete invalid "restore" code in suspend()
gpio-ml-ioh: Fix suspend/resume issue
gpio-ml-ioh: Support interrupt function
gpio-ml-ioh: Delete unnecessary code
gpio/mxc: add chained_irq_enter/exit() to mx3_gpio_irq_handler()
gpio/nomadik: use genirq core to track enablement
gpio/nomadik: disable clocks when unused
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/gpio.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index d494001b1226..8c8621097fa0 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 | ||
43 | struct device; | 43 | struct device; |
44 | struct gpio; | ||
44 | struct seq_file; | 45 | struct seq_file; |
45 | struct module; | 46 | struct module; |
46 | struct device_node; | 47 | struct device_node; |
@@ -170,18 +171,6 @@ extern int __gpio_cansleep(unsigned gpio); | |||
170 | 171 | ||
171 | extern int __gpio_to_irq(unsigned gpio); | 172 | extern 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 | */ | ||
179 | struct gpio { | ||
180 | unsigned gpio; | ||
181 | unsigned long flags; | ||
182 | const char *label; | ||
183 | }; | ||
184 | |||
185 | extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label); | 174 | extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label); |
186 | extern int gpio_request_array(const struct gpio *array, size_t num); | 175 | extern int gpio_request_array(const struct gpio *array, size_t num); |
187 | extern void gpio_free_array(const struct gpio *array, size_t num); | 176 | extern void gpio_free_array(const struct gpio *array, size_t num); |
@@ -220,13 +209,13 @@ static inline int gpio_cansleep(unsigned gpio) | |||
220 | static inline int gpio_get_value_cansleep(unsigned gpio) | 209 | static 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 | ||
226 | static inline void gpio_set_value_cansleep(unsigned gpio, int value) | 215 | static 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 */ |