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

Commit 12dc3fd3 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "clk: qcom: branch: Fix propagation of parent rate to branches"

parents a05e2d0c a050a336
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -204,8 +204,8 @@ static int clk_branch2_set_rate(struct clk_hw *hw, unsigned long rate,
	if (!parent)
		return -EPERM;

	if (!branch->aggr_sibling_rates || !clk_hw_is_prepared(hw)) {
		branch->rate = rate;
	if (!branch->aggr_sibling_rates) {
		branch->rate = parent_rate;
		return 0;
	}

@@ -252,6 +252,11 @@ static long clk_branch2_round_rate(struct clk_hw *hw, unsigned long rate,
static unsigned long clk_branch2_recalc_rate(struct clk_hw *hw,
		unsigned long parent_rate)
{
	struct clk_branch *branch = to_clk_branch(hw);

	if (!branch->aggr_sibling_rates)
		return parent_rate;

	return to_clk_branch(hw)->rate;
}