All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Georgi Djakov <gdjakov@mm-sol.com>
Cc: mturquette@linaro.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v1] clk: qcom: Add support for regmap clock dividers
Date: Fri, 03 Oct 2014 10:49:23 -0700	[thread overview]
Message-ID: <542EE1A3.9050408@codeaurora.org> (raw)
In-Reply-To: <542EBCFE.9050602@mm-sol.com>

On 10/03/14 08:13, Georgi Djakov wrote:
> On 10/02/2014 09:11 PM, Stephen Boyd wrote:
>> On 09/30/14 10:20, Georgi Djakov wrote:
>> +					unsigned long parent_rate)
>> +{
>> +	struct clk_regmap *rclk = to_clk_regmap(hw);
>> +	struct clkdiv_regmap *clkdiv = to_clkdiv_regmap(rclk);
>> +	unsigned int div, val;
>> +
>> +	regmap_read(rclk->regmap, clkdiv->reg, &val);
>> +	if (!val)
>> +		return parent_rate;
>> +
>> +	div = (val >> clkdiv->shift) & ((1 << clkdiv->width)-1);
>> +
>> +	return parent_rate / div;
>> I don't know if you saw the patch to split out the clk-divider.c logic
>> from the readl/writel patch I sent[1]? That could make this slightly
>> smaller.
>> tabl
> Could you please provide a link to that patch?

Doh, here it is: https://lkml.org/lkml/2014/9/5/762


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

      reply	other threads:[~2014-10-03 17:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-30 17:20 [PATCH v1] clk: qcom: Add support for regmap clock dividers Georgi Djakov
2014-10-02 18:11 ` Stephen Boyd
2014-10-02 19:51   ` Kumar Gala
2014-10-02 21:26     ` Stephen Boyd
2014-10-03 15:13   ` Georgi Djakov
2014-10-03 17:49     ` Stephen Boyd [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=542EE1A3.9050408@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=gdjakov@mm-sol.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.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.