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

Commit fee88935 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "clk: Move vdd voting before set rate and parent"

parents fc2f0e6d 1098fcc4
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -1751,6 +1751,15 @@ static int clk_change_rate(struct clk_core *core)
	else if (core->parent)
		best_parent_rate = core->parent->rate;

	trace_clk_set_rate(core, core->new_rate);

	/* Enforce vdd requirements for new frequency. */
	if (core->prepare_count) {
		rc = clk_vote_rate_vdd(core, core->new_rate);
		if (rc)
			goto out;
	}

	if (core->new_parent && core->new_parent != core->parent) {
		old_parent = __clk_set_parent_before(core, core->new_parent);
		trace_clk_set_parent(core, core->new_parent);
@@ -1768,15 +1777,6 @@ static int clk_change_rate(struct clk_core *core)
		__clk_set_parent_after(core, core->new_parent, old_parent);
	}

	trace_clk_set_rate(core, core->new_rate);

	/* Enforce vdd requirements for new frequency. */
	if (core->prepare_count) {
		rc = clk_vote_rate_vdd(core, core->new_rate);
		if (rc)
			goto out;
	}

	if (!skip_set_rate && core->ops->set_rate) {
		rc = core->ops->set_rate(core->hw, core->new_rate,
						best_parent_rate);