linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: York Sun <yorksun@freescale.com>
Cc: "linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"pmarrecas@outlook.com" <pmarrecas@outlook.com>,
	Mike Turquette <mturquette@baylibre.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Andrey Filippov <andrey@elphel.com>,
	Paul Bolle <pebolle@tiscali.nl>
Subject: Re: [Resend Patch v6] driver/clk/clk-si5338: Add common clock framework driver for si5338
Date: Tue, 20 Oct 2015 10:49:04 -0700	[thread overview]
Message-ID: <20151020174904.GG19782@codeaurora.org> (raw)
In-Reply-To: <562598AE.2000600@freescale.com>

On 10/19, York Sun wrote:
> 
> 
> On 10/19/2015 05:36 PM, Stephen Boyd wrote:
> > On 10/20, York Sun wrote:
> >>
> >> You can see, when the fixed-rate clock is registered, the device id of si5338 is unknown yet. (I am using one 25MHz clock to feed multiple si5338, where maybe I should create multiple 25MHz clocks, but that's another discussion.)
> >>
> >> I hope I have made it clear.
> > 
> > Yes. It would be great if we could modify the i2c framework to
> > let us create an i2c device but not call device_register() until a later
> > time. So something like this could be done in the platform
> > driver:
> > 
> > 	for (i = 0; i < NUM_SI5338_CHIPS; i++) {
> > 	     adap = i2c_get_adapter(private->i2c_adp->nr + 1 + i);
> > 	     private->i2c_client[i] = i2c_new_device_unregistered(adap,
> > 	     				&si5338_info[i], i2c_si5338_addr);
> > 	     clkdev_create(clk, NULL, dev_name(private->i2c_client[i]->dev));
> > 	     device_register(private->i2c_client[i]->dev);
> > 	}
> > 
> > Then in the si5338 driver we call devm_clk_get(i2c->dev, NULL)
> > and we get the xtal clock.
> > 
> 
> Then what do we do before we have this i2c_new_device_unregistered()? Does my
> proposal make sense?

There's nothing to do before we make this new API. Make a patch
to add the new API, and then use it in the pcie driver. Your
proposal makes sense, but it isn't necessary or desirable.

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

  parent reply	other threads:[~2015-10-20 17:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09 17:09 [Resend Patch v6] driver/clk/clk-si5338: Add common clock framework driver for si5338 York Sun
2015-10-10  0:09 ` Stephen Boyd
2015-10-16 21:01   ` York Sun
2015-10-16 21:31     ` Stephen Boyd
2015-10-16 21:37       ` York Sun
2015-10-16 23:05         ` Stephen Boyd
2015-10-17  0:09           ` York Sun
2015-10-19 20:34           ` York Sun
2015-10-20  0:03             ` Stephen Boyd
2015-10-20  0:17               ` York Sun
2015-10-20  0:36                 ` Stephen Boyd
2015-10-20  1:28                   ` York Sun
2015-10-20 17:20                     ` York Sun
2015-10-20 17:49                     ` Stephen Boyd [this message]
2015-10-21  0:25                       ` York Sun

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=20151020174904.GG19782@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=andrey@elphel.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mturquette@baylibre.com \
    --cc=pebolle@tiscali.nl \
    --cc=pmarrecas@outlook.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=yorksun@freescale.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).