All of lore.kernel.org
 help / color / mirror / Atom feed
From: mturquette@ti.com (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: allow clocks without parents to change rate
Date: Thu, 12 Jul 2012 09:54:18 -0700	[thread overview]
Message-ID: <20120712165418.GJ2772@gmail.com> (raw)
In-Reply-To: <CACRpkdZOgquPF1FXo7LBeFOYhheqx+_ENTn6w4qcKGBqeHnvFQ@mail.gmail.com>

On 20120712-12:50, Linus Walleij wrote:
> On Thu, Jul 12, 2012 at 1:42 AM, Mike Turquette <mturquette@ti.com> wrote:
> 
> > This has been fixed in Pawell's patch, "clk: Check parent for NULL in
> > clk_change_rate".
> 
> Yes, that'll probably work.
> 
> A small nitpick though:
> 
> I have slightly different semantics, Pawel's patch assigns zero if
> parent is NULL, then use that as fallback, whereas I check for the
> parent being NULL all the way. I was worried that the old sematics
> could change like this:
> 
> So here it takes that:
> 
> +       if (clk->parent)
> +               best_parent_rate = clk->parent->rate;
> +
> 
> And I was cautious that if this changes the parent rate:
> 
> +               clk->ops->set_rate(clk->hw, clk->new_rate, best_parent_rate);
> 
> Then this passes the old parent rate to the recalc function:
> 
> +               clk->rate = clk->ops->recalc_rate(clk->hw, best_parent_rate);
> 
> It has no side-effects on my system but I worried about
> others, so I just left the behaviour to re-read the rate from the parent
> every time if possible.
> 

Thanks for looking into it.  I think for now let's keep what we have and
we'll patch it up if bugs are reported.

Thanks again,
Mike

> Yours,
> Linus Walleij

WARNING: multiple messages have this Message-ID (diff)
From: Mike Turquette <mturquette@ti.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Pawel Moll <pawel.moll@arm.com>,
	Mike Turquette <mturquette@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, stable@kernel.org,
	Ulf Hansson <ulf.hansson@stericsson.com>
Subject: Re: [PATCH] clk: allow clocks without parents to change rate
Date: Thu, 12 Jul 2012 09:54:18 -0700	[thread overview]
Message-ID: <20120712165418.GJ2772@gmail.com> (raw)
In-Reply-To: <CACRpkdZOgquPF1FXo7LBeFOYhheqx+_ENTn6w4qcKGBqeHnvFQ@mail.gmail.com>

On 20120712-12:50, Linus Walleij wrote:
> On Thu, Jul 12, 2012 at 1:42 AM, Mike Turquette <mturquette@ti.com> wrote:
> 
> > This has been fixed in Pawell's patch, "clk: Check parent for NULL in
> > clk_change_rate".
> 
> Yes, that'll probably work.
> 
> A small nitpick though:
> 
> I have slightly different semantics, Pawel's patch assigns zero if
> parent is NULL, then use that as fallback, whereas I check for the
> parent being NULL all the way. I was worried that the old sematics
> could change like this:
> 
> So here it takes that:
> 
> +       if (clk->parent)
> +               best_parent_rate = clk->parent->rate;
> +
> 
> And I was cautious that if this changes the parent rate:
> 
> +               clk->ops->set_rate(clk->hw, clk->new_rate, best_parent_rate);
> 
> Then this passes the old parent rate to the recalc function:
> 
> +               clk->rate = clk->ops->recalc_rate(clk->hw, best_parent_rate);
> 
> It has no side-effects on my system but I worried about
> others, so I just left the behaviour to re-read the rate from the parent
> every time if possible.
> 

Thanks for looking into it.  I think for now let's keep what we have and
we'll patch it up if bugs are reported.

Thanks again,
Mike

> Yours,
> Linus Walleij

  reply	other threads:[~2012-07-12 16:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-04 22:09 [PATCH] clk: allow clocks without parents to change rate Linus Walleij
2012-07-04 22:09 ` Linus Walleij
2012-07-11 23:42 ` Mike Turquette
2012-07-11 23:42   ` Mike Turquette
2012-07-12 10:50   ` Linus Walleij
2012-07-12 10:50     ` Linus Walleij
2012-07-12 16:54     ` Mike Turquette [this message]
2012-07-12 16:54       ` Mike Turquette

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=20120712165418.GJ2772@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.