diff options
author | Dinh Nguyen <dinguyen@opensource.altera.com> | 2015-06-05 19:26:13 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-06-06 04:10:33 +0300 |
commit | 2e61dfb3602b904966491f260f62c01b9895936a (patch) | |
tree | a0fe78e4fdb27cc74aa3920a4c996ec2a3be700e /include/linux/clk-provider.h | |
parent | d3000d0d4a2b326a3b98df53b53adcd3beead72e (diff) | |
download | linux-2e61dfb3602b904966491f260f62c01b9895936a.tar.xz |
clk: of: helper for filling parent clock array and return num of parents
Sprinkled all through the platform clock drivers are code like this to
fill the clock parent array:
for (i = 0; i < num_parents; ++i)
parent_names[i] = of_clk_get_parent_name(np, i);
The of_clk_parent_fill() will do the same as the code above, and while
at it, return the number of parents as well since the logic of the
function is to the walk the clock node to look for the parent.
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
[sboyd@codeaurora.org: Fixed kernel-doc]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r-- | include/linux/clk-provider.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 5378c2aba4d2..2e5df069ca34 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -626,6 +626,8 @@ struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, void *data); struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data); int of_clk_get_parent_count(struct device_node *np); +int of_clk_parent_fill(struct device_node *np, const char **parents, + unsigned int size); const char *of_clk_get_parent_name(struct device_node *np, int index); void of_clk_init(const struct of_device_id *matches); |