Thread (4 messages) 4 messages, 3 authors, 2011-09-24
STALE5373d
Revisions (14)
  1. v6 [diff vs current]
  2. v6 [diff vs current]
  3. v6 [diff vs current]
  4. v7 [diff vs current]
  5. v7 current
  6. v7 [diff vs current]
  7. v7 [diff vs current]
  8. v7 [diff vs current]
  9. v7 [diff vs current]
  10. v7 [diff vs current]
  11. v8 [diff vs current]
  12. v8 [diff vs current]
  13. v8 [diff vs current]
  14. v9 [diff vs current]

[PATCH v7 00/26] gpio/omap: driver cleanup and fixes

From: Kevin Hilman <hidden>
Date: 2011-09-22 23:57:27
Also in: linux-omap

Possibly related (same subject, not in this thread)

Tarun Kanti DebBarma [off-list ref] writes:
This series is continuation of cleanup of OMAP GPIO driver and fixes.
The cleanup include getting rid of cpu_is_* checks wherever possible,
use of gpio_bank list instead of static array, use of unique platform
specific value associated data member to OMAP platforms to avoid
cpu_is_* checks. The series also include PM runtime support.*
PER is still not hitting retention for me on 34xx/n900 when GPIOs have
debounce enabled.  Disabling debounce in the board file makes it work.

[...]
- Add dbclk aliases for all GPIO modules. Without this, GPIO modules were not
  getting the correct clock handle to enable/disable debounec clock.
This isn't right.  hwmod should already be adding aliases for the
optional clocks.

After debugging this myself a bit, here's what I think may be going on.
This may not be the only problem but here's at least one of them.

First, debounce clocks are disabled in the runtime_suspend callback.

When a GPIO is freed and it's the last one in the bank, bank->mod_usage
goes to zero.

After that, pm_runtime_put_sync() is called, which will trigger the
driver's ->runtime_suspend callback.  The ->runtime_suspend() callback
checks bank->mod_usage as well, and if zero, doesn't do anything
(notably, it doesn't disable debounce clocks.)

Kevin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help