diff options
Diffstat (limited to 'Documentation/gpio.txt')
-rw-r--r-- | Documentation/gpio.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt index 18022e249c53..b1b988701247 100644 --- a/Documentation/gpio.txt +++ b/Documentation/gpio.txt | |||
@@ -240,6 +240,10 @@ signal, or (b) something wrongly believes it's safe to remove drivers | |||
240 | needed to manage a signal that's in active use. That is, requesting a | 240 | needed to manage a signal that's in active use. That is, requesting a |
241 | GPIO can serve as a kind of lock. | 241 | GPIO can serve as a kind of lock. |
242 | 242 | ||
243 | Some platforms may also use knowledge about what GPIOs are active for | ||
244 | power management, such as by powering down unused chip sectors and, more | ||
245 | easily, gating off unused clocks. | ||
246 | |||
243 | These two calls are optional because not not all current Linux platforms | 247 | These two calls are optional because not not all current Linux platforms |
244 | offer such functionality in their GPIO support; a valid implementation | 248 | offer such functionality in their GPIO support; a valid implementation |
245 | could return success for all gpio_request() calls. Unlike the other calls, | 249 | could return success for all gpio_request() calls. Unlike the other calls, |
@@ -264,7 +268,7 @@ map between them using calls like: | |||
264 | /* map GPIO numbers to IRQ numbers */ | 268 | /* map GPIO numbers to IRQ numbers */ |
265 | int gpio_to_irq(unsigned gpio); | 269 | int gpio_to_irq(unsigned gpio); |
266 | 270 | ||
267 | /* map IRQ numbers to GPIO numbers */ | 271 | /* map IRQ numbers to GPIO numbers (avoid using this) */ |
268 | int irq_to_gpio(unsigned irq); | 272 | int irq_to_gpio(unsigned irq); |
269 | 273 | ||
270 | Those return either the corresponding number in the other namespace, or | 274 | Those return either the corresponding number in the other namespace, or |
@@ -284,7 +288,8 @@ system wakeup capabilities. | |||
284 | 288 | ||
285 | Non-error values returned from irq_to_gpio() would most commonly be used | 289 | 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 | 290 | with gpio_get_value(), for example to initialize or update driver state |
287 | when the IRQ is edge-triggered. | 291 | when the IRQ is edge-triggered. Note that some platforms don't support |
292 | this reverse mapping, so you should avoid using it. | ||
288 | 293 | ||
289 | 294 | ||
290 | Emulating Open Drain Signals | 295 | Emulating Open Drain Signals |