linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: omap_device: query on "fck" clk alias created
Date: Thu, 2 Aug 2012 14:09:09 +0100	[thread overview]
Message-ID: <20120802130909.GN7405@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <79CD15C6BA57404B839C016229A409A83EA7DF32@DBDE01.ent.ti.com>

On Thu, Aug 02, 2012 at 12:55:42PM +0000, Hiremath, Vaibhav wrote:
> On Wed, Aug 01, 2012 at 19:12:59, Cousson, Benoit wrote:
> > Mmm, I don't know, but even if this is right, shouldn't we avoid such
> > usage. It might be better to be explicit than assuming that the IP will
> > always have an unique clock.
> 
> Isn't this IP specific and driver must know how many clocks he has to 
> address? So I believe it will not be assumption, the driver is written
> considering clocksources and in some cases IP is designed and meant to
> receive only one clock input.

Devices themselves define what clocks they need to operate.  Drivers
designed to be used with the clk API are supposed to obtain all clocks
that the device requires.  The device dictates what clocks are required.

This does not change the way drivers deal with clocks depending on how
they're integrated into a SoC: devices that need five clocks should
_always_ call clk_get() five times to get each of those five clocks.

Where a clock is not individually distinguishable or available in a SoC,
the SoC level must arrange to return a dummy clock to the device driver.

If a device only takes one single clock, then using a connection ID of
NULL is acceptable.  Otherwise, an explicit name must be used, which is
chosen either from the device IPs documentation (eg, the name of the
_clock_ _input_) or with a lack of that information, a name chosen by
the driver writer according to the function of the clock.

You must stop thinking about the picture you get when something gets
integrated into a SoC... and making driver code conditional on the view
presented by the SoC.

  reply	other threads:[~2012-08-02 13:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-01 12:20 omap_device: query on "fck" clk alias created Vaibhav Hiremath
2012-08-01 13:42 ` Benoit Cousson
2012-08-02 12:55   ` Hiremath, Vaibhav
2012-08-02 13:09     ` Russell King - ARM Linux [this message]
2012-08-01 14:14 ` Russell King - ARM Linux
2012-08-02 13:04   ` Hiremath, Vaibhav
2012-08-02 13:12     ` Russell King - ARM Linux
2012-08-03  6:26       ` Hiremath, Vaibhav

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=20120802130909.GN7405@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).