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

Commit b3d862a2 authored by Michael Adisumarta's avatar Michael Adisumarta Committed by Skylar Chang
Browse files

msm: ipa: vote for device side through mhi for tethering use cases



Specify MHI_VOTE_DEVICE flag when calling mhi-driver API:
mhi_device_get_sync to make sure device side PCIE won't
get to power collapse.

Change-Id: Ia254d3bdbc191f80af05224df4b272921aba2d10
Signed-off-by: default avatarMichael Adisumarta <madisuma@codeaurora.org>
parent 5a290b46
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1458,7 +1458,8 @@ static int ipa_mpm_vote_unvote_pcie_clk(enum ipa_mpm_clk_vote_type vote,

	if (vote == CLK_ON) {
		result = mhi_device_get_sync(
			ipa_mpm_ctx->md[probe_id].mhi_dev, MHI_VOTE_BUS);
			ipa_mpm_ctx->md[probe_id].mhi_dev,
				MHI_VOTE_BUS | MHI_VOTE_DEVICE);
		if (result) {
			IPA_MPM_ERR("mhi_sync_get failed for probe_id %d\n",
				result, probe_id);
@@ -1479,7 +1480,8 @@ static int ipa_mpm_vote_unvote_pcie_clk(enum ipa_mpm_clk_vote_type vote,
			*is_acted = true;
			return 0;
		}
		mhi_device_put(ipa_mpm_ctx->md[probe_id].mhi_dev, MHI_VOTE_BUS);
		mhi_device_put(ipa_mpm_ctx->md[probe_id].mhi_dev,
				MHI_VOTE_BUS | MHI_VOTE_DEVICE);
		IPA_MPM_DBG("probe_id %d PCIE clock off\n", probe_id);
		atomic_dec(&ipa_mpm_ctx->md[probe_id].clk_cnt.pcie_clk_cnt);
		atomic_dec(&ipa_mpm_ctx->pcie_clk_total_cnt);