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

Commit 833f63f0 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 5cc8302d 3b9b4408
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -194,8 +194,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;
	}

@@ -242,6 +242,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;
}