linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@prisktech.co.nz (Tony Prisk)
To: linux-arm-kernel@lists.infradead.org
Subject: of_clk_get() / devm_clk_get()
Date: Thu, 14 Feb 2013 19:42:13 +1300	[thread overview]
Message-ID: <1360824133.22736.3.camel@gitbox> (raw)
In-Reply-To: <511C6AC7.6010601@wwwdotorg.org>

On Wed, 2013-02-13 at 21:40 -0700, Stephen Warren wrote:
> On 02/13/2013 09:17 PM, Tony Prisk wrote:
> > Currently we have devm_clk_get() which gives a managed-resource clk (by
> > name), or of_clk_get() which gives an unmanaged resource clk (by id).
> > 
> > I just wanted to sound out everyone as to whether there is a need for a
> > managed version of the of_clk_get.
> > 
> > My personal concern about devm_clk_get is that it requires (if I
> > understand correctly) that the DT node have the clock-names property
> > (which is optional). If the optional name is not supplied, it fails.
> > This basically makes it 'not optional' when a driver uses devm_clk_get.
> > (Please correct me if I'm wrong about this).
> 
> I thought supplying NULL for the name/ID simply gave you the first clock
> in the list (clocks property)? I'm sure I've seen plenty of Tegra
> drivers that end up doing that.
> 

I think someone else told me that once before so it is probably correct
- but it doesn't solve the problem of requesting a second clock without
a clock-names property.

That leaves us in the situation of only being able to use managed clocks
when there is only one, or forcing dts files to include the 'optional'
property.

Regards
Tony Prisk

  reply	other threads:[~2013-02-14  6:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14  4:17 of_clk_get() / devm_clk_get() Tony Prisk
2013-02-14  4:40 ` Stephen Warren
2013-02-14  6:42   ` Tony Prisk [this message]
2013-02-14 17:28     ` Stephen Warren

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=1360824133.22736.3.camel@gitbox \
    --to=linux@prisktech.co.nz \
    --cc=linux-arm-kernel@lists.infradead.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).