devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Rob Herring <rob.herring@calxeda.com>
Cc: Matt Sealey <matt@genesi-usa.com>,
	devicetree-discuss@lists.ozlabs.org,
	Shawn Guo <shawn.guo@linaro.org>,
	Mike Turquette <mturquette@linaro.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] ARM: imx6q: replace clk_register_clkdev with clock DT lookup
Date: Wed, 22 Aug 2012 09:32:23 +0100	[thread overview]
Message-ID: <20120822083223.GW18957@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <5033891D.90509@calxeda.com>

On Tue, Aug 21, 2012 at 08:11:57AM -0500, Rob Herring wrote:
> On 08/21/2012 07:27 AM, Russell King - ARM Linux wrote:
> > So now, you're not dealing with inventing a whole load of names for clocks
> > on a platform, instead what you're doing is describing _where_ the clock
> > comes from in the system for a particular device by device node and index
> > into it - just like we do for interrupts.
> 
> That is what we're doing. The names are optional for DT, but happen to
> be required for struct clk now. If we don't put something in DT, then
> the clock names will have to be something generic like ccm-1..ccm-185.

And that's what's wrong.  Clocks themselves should _not_ be required to
be named.

If you use purely "producer node + index" then you don't need to name a
whole bunch of clocks, and you don't need to have an array of clock names
in the DT file.  This also gets rid of the time consuming strcmp against
every clock, which has already been raised as a problem with the existing
clk_get().

And, like it or not, the way they're being describing them in the DT file
at the top of this sub-thread, the matching _is_ done only by producer
name, which is TOTALLY the wrong way to go about this (that's how folk
tried to use the connection ID in the clk API and IT DOESN'T WORK for
reusable drivers.)

  reply	other threads:[~2012-08-22  8:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16  8:08 [PATCH 0/2] Move imx6q clock lookup over to device tree Shawn Guo
     [not found] ` <1345104526-14797-1-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-08-16  8:08   ` [PATCH 1/2] clk: add of_clk_src_onecell_get() support Shawn Guo
     [not found]     ` <1345104526-14797-2-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-08-20 14:30       ` Shawn Guo
2012-08-16  8:08   ` [PATCH 2/2] ARM: imx6q: replace clk_register_clkdev with clock DT lookup Shawn Guo
     [not found]     ` <1345104526-14797-3-git-send-email-shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-08-20 12:51       ` Rob Herring
     [not found]         ` <503232E0.3000007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-08-20 14:54           ` Matt Sealey
     [not found]             ` <CAKGA1bn2uCWE8YkGR4EzTxZ_bXJ_ov2diq63uxQ=dT7b6Fu9GQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-20 15:16               ` Shawn Guo
     [not found]                 ` <20120820151609.GN24242-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-08-20 17:22                   ` Matt Sealey
     [not found]                     ` <CAKGA1bnfhMC8QG9OqBbpy5iq6ZAfEgrYMg_LVd50U7yikLhDAg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-21 12:27                       ` Russell King - ARM Linux
     [not found]                         ` <20120821122753.GU18957-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2012-08-21 13:11                           ` Rob Herring
2012-08-22  8:32                             ` Russell King - ARM Linux [this message]
     [not found]                               ` <20120822083223.GW18957-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2012-08-22  9:27                                 ` Shawn Guo
2012-08-22  2:47                       ` Shawn Guo
2012-08-21 12:53                     ` Rob Herring
     [not found]                       ` <503384E3.4030705-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
2012-08-22 22:50                         ` Matt Sealey
     [not found]                           ` <CAKGA1bkNGJhsCGVBsHnaQn=Dg5T==QP_JnqOXycq8jQn-W-0Kw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-23  0:08                             ` Matt Sealey
     [not found]                               ` <CAKGA1bnCk=FqANsVFD123y3uP5dn9AMZydR__mMXrzh6StrBjg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-23  1:32                                 ` Rob Herring

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=20120822083223.GW18957@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=matt@genesi-usa.com \
    --cc=mturquette@linaro.org \
    --cc=rob.herring@calxeda.com \
    --cc=shawn.guo@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 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).