From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>,
mturquette@ti.com, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Sakari Ailus <sakari.ailus@iki.fi>,
khilman@ti.com
Subject: Re: [PATCH 00/11] Prepare for OMAP2+ movement to Common Clk
Date: Wed, 27 Jun 2012 22:25:53 +0200 [thread overview]
Message-ID: <2172351.1193SiRd5m@avalon> (raw)
In-Reply-To: <alpine.DEB.2.00.1206271344200.27496@utopia.booyaka.com>
Hi Paul,
On Wednesday 27 June 2012 13:59:21 Paul Walmsley wrote:
> + 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.
I'll repeat here what I've stated in my other mail, as Kevin is CC'ed.
I haven't had much luck, pm_runtime_get_sync() doesn't seem to enable the ISP
clocks. I'd like to trace what happens (or rather doesn't happen), but I'm not
familiar with runtime PM internals. What's the call stack from
pm_runtime_get_sync() to the arch code that's supposed to enable clocks ?
> > 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.
That's what has always bothered me with runtime PM, I've never been able to
find clear official guidelines (possibly because there are none).
(Along with the fact that, for the OMAP3 ISP, I still don't see what benefits
the runtime PM complexity will bring)
> 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*().
I don't think I can do that. The omap3-isp driver implements a PM prepare
operation that stops all device activity, and a PM suspend operation that
turns off the clocks. The reason for that split is that the sensor (which has
its own device, its own driver and its own PM operations) needs to be
suspended after the ISP is stopped, but before the clocks are turned off.
My suspend handler thus needs to stop the clocks without performing any other
operation. Calling pm_runtime_put() there is an option, I'll try it. It seems
to be legal, as the hsmmc driver uses pm_runtime_put_sync() in its suspend
handler. Is the _sync required there BTW ? Won't system suspend turn the
clocks off anyway ? Or would there be a problem at resume time ?
> It's been a long time since I've looked, but I'd be surprised if we had
> many drivers that operated like that...
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2012-06-27 20:25 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-22 13:47 [PATCH 00/11] Prepare for OMAP2+ movement to Common Clk Rajendra Nayak
2012-06-22 13:48 ` [PATCH 01/11] ARM: omap: clk: add clk_prepare and clk_unprepare Rajendra Nayak
2012-06-22 17:42 ` Pankaj Jangra
2012-06-25 5:36 ` Rajendra Nayak
2012-06-22 13:48 ` [PATCH 02/11] mmc: omap: " Rajendra Nayak
2012-06-22 18:23 ` S, Venkatraman
2012-06-22 18:34 ` Paul Walmsley
2012-06-25 5:25 ` Rajendra Nayak
2012-06-25 6:18 ` Paul Walmsley
2012-06-25 7:13 ` Rajendra Nayak
2012-06-25 5:32 ` Rajendra Nayak
2012-06-22 13:48 ` [PATCH 03/11] hwrng: " Rajendra Nayak
2012-06-22 13:48 ` [PATCH 04/11] mfd: omap-usb: " Rajendra Nayak
2012-06-22 19:04 ` Paul Walmsley
2012-06-25 8:55 ` Munegowda, Keshava
2012-06-22 13:48 ` [PATCH 05/11] OMAPDSS: " Rajendra Nayak
2012-06-25 6:07 ` Tomi Valkeinen
2012-06-25 6:59 ` Rajendra Nayak
2012-06-25 7:58 ` Tomi Valkeinen
2012-06-25 11:48 ` Rajendra Nayak
2012-06-25 13:14 ` Tomi Valkeinen
2012-06-26 5:00 ` Rajendra Nayak
2012-06-26 6:55 ` Tomi Valkeinen
2012-06-26 7:36 ` Rajendra Nayak
2012-06-27 0:47 ` Mike Turquette
2012-06-27 4:19 ` Tomi Valkeinen
2012-06-27 5:19 ` Rajendra Nayak
2012-06-25 11:22 ` Russell King - ARM Linux
2012-06-22 13:48 ` [PATCH 06/11] gpio/omap: " Rajendra Nayak
2012-06-22 15:57 ` Pankaj Jangra
2012-06-22 19:17 ` Paul Walmsley
2012-06-25 5:30 ` Rajendra Nayak
2012-06-25 6:11 ` DebBarma, Tarun Kanti
2012-06-25 7:02 ` Rajendra Nayak
2012-06-25 10:22 ` DebBarma, Tarun Kanti
2012-06-22 13:48 ` [PATCH 07/11] w1: omap_hdq: " Rajendra Nayak
2012-06-22 18:35 ` Paul Walmsley
2012-06-25 5:25 ` Rajendra Nayak
2012-06-22 13:48 ` [PATCH 08/11] crypto: omap: " Rajendra Nayak
2012-06-22 18:58 ` Paul Walmsley
2012-06-25 5:29 ` Rajendra Nayak
2012-06-26 10:39 ` Paul Walmsley
2012-06-26 10:58 ` Rajendra Nayak
2012-06-22 13:48 ` [PATCH 09/11] iommu: " Rajendra Nayak
2012-06-22 13:48 ` [PATCH 10/11] ARM: omap: hwmod: get rid of all omap_clk_get_by_name usage Rajendra Nayak
2012-06-22 13:48 ` [PATCH 11/11] ARM: omap: clk: Remove all direct dereferencing of struct clk Rajendra Nayak
2012-06-27 12:50 ` [PATCH 00/11] Prepare for OMAP2+ movement to Common Clk Laurent Pinchart
2012-06-27 16:36 ` Paul Walmsley
2012-06-27 18:05 ` Laurent Pinchart
2012-06-27 18:45 ` Laurent Pinchart
2012-06-27 19:56 ` Laurent Pinchart
2012-06-27 19:59 ` Paul Walmsley
2012-06-27 20:25 ` Laurent Pinchart [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2172351.1193SiRd5m@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=mturquette@ti.com \
--cc=paul@pwsan.com \
--cc=rnayak@ti.com \
--cc=sakari.ailus@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).