[PATCH 00/11] Prepare for OMAP2+ movement to Common Clk
Paul Walmsley
paul at pwsan.com
Wed Jun 27 15:59:21 EDT 2012
+ Kevin
On Wed, 27 Jun 2012, Laurent Pinchart wrote:
> OK, I think I've found the information. I'll give this a try.
That sounds great.
> What is still not clear to me is how runtime PM and system PM interact. For
> instance the OMAP3 ISP driver disables its clocks in the system PM suspend
> handler, and restarts them in the system PM resume handler. How do I port that
> to runtime PM, can I just call pm_runtime_put() and pm_runtime_get_sync() in
> the system PM handlers ?
I've lost track of what the official guidance on this is. But we have
plenty of drivers that do this. A few examples are
drivers/mmc/host/omap_hsmmc.c, drivers/spi/spi-omap2-mcspi.c, and the DSS
drivers.
IMHO, if possible, for the driver's system suspend call, the best thing to
do is to check to see if the driver is currently doing something. If it
is, then ask it to stop. Then wait until it does. When it stops, that
other part of the driver is ideally what should do the pm_runtime_put*().
It's been a long time since I've looked, but I'd be surprised if we had
many drivers that operated like that...
- Paul
More information about the linux-arm-kernel
mailing list