Skip to content

Commit

Permalink
clk: tegra: export clock names for debugging
Browse files Browse the repository at this point in the history
When writing a module for testing or debugging purposes, there is no way to
get hold of clk handles. This patch solves this by exposing all valid clocks
as clkdev's for the virtual device tegra-clk-debug.

Signed-off-by: Peter De Schrijver <[email protected]>
  • Loading branch information
p2mate-nv committed Jun 30, 2014
1 parent 0a7eec7 commit 9f0030c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/clk/tegra/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@ void __init tegra_register_devclks(struct tegra_devclk *dev_clks, int num)
for (i = 0; i < num; i++, dev_clks++)
clk_register_clkdev(clks[dev_clks->dt_id], dev_clks->con_id,
dev_clks->dev_id);

for (i = 0; i < clk_num; i++) {
if (!IS_ERR_OR_NULL(clks[i]))
clk_register_clkdev(clks[i], __clk_get_name(clks[i]),
"tegra-clk-debug");
}
}

struct clk ** __init tegra_lookup_dt_id(int clk_id,
Expand Down

0 comments on commit 9f0030c

Please sign in to comment.