Loading drivers/clk/clk.c +26 −0 Original line number Diff line number Diff line Loading @@ -2594,10 +2594,14 @@ static void clk_summary_show_subtree(struct seq_file *s, struct clk_core *c, if (!c) return; if (c->ops->bus_vote) c->ops->bus_vote(c->hw, true); clk_summary_show_one(s, c, level); hlist_for_each_entry(child, &c->children, child_node) clk_summary_show_subtree(s, child, level + 1); if (c->ops->bus_vote) c->ops->bus_vote(c->hw, false); } static int clk_summary_show(struct seq_file *s, void *data) Loading Loading @@ -2656,6 +2660,9 @@ static void clk_dump_subtree(struct seq_file *s, struct clk_core *c, int level) if (!c) return; if (c->ops->bus_vote) c->ops->bus_vote(c->hw, true); clk_dump_one(s, c, level); hlist_for_each_entry(child, &c->children, child_node) { Loading @@ -2664,6 +2671,9 @@ static void clk_dump_subtree(struct seq_file *s, struct clk_core *c, int level) } seq_putc(s, '}'); if (c->ops->bus_vote) c->ops->bus_vote(c->hw, false); } static int clk_dump(struct seq_file *s, void *data) Loading Loading @@ -2925,7 +2935,15 @@ void clk_debug_print_hw(struct clk_core *clk, struct seq_file *f) if (!clk->ops->list_registers) return; clk_prepare_lock(); if (clk->ops->bus_vote) clk->ops->bus_vote(clk->hw, true); clk->ops->list_registers(f, clk->hw); if (clk->ops->bus_vote) clk->ops->bus_vote(clk->hw, false); clk_prepare_unlock(); } EXPORT_SYMBOL(clk_debug_print_hw); Loading @@ -2933,8 +2951,16 @@ static int print_hw_show(struct seq_file *m, void *unused) { struct clk_core *c = m->private; clk_prepare_lock(); if (c->ops->bus_vote) c->ops->bus_vote(c->hw, true); clk_debug_print_hw(c, m); if (c->ops->bus_vote) c->ops->bus_vote(c->hw, false); clk_prepare_unlock(); return 0; } Loading include/linux/clk-provider.h +6 −0 Original line number Diff line number Diff line Loading @@ -216,6 +216,9 @@ struct clk_duty { * clock that is below rate_max. Return -ENXIO in case there is * no frequency table. * * @bus_vote: Votes for bandwidth on certain config slaves to connect * ports in order to gain access to clock controllers. * * The clk_enable/clk_disable and clk_prepare/clk_unprepare pairs allow * implementations to split any work between atomic (enable) and sleepable * (prepare) contexts. If enabling a clock requires code that might sleep, Loading Loading @@ -264,6 +267,7 @@ struct clk_ops { struct clk_hw *hw); long (*list_rate)(struct clk_hw *hw, unsigned int n, unsigned long rate_max); void (*bus_vote)(struct clk_hw *hw, bool enable); }; /** Loading @@ -278,6 +282,7 @@ struct clk_ops { * @vdd_class: voltage scaling requirement class * @rate_max: maximum clock rate in Hz supported at each voltage level * @num_rate_max: number of maximum voltage level supported * @bus_cl_id: client id registered with the bus driver used for bw votes */ struct clk_init_data { const char *name; Loading @@ -288,6 +293,7 @@ struct clk_init_data { struct clk_vdd_class *vdd_class; unsigned long *rate_max; int num_rate_max; unsigned int bus_cl_id; }; struct regulator; Loading Loading
drivers/clk/clk.c +26 −0 Original line number Diff line number Diff line Loading @@ -2594,10 +2594,14 @@ static void clk_summary_show_subtree(struct seq_file *s, struct clk_core *c, if (!c) return; if (c->ops->bus_vote) c->ops->bus_vote(c->hw, true); clk_summary_show_one(s, c, level); hlist_for_each_entry(child, &c->children, child_node) clk_summary_show_subtree(s, child, level + 1); if (c->ops->bus_vote) c->ops->bus_vote(c->hw, false); } static int clk_summary_show(struct seq_file *s, void *data) Loading Loading @@ -2656,6 +2660,9 @@ static void clk_dump_subtree(struct seq_file *s, struct clk_core *c, int level) if (!c) return; if (c->ops->bus_vote) c->ops->bus_vote(c->hw, true); clk_dump_one(s, c, level); hlist_for_each_entry(child, &c->children, child_node) { Loading @@ -2664,6 +2671,9 @@ static void clk_dump_subtree(struct seq_file *s, struct clk_core *c, int level) } seq_putc(s, '}'); if (c->ops->bus_vote) c->ops->bus_vote(c->hw, false); } static int clk_dump(struct seq_file *s, void *data) Loading Loading @@ -2925,7 +2935,15 @@ void clk_debug_print_hw(struct clk_core *clk, struct seq_file *f) if (!clk->ops->list_registers) return; clk_prepare_lock(); if (clk->ops->bus_vote) clk->ops->bus_vote(clk->hw, true); clk->ops->list_registers(f, clk->hw); if (clk->ops->bus_vote) clk->ops->bus_vote(clk->hw, false); clk_prepare_unlock(); } EXPORT_SYMBOL(clk_debug_print_hw); Loading @@ -2933,8 +2951,16 @@ static int print_hw_show(struct seq_file *m, void *unused) { struct clk_core *c = m->private; clk_prepare_lock(); if (c->ops->bus_vote) c->ops->bus_vote(c->hw, true); clk_debug_print_hw(c, m); if (c->ops->bus_vote) c->ops->bus_vote(c->hw, false); clk_prepare_unlock(); return 0; } Loading
include/linux/clk-provider.h +6 −0 Original line number Diff line number Diff line Loading @@ -216,6 +216,9 @@ struct clk_duty { * clock that is below rate_max. Return -ENXIO in case there is * no frequency table. * * @bus_vote: Votes for bandwidth on certain config slaves to connect * ports in order to gain access to clock controllers. * * The clk_enable/clk_disable and clk_prepare/clk_unprepare pairs allow * implementations to split any work between atomic (enable) and sleepable * (prepare) contexts. If enabling a clock requires code that might sleep, Loading Loading @@ -264,6 +267,7 @@ struct clk_ops { struct clk_hw *hw); long (*list_rate)(struct clk_hw *hw, unsigned int n, unsigned long rate_max); void (*bus_vote)(struct clk_hw *hw, bool enable); }; /** Loading @@ -278,6 +282,7 @@ struct clk_ops { * @vdd_class: voltage scaling requirement class * @rate_max: maximum clock rate in Hz supported at each voltage level * @num_rate_max: number of maximum voltage level supported * @bus_cl_id: client id registered with the bus driver used for bw votes */ struct clk_init_data { const char *name; Loading @@ -288,6 +293,7 @@ struct clk_init_data { struct clk_vdd_class *vdd_class; unsigned long *rate_max; int num_rate_max; unsigned int bus_cl_id; }; struct regulator; Loading