From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Richard Genoud <richard.genoud@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] BUG: clk_find() misses some clocks
Date: Fri, 17 Aug 2012 12:34:42 +0100 [thread overview]
Message-ID: <20120817113442.GN18957@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CACQ1gAh3YcMBXp7BFoR68+rdDM1PEe4fenNG77s=SP05RditEA@mail.gmail.com>
On Fri, Aug 17, 2012 at 12:23:06PM +0200, Richard Genoud wrote:
> Ok, so I have to declare it like that :
> CLKDEV_CON_DEV_ID(NULL, "fffff400.gpio", &pioAB_clk)
Yes, because the wildcarding is in the clkdev tables, not in the driver.
If you think about what's going on, that's the way it has to be. Remember
that it's the _device_ that defines what the connection name is (there's
the hint: it's the connection name on the device itself) and it isn't a
global clock name.
So, for example, if set of devices used in multiple different SoCs have a
clock input called "apbclk" and on some SoCs this clock is uncontrollable,
but on others it can be individually controlled, we can cater for this:
- the SoC where this clock is uncontrollable can create a dummy clock with
a connection ID of "apbclk" and a NULL device name, which will match
against any device asking for an "apbclk".
- the SoC where the clock is individually controllable would list the
individual "apbclk" entries in the clkdev table, and clkdev will return
the appropriate one.
In mixed environments, this also works, because we return the "best match"
from clkdev.
Same goes for devices where they have an "iclk" and an "fclk" (iow, two
clocks) - the connection ID can be wildcarded in the clkdev tables so that
the same clock can be returned for the same device where the driver asks
for the clocks individually - if that's what the SoC support desires.
It makes no sense for a driver to ask for "any clock on this device"
because drivers always want the clock for a particular purpose. Hence
why NULL arguments to clk_get() don't act as wildcards.
prev parent reply other threads:[~2012-08-17 11:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-17 9:47 Richard Genoud
2012-08-17 9:58 ` Russell King - ARM Linux
2012-08-17 10:23 ` Richard Genoud
2012-08-17 11:34 ` Russell King - ARM Linux [this message]
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=20120817113442.GN18957@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=richard.genoud@gmail.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
all inboxes | Powered by JetHome®