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

Commit cf25a9f0 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" into msm-4.9

parents 28adc94f 0624f569
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -1801,6 +1801,15 @@ static int clk_change_rate(struct clk_core *core)
		clk_enable_unlock(flags);
	}

	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);
@@ -1821,15 +1830,6 @@ static int clk_change_rate(struct clk_core *core)
	if (core->flags & CLK_OPS_PARENT_ENABLE)
		clk_core_prepare_enable(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);