Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ac9516f authored by Deepak Katragadda's avatar Deepak Katragadda Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarDeepak Katragadda <dkatraga@codeaurora.org>
parent 536cc2a6
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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)
{
+2 −0
Original line number Diff line number Diff line
@@ -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)
{