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

Commit b5ee8c40 authored by Patrick Daly's avatar Patrick Daly
Browse files

clk: clock-rpm: Add round_rate op for rpm_branch_clk



The clock-generic code relies on clk_round_rate to get the closest
rate from the parent clock. Ensure that the rpm_branch_clk is
compatible.

Change-Id: Ia9c90e80ed39ffa278879d7af8a0ae826725c735
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent 792ce78d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -211,6 +211,11 @@ static int rpm_branch_clk_set_rate(struct clk *clk, unsigned long rate)
	return -EPERM;
}

static long rpm_branch_clk_round_rate(struct clk *clk, unsigned long rate)
{
	return clk->rate;
}

static unsigned long rpm_clk_get_rate(struct clk *clk)
{
	struct rpm_clk *r = to_rpm_clk(clk);
@@ -313,6 +318,7 @@ struct clk_ops clk_ops_rpm_branch = {
	.prepare = rpm_clk_prepare,
	.unprepare = rpm_clk_unprepare,
	.set_rate = rpm_branch_clk_set_rate,
	.round_rate = rpm_branch_clk_round_rate,
	.is_local = rpm_clk_is_local,
	.handoff = rpm_clk_handoff,
};