[PATCH v2 1/7] clk: Add a generic clock infrastructure
Russell King - ARM Linux
linux at arm.linux.org.uk
Mon Oct 3 16:43:09 UTC 2011
On Mon, Oct 03, 2011 at 05:31:08PM +0100, Mark Brown wrote:
> I dunno, I get the impression that some of this is due to the current
> limitations of the clock API rather than due to a lack of clocks -
> perhaps that's specific to the applications I look at, though.
The clk API per-se has nothing to do with how clocks are registered.
There are two things that are the clk API:
1. clkdev - which deals with translating devices + connection IDs to
struct clk. This has no ordering requirements wrt requiring
parents to be "initialized" before their children (it has no care
about that at all because it's not within its definition.)
For this, registration is about connecting device + connection IDs
to a struct clk.
2. the driver API, defining how the opaque struct clk is looked up,
obtained and then manipulated. This has no 'registration' stuff.
So, whether clocks are a tree or flat is unspecified. It's unspecified
whether there's any particular order required.
In fact, with a clock tree, it's entirely possible that only the leaf
clocks will be 'registered' with clkdev. How the rest of the clock tree
is initialized is beyond the scope of the driver clk API.
More information about the linaro-dev