linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Simon <horms@verge.net.au>,
	Michael Turquette <mturquette@baylibre.com>,
	Magnus <magnus.damm@gmail.com>,
	Linux-SH <linux-sh@vger.kernel.org>,
	Linux-Kernel <linux-kernel@vger.kernel.org>,
	linux-clk@vger.kernel.org
Subject: Re: [PATCH v4] clk: add CS2000 Fractional-N driver
Date: Fri, 02 Oct 2015 18:11:23 +0000	[thread overview]
Message-ID: <20151002181123.GM12338@codeaurora.org> (raw)
In-Reply-To: <87twqarsdf.wl%kuninori.morimoto.gx@renesas.com>

On 10/02, Kuninori Morimoto wrote:
> 
> Hi Stephen
> 
> Thank you for your review
> 
> > > +	init.parent_names	= parent_names;
> > > +	init.num_parents	= ARRAY_SIZE(parent_names);
> > > +
> > > +	priv->hw.init = &init;
> > > +
> > > +	clk = clk_register(NULL, &priv->hw);
> > 
> > How about using devm_clk_register() and passing the i2c device
> > down to this function?
> 
> Can I confirm ?
> Does this "i2c device down" means call i2c_set_clientdata()
> in this function ?

I mean passing a struct device pointer to this function and then
using it here in the clk_register() function.

> 
> > > +static int cs2000_clk_init(struct cs2000_priv *priv)
> > > +{
> > > +	struct device *dev = priv_to_dev(priv);
> > > +	struct device_node *np = dev->of_node;
> > > +	u32 rate;
> > > +	int ch = 0; /* it uses ch0 only at this point */
> > > +	int ret;
> > > +
> > > +	if (of_property_read_u32(np, "clock-frequency", &rate))
> > 
> > Why can't we do this with DT assigned rates?
> 
> What doesn this "DT assigned rates" mean ?
> this rate will be used as default output

See the "Assigned clock parents and rates" section of
Documentation/devicetree/bindings/clock/clock-bindings.txt and
commit 86be408bfbd8 (clk: Support for clock parents and rates
assigned from device tree, 2014-06-18).

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2015-10-02 18:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-15  8:29 [PATCH v4] clk: add CS2000 Fractional-N driver Kuninori Morimoto
2015-10-02  0:38 ` Stephen Boyd
2015-10-02  1:11   ` Kuninori Morimoto
2015-10-02 18:11     ` Stephen Boyd [this message]
2015-10-15  1:35       ` Kuninori Morimoto
2015-10-15 18:28         ` Stephen Boyd

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=20151002181123.GM12338@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mturquette@baylibre.com \
    /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).