summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.h
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2015-01-23 12:03:30 +0100
committerMichael Turquette <mturquette@linaro.org>2015-02-02 14:22:19 -0800
commit035a61c314eb3dab5bcc5683afaf4d412689858a (patch)
tree3c325fc76191cf1319c4a3399dfdd9f777033d6d /drivers/clk/clk.h
parentaf0f349b2996f9f3d83e5aac1edf58fff727a0e0 (diff)
downloadlinux-035a61c314eb3dab5bcc5683afaf4d412689858a.tar.bz2
clk: Make clk API return per-user struct clk instances
Moves clock state to struct clk_core, but takes care to change as little API as possible. struct clk_hw still has a pointer to a struct clk, which is the implementation's per-user clk instance, for backwards compatibility. The struct clk that clk_get_parent() returns isn't owned by the caller, but by the clock implementation, so the former shouldn't call clk_put() on it. Because some boards in mach-omap2 still register clocks statically, their clock registration had to be updated to take into account that the clock information is stored in struct clk_core now. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Tested-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Michael Turquette <mturquette@linaro.org> [mturquette@linaro.org: adapted clk_has_parent to struct clk_core applied OMAP3+ DPLL fix from Tero & Tony]
Diffstat (limited to 'drivers/clk/clk.h')
-rw-r--r--drivers/clk/clk.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/clk/clk.h b/drivers/clk/clk.h
index c798138f023f..23c44e51df69 100644
--- a/drivers/clk/clk.h
+++ b/drivers/clk/clk.h
@@ -9,9 +9,14 @@
* published by the Free Software Foundation.
*/
+struct clk_hw;
+
#if defined(CONFIG_OF) && defined(CONFIG_COMMON_CLK)
struct clk *of_clk_get_by_clkspec(struct of_phandle_args *clkspec);
struct clk *__of_clk_get_from_provider(struct of_phandle_args *clkspec);
void of_clk_lock(void);
void of_clk_unlock(void);
#endif
+
+struct clk *__clk_create_clk(struct clk_hw *hw, const char *dev_id,
+ const char *con_id);