diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2008-10-16 01:03:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 14:21:40 -0400 |
commit | 0f6d504e73b49374c6093efe6aa60ab55058248a (patch) | |
tree | 414c9e591ba23b2126bc9cad4e0efb1b60693b2d /Documentation | |
parent | 2f8d11971b9f54362437ce70f4d1911f0996d542 (diff) |
gpiolib: gpio_to_irq() hooks
Add a new gpiolib mechanism: gpio_chip instances can provide mappings
between their (input) GPIOs and any associated IRQs. This makes it easier
for platforms to support IRQs that are provided by board-specific external
chips instead of as part of their core (such as SOC-integrated GPIOs).
Also update the irq_to_gpio() description, saying to avoid it because it's
not always supported.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/gpio.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt index 18022e249c53..8a7c45956d24 100644 --- a/Documentation/gpio.txt +++ b/Documentation/gpio.txt | |||
@@ -264,7 +264,7 @@ map between them using calls like: | |||
264 | /* map GPIO numbers to IRQ numbers */ | 264 | /* map GPIO numbers to IRQ numbers */ |
265 | int gpio_to_irq(unsigned gpio); | 265 | int gpio_to_irq(unsigned gpio); |
266 | 266 | ||
267 | /* map IRQ numbers to GPIO numbers */ | 267 | /* map IRQ numbers to GPIO numbers (avoid using this) */ |
268 | int irq_to_gpio(unsigned irq); | 268 | int irq_to_gpio(unsigned irq); |
269 | 269 | ||
270 | Those return either the corresponding number in the other namespace, or | 270 | Those return either the corresponding number in the other namespace, or |
@@ -284,7 +284,8 @@ system wakeup capabilities. | |||
284 | 284 | ||
285 | Non-error values returned from irq_to_gpio() would most commonly be used | 285 | Non-error values returned from irq_to_gpio() would most commonly be used |
286 | with gpio_get_value(), for example to initialize or update driver state | 286 | with gpio_get_value(), for example to initialize or update driver state |
287 | when the IRQ is edge-triggered. | 287 | when the IRQ is edge-triggered. Note that some platforms don't support |
288 | this reverse mapping, so you should avoid using it. | ||
288 | 289 | ||
289 | 290 | ||
290 | Emulating Open Drain Signals | 291 | Emulating Open Drain Signals |