public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: mturquette@ti.com (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] clk: Provide option for clk_get_rate to issue hw for new rate
Date: Thu, 06 Sep 2012 17:19:27 -0700	[thread overview]
Message-ID: <20120907001927.20289.41627@nucleus> (raw)
In-Reply-To: <CAPDyKFrS7tKu5AcjL7+R8V5Nvo0O+BVwc8HtGFqQGSf12wMioQ@mail.gmail.com>

Quoting Ulf Hansson (2012-09-06 02:09:33)
> On 31 August 2012 21:29, Mike Turquette <mturquette@ti.com> wrote:
> > This is a bit subtle.  Calling __clk_recalc_rates will walk the subtree
> > of children recalculating rates as well as firing off notifiers.  Is
> > this what you want?  If your clock changes rates behind your back AND
> > has chilren then this is probably the right thing to do.  However you
> > might be better off with:
> >
> >         if (clk && (clk->flags & CLK_GET_RATE_NOCACHE))
> >                 rate = clk->ops->recalc_rate(clk->hw, clk->parent->rate);
> >
> > This doesn't update children or fire off notifiers.  What is best for
> > your platform?
> 
> For my platform, ux500 and for the clock connected to this
> patchseries, your suggesting above is enough. (Well some additional
> error handling is needed in your code proposal though :-) )
> 
> The reason for why I used "__clk_recalc_rates" was because I think it
> could make sense to have a more generic approach, not sure if it is
> needed as you mention. Additionally, using  __clk_recalc_rates with
> "0" as the notification argument, should prevent notifications from
> happen, right?
> 

You are right.  I didn't catch that when running through this patch the
first time.

> So basically, I wanted the clock rates for the children to be updated
> as well as the parent clock rate, but no notifications.
> 

This is the answer I was looking for.  You DO want to walk the subtree
of children and recalc the rates.  Since you are the first user of such
a feature I am happy to shape it for your needs ;-)

> I can happily update the patch according to your proposal if you still
> think it is the best way to do it, just tell me again then. :-)
> 

No your patch does the right thing for your platform and looks sane and
generic for others.  I feel much better about not firing off random
notifiers (which I missed when I reviewed your patch last time).

I'll take this series into clk-next.

Regards,
Mike

> Kind regards
> Ulf Hansson

  reply	other threads:[~2012-09-07  0:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-31 12:21 [PATCH 0/4] clk: Support for smp_twd clock for ux500 Ulf Hansson
2012-08-31 12:21 ` [PATCH 1/4] clk: Provide option for clk_get_rate to issue hw for new rate Ulf Hansson
2012-08-31 19:29   ` Mike Turquette
2012-09-06  9:09     ` Ulf Hansson
2012-09-07  0:19       ` Mike Turquette [this message]
2012-09-07  1:00         ` Turquette, Mike
2012-09-07  8:21           ` Linus Walleij
2012-09-07 12:29             ` Ulf Hansson
2012-09-07 21:34               ` Linus Walleij
2012-08-31 12:21 ` [PATCH 2/4] clk: ux500: Support for prmcu_rate clock Ulf Hansson
2012-08-31 12:21 ` [PATCH 3/4] mfd: dbx500: Provide a more accurate smp_twd clock Ulf Hansson
2012-09-19 16:02   ` Samuel Ortiz
2012-09-19 16:42     ` Mike Turquette
2012-09-19 16:56       ` Samuel Ortiz
2012-08-31 12:21 ` [PATCH 4/4] clk: ux500: Define smp_twd clock for u8500 Ulf Hansson
2012-08-31 23:32 ` [PATCH 0/4] clk: Support for smp_twd clock for ux500 Linus Walleij

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=20120907001927.20289.41627@nucleus \
    --to=mturquette@ti.com \
    --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