diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-08-22 21:36:27 +0800 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2012-09-07 18:30:19 -0700 |
commit | 494bfec99922d54054d2d0873f1017680cfc3f13 (patch) | |
tree | 45697d25099ec0a8790ab77451254d29b2b6ce21 /include/linux/clk-provider.h | |
parent | 09b9b2b204751fc23d245d57d420f4973db22a67 (diff) |
clk: add of_clk_src_onecell_get() support
For those SoCs that have hundreds of clock outputs, their clock
DT bindings could reasonably define #clock-cells as 1 and require
the client device specify the index of the clock it consumes in the
cell of its "clocks" phandle.
Add a generic of_clk_src_onecell_get() function for this purpose.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r-- | include/linux/clk-provider.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 1b15307cd466..c12731582920 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -361,6 +361,11 @@ int of_clk_add_provider(struct device_node *np, void of_clk_del_provider(struct device_node *np); struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, void *data); +struct clk_onecell_data { + struct clk **clks; + unsigned int clk_num; +}; +struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data); const char *of_clk_get_parent_name(struct device_node *np, int index); void of_clk_init(const struct of_device_id *matches); |