Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1238496

Re: [PATCH v4] clk: add CS2000 Fractional-N driver

From Stephen Boyd <sboyd@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH v4] clk: add CS2000 Fractional-N driver
Date 2015-10-02 20:20 +0200
Message-ID <qfd61-2L2-1@gated-at.bofh.it> (permalink)
References <qeWye-458-13@gated-at.bofh.it> <qeWye-458-11@gated-at.bofh.it> <qfd61-2L2-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v4] clk: add CS2000 Fractional-N driver Stephen Boyd <sboyd@codeaurora.org> - 2015-10-02 02:40 +0200
  Re: [PATCH v4] clk: add CS2000 Fractional-N driver Stephen Boyd <sboyd@codeaurora.org> - 2015-10-02 20:20 +0200

csiph-web