SUPERH platform development
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 07/10] sh: clkfwk: add clk_rate_multi_range_round()
Date: Fri, 16 Sep 2011 10:29:40 +0000	[thread overview]
Message-ID: <20110916102940.GA15428@linux-sh.org> (raw)
In-Reply-To: <87hb4mqack.wl%kuninori.morimoto.gx@renesas.com>

On Fri, Sep 09, 2011 at 03:27:43AM -0700, Kuninori Morimoto wrote:
> Some Clock Pulse Generator has PLL multiplication.
> clk_rate_multi_range_round() will be good helper for it.
> 
clk_rate_mult_range_round() would be more logically consistent.

> +long clk_rate_multi_range_round(struct clk *clk, unsigned int div_min,
> +				unsigned int div_max, unsigned long rate)
> +{
> +	struct clk_rate_round_data div_range_round = {
> +		.min	= div_min,
> +		.max	= div_max,
> +		.func	= clk_rate_multi_range_iter,
> +		.arg	= clk_get_parent(clk),
> +		.rate	= rate,
> +	};
> +
> +	return clk_rate_round_helper(&div_range_round);
> +}
> +
Clearly you want mult_range and not div_range here. Likewise div_min/max
should be mult_min/max or so, as you're clearly not doing division on
anything here.

Beyond that, I have no particular objections to the API addition.

  reply	other threads:[~2011-09-16 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-09 10:27 [PATCH 07/10] sh: clkfwk: add clk_rate_multi_range_round() Kuninori Morimoto
2011-09-16 10:29 ` Paul Mundt [this message]
2011-09-20  1:18 ` Kuninori Morimoto

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=20110916102940.GA15428@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=linux-sh@vger.kernel.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