linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 05/11] OMAPDSS: add clk_prepare and clk_unprepare
Date: Mon, 25 Jun 2012 11:22:03 +0000	[thread overview]
Message-ID: <20120625112203.GF19226@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1340604478.12683.25.camel@lappyti>

On Mon, Jun 25, 2012 at 09:07:58AM +0300, Tomi Valkeinen wrote:
> On Fri, 2012-06-22 at 19:18 +0530, Rajendra Nayak wrote:
> > In preparation of OMAP moving to Common Clk Framework(CCF) add clk_prepare()
> > and clk_unprepare() for the omapdss clocks.
> 
> You used clk_prepare and clk_unprepare instead of clk_prepare_enable and
> clk_disable_unprepare. I didn't check the dss driver yet, but my hunch
> is that the clocks are normally not enabled/disabled from atomic
> context.
> 
> What does the prepare/unprepare actually do? Is there any benefit in
> delaying preparing, i.e. is there a difference between prepare right
> after clk_get, or prepare right before clk_enable? (And similarly for
> unprepare)

I think you're looking at this the wrong way.

Think of clk_prepare() as the _sleepable_ part of clk_enable().  So, think
of clk_prepare() as ideally being placed just before clk_enable() with the
exception that if that's not possible (because you're in a non-atomic
context) it should be placed in a position as close to clk_enable() as
possible which is atomic.

Don't think of it as an extra step to be done after clk_get() but as an
extra step needing to be done before clk_enable().

      parent reply	other threads:[~2012-06-25 11:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1340372890-10091-1-git-send-email-rnayak@ti.com>
2012-06-22 13:51 ` [PATCH 05/11] OMAPDSS: add clk_prepare and clk_unprepare Rajendra Nayak
2012-06-25  6:07   ` Tomi Valkeinen
2012-06-25  7:11     ` Rajendra Nayak
2012-06-25  7:58       ` Tomi Valkeinen
2012-06-25 11:52         ` Rajendra Nayak
2012-06-25 13:14           ` Tomi Valkeinen
2012-06-26  5:12             ` Rajendra Nayak
2012-06-26  6:55               ` Tomi Valkeinen
2012-06-26  7:48                 ` Rajendra Nayak
2012-06-27  0:47             ` Mike Turquette
2012-06-27  4:19               ` Tomi Valkeinen
2012-06-27  5:31                 ` Rajendra Nayak
2012-06-25 11:22     ` Russell King - ARM Linux [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=20120625112203.GF19226@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).