diff options
author | Peter De Schrijver <pdeschrijver@nvidia.com> | 2013-10-09 13:47:57 +0200 |
---|---|---|
committer | Peter De Schrijver <pdeschrijver@nvidia.com> | 2013-11-26 17:46:24 +0100 |
commit | 73d37e4c7c4b9db26c9e4e1479e00996caa8e3f2 (patch) | |
tree | 959eb811facfe4763b6d7c162386b1b108de8b62 /drivers/clk/tegra/clk.c | |
parent | clk: tegra: add common infra for DT clocks (diff) | |
download | linux-73d37e4c7c4b9db26c9e4e1479e00996caa8e3f2.tar.xz linux-73d37e4c7c4b9db26c9e4e1479e00996caa8e3f2.zip |
clk: tegra: add clkdev registration infra
Add a common infra for registering clkdev. This allows decoupling clk
registration from clkdev registration.
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Diffstat (limited to 'drivers/clk/tegra/clk.c')
-rw-r--r-- | drivers/clk/tegra/clk.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/clk/tegra/clk.c b/drivers/clk/tegra/clk.c index a0430cd65d7c..14d25322aec5 100644 --- a/drivers/clk/tegra/clk.c +++ b/drivers/clk/tegra/clk.c @@ -212,6 +212,15 @@ void __init tegra_add_of_provider(struct device_node *np) of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); } +void __init tegra_register_devclks(struct tegra_devclk *dev_clks, int num) +{ + int i; + + for (i = 0; i < num; i++, dev_clks++) + clk_register_clkdev(clks[dev_clks->dt_id], dev_clks->con_id, + dev_clks->dev_id); +} + struct clk ** __init tegra_lookup_dt_id(int clk_id, struct tegra_clk *tegra_clk) { |