devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh@kernel.org>, Mark Brown <broonie@kernel.org>,
	Linux-Kernel <linux-kernel@vger.kernel.org>,
	Linux-DT <devicetree@vger.kernel.org>,
	Linux-ARM <linux-arm-kernel@lists.infradead.org>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	linux-clk@vger.kernel.org
Subject: Re: [PATCH v2] clkdev: add devm_of_clk_get()
Date: Thu, 7 Jul 2016 13:26:36 +0100	[thread overview]
Message-ID: <20160707122636.GP1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <87ziptixv7.wl%kuninori.morimoto.gx@renesas.com>

On Thu, Jul 07, 2016 at 09:54:03AM +0000, Kuninori Morimoto wrote:
> 
> Hi Michael
> 
> > > +struct clk *devm_of_clk_get(struct device *dev,
> > > +                           struct device_node *np, int index)
> > 
> > Any reason not to use devm_clk_get? Why do we need this helper?
> 
> Because of_clk_get() can parse "clocks", "#clock-cells" on DT.

clk_get() should also work just fine.  clk_get() uses
__of_clk_get_by_name() internally, which uses "clock-names" to
locate the index if a connection id is given.  of_clk_get() allows
lookup of a clock by index only, omitting the name, which means
you need to coordinate the order of clocks in DT with the order
that the driver wants... which sounds error prone to me.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2016-07-07 12:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04  1:36 [PATCH v2] clkdev: add devm_of_clk_get() Kuninori Morimoto
2016-07-07  0:43 ` Michael Turquette
2016-07-07  9:54   ` Kuninori Morimoto
2016-07-07 12:26     ` Russell King - ARM Linux [this message]
2016-07-08  0:03       ` Kuninori Morimoto
2016-07-08  1:30         ` Michael Turquette
2016-07-08  3:18           ` Kuninori Morimoto
2016-07-27  0:51             ` [alsa-devel] " Kuninori Morimoto
2016-07-27  0:51             ` Kuninori Morimoto
2016-11-16  5:17               ` Kuninori Morimoto
2016-11-23 19:10                 ` Stephen Boyd
     [not found]                   ` <20161123191037.GE25626-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-11-24  1:45                     ` Kuninori Morimoto
2016-11-24  4:57                       ` Kuninori Morimoto
     [not found]                         ` <87y409cw71.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2016-11-29 21:05                           ` Stephen Boyd
     [not found]                             ` <20161129210556.GC6095-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-11-30  1:08                               ` Kuninori Morimoto
     [not found]                                 ` <874m2pbwsn.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2016-12-01  1:43                                   ` Kuninori Morimoto
  -- strict thread matches above, loose matches on Subject: below --
2016-11-28  6:56 Kuninori Morimoto
2016-11-28  9:14 ` Russell King - ARM Linux
     [not found]   ` <20161128091456.GR14217-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2016-11-28  9:21     ` Kuninori Morimoto

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=20160707122636.GP1041@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=robh@kernel.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).