]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - include/linux/clk-provider.h
clk: Add clk_hw OF clk providers
authorStephen Boyd <sboyd@codeaurora.org>
Sat, 6 Feb 2016 01:38:26 +0000 (17:38 -0800)
committerStephen Boyd <sboyd@codeaurora.org>
Tue, 19 Apr 2016 23:52:22 +0000 (16:52 -0700)
commit0861e5b8cf80038e91942f1005c8dfce79d18c38
tree1000b3fc6f68948275a1a6f5117a884aa49a1c16
parent4143804c4fdef40358c654d1fb2271a1a0f1fedf
clk: Add clk_hw OF clk providers

Now that we have a clk registration API that doesn't return
struct clks, we need to have some way to hand out struct clks via
the clk_get() APIs that doesn't involve associating struct clk
pointers with an OF node. Currently we ask the OF provider to
give us a struct clk pointer for some clkspec, turn that struct
clk into a struct clk_hw and then allocate a new struct clk to
return to the caller.

Let's add a clk_hw based OF provider hook that returns a struct
clk_hw directly, so that we skip the intermediate step of
converting from struct clk to struct clk_hw. Eventually when
we've converted all OF clk providers to struct clk_hw based APIs
we can remove the struct clk based ones.

It should also be noted that we change the onecell provider to
have a flex array instead of a pointer for the array of clk_hw
pointers. This allows providers to allocate one structure of the
correct length in one step instead of two.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk.c
include/linux/clk-provider.h