Merge branches 'clk-debugfs', 'clk-unused', 'clk-refactor' and 'clk-qoriq' into clk-next
- Add a 'clk_parent' file in clk debugfs - Remove dead code in various clk drivers * clk-debugfs: clk: Add clk_parent entry in debugfs * clk-unused: clk: qcom: Fix -Wunused-const-variable clk: mmp: frac: Remove set but not used variable 'prev_rate' clk: ti: Remove unused functions clk: mediatek: mt8516: Remove unused variable * clk-refactor: clk: clk-cdce706: simplify getting the adapter of a client clk: Simplify clk_core_can_round() * clk-qoriq: clk: qoriq: add support for lx2160a
This commit is contained in:
@@ -1324,10 +1324,7 @@ static void clk_core_init_rate_req(struct clk_core * const core,
|
||||
|
||||
static bool clk_core_can_round(struct clk_core * const core)
|
||||
{
|
||||
if (core->ops->determine_rate || core->ops->round_rate)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return core->ops->determine_rate || core->ops->round_rate;
|
||||
}
|
||||
|
||||
static int clk_core_round_rate_nolock(struct clk_core *core,
|
||||
@@ -3045,6 +3042,17 @@ static int possible_parents_show(struct seq_file *s, void *data)
|
||||
}
|
||||
DEFINE_SHOW_ATTRIBUTE(possible_parents);
|
||||
|
||||
static int current_parent_show(struct seq_file *s, void *data)
|
||||
{
|
||||
struct clk_core *core = s->private;
|
||||
|
||||
if (core->parent)
|
||||
seq_printf(s, "%s\n", core->parent->name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
DEFINE_SHOW_ATTRIBUTE(current_parent);
|
||||
|
||||
static int clk_duty_cycle_show(struct seq_file *s, void *data)
|
||||
{
|
||||
struct clk_core *core = s->private;
|
||||
@@ -3077,6 +3085,10 @@ static void clk_debug_create_one(struct clk_core *core, struct dentry *pdentry)
|
||||
debugfs_create_file("clk_duty_cycle", 0444, root, core,
|
||||
&clk_duty_cycle_fops);
|
||||
|
||||
if (core->num_parents > 0)
|
||||
debugfs_create_file("clk_parent", 0444, root, core,
|
||||
¤t_parent_fops);
|
||||
|
||||
if (core->num_parents > 1)
|
||||
debugfs_create_file("clk_possible_parents", 0444, root, core,
|
||||
&possible_parents_fops);
|
||||
|
Reference in New Issue
Block a user