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

Commit 3cda0e1d authored by Michael Adisumarta's avatar Michael Adisumarta Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa: IPA IMP handle vote unvote in 5G SSR



Honor the clock devote request while we have already devoted
for the clock while handling MDM SSR.

Change-Id: I6b6156e6359cb2749d5e2f8fa15adc0cec81b5fa
Signed-off-by: default avatarMichael Adisumarta <madisuma@codeaurora.org>
parent a1829f0c
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -623,6 +623,17 @@ struct ipa_mhi_clk_vote_resp_msg_v01
	resp->resp.error = IPA_QMI_ERR_INTERNAL_V01;

	mutex_lock(&imp_ctx->mutex);

	/*
	 * returning success for clock unvote request - since it could
	 * be 5G modem SSR scenario where clocks are already OFF.
	 */
	if (!vote && imp_ctx->state == IMP_INVALID) {
		IMP_DBG("Unvote in Invalid state, no op for clock unvote\n");
		mutex_unlock(&imp_ctx->mutex);
		return 0;
	}

	if (imp_ctx->state != IMP_STARTED) {
		IMP_ERR("unexpected vote when in state %d\n", imp_ctx->state);
		mutex_unlock(&imp_ctx->mutex);