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

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

Merge "qcom: clock-rpm: Add check to avoid enabling RPM scaling multiple times"

parents dfa24e05 c2f86822
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -268,12 +268,17 @@ static enum handoff rpm_clk_handoff(struct clk *clk)
int enable_rpm_scaling(void)
{
	int rc, value = 0x1;
	static int is_inited;

	struct msm_rpm_kvp kvp = {
		.key = RPM_SMD_KEY_ENABLE,
		.data = (void *)&value,
		.length = sizeof(value),
	};

	if (is_inited)
		return 0;

	rc = msm_rpm_send_message_noirq(MSM_RPM_CTX_SLEEP_SET,
			RPM_MISC_CLK_TYPE, RPM_SCALING_ENABLE_ID, &kvp, 1);
	if (rc < 0) {
@@ -290,6 +295,7 @@ int enable_rpm_scaling(void)
		return rc;
	}

	is_inited++;
	return 0;
}