clk: Export the clock driver's voltage voting APIs

There could be special voltage requirements for a clock in addition
to what the clock framework already takes care of.
Export the APIs to vote on the corresponding voltage rails on behalf
on these clocks for use from the individual clock-type drivers.

Change-Id: I818d6f17176372791b6040bc8c5d6f7c40f697df
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
This commit is contained in:
Deepak Katragadda
2017-08-25 13:58:13 -07:00
committed by Gerrit - the friendly Code Review server
parent 536cc2a602
commit 1ac9516f74
2 changed files with 6 additions and 2 deletions

View File

@@ -724,7 +724,7 @@ static int clk_unvote_vdd_level(struct clk_vdd_class *vdd_class, int level)
/*
* Vote for a voltage level corresponding to a clock's rate.
*/
static int clk_vote_rate_vdd(struct clk_core *core, unsigned long rate)
int clk_vote_rate_vdd(struct clk_core *core, unsigned long rate)
{
int level;
@@ -737,11 +737,12 @@ static int clk_vote_rate_vdd(struct clk_core *core, unsigned long rate)
return clk_vote_vdd_level(core->vdd_class, level);
}
EXPORT_SYMBOL_GPL(clk_vote_rate_vdd);
/*
* Remove vote for a voltage level corresponding to a clock's rate.
*/
static void clk_unvote_rate_vdd(struct clk_core *core, unsigned long rate)
void clk_unvote_rate_vdd(struct clk_core *core, unsigned long rate)
{
int level;
@@ -754,6 +755,7 @@ static void clk_unvote_rate_vdd(struct clk_core *core, unsigned long rate)
clk_unvote_vdd_level(core->vdd_class, level);
}
EXPORT_SYMBOL_GPL(clk_unvote_rate_vdd);
static bool clk_is_rate_level_valid(struct clk_core *core, unsigned long rate)
{

View File

@@ -889,6 +889,8 @@ void clk_hw_set_rate_range(struct clk_hw *hw, unsigned long min_rate,
unsigned long clk_aggregate_rate(struct clk_hw *hw,
const struct clk_core *parent);
int clk_vote_rate_vdd(struct clk_core *core, unsigned long rate);
void clk_unvote_rate_vdd(struct clk_core *core, unsigned long rate);
static inline void __clk_hw_set_clk(struct clk_hw *dst, struct clk_hw *src)
{