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

Commit c5aa0a59 authored by Sujeev Dias's avatar Sujeev Dias
Browse files

mhi: cntrl: qcom: transition to power off as soon as possible



As soon as MHI host receive power off request, transition host
state to power off to avoid unnecessary PCIe link resume.

CRs-Fixed: 2418550
Change-Id: If0f9301e59bd66928de6d65122f174e1031f967a
Signed-off-by: default avatarSujeev Dias <sdias@codeaurora.org>
parent 1ff48618
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -182,10 +182,15 @@ void mhi_arch_esoc_ops_power_off(void *priv, bool mdm_state)
	struct arch_info *arch_info = mhi_dev->arch_info;

	MHI_LOG("Enter: mdm_crashed:%d\n", mdm_state);

	mutex_lock(&mhi_cntrl->pm_mutex);
	if (!mhi_dev->powered_on) {
		MHI_LOG("Not in active state\n");
		mutex_unlock(&mhi_cntrl->pm_mutex);
		return;
	}
	mhi_dev->powered_on = false;
	mutex_unlock(&mhi_cntrl->pm_mutex);

	MHI_LOG("Triggering shutdown process\n");
	mhi_power_down(mhi_cntrl, !mdm_state);
@@ -199,7 +204,6 @@ void mhi_arch_esoc_ops_power_off(void *priv, bool mdm_state)

	mhi_arch_pcie_deinit(mhi_cntrl);
	mhi_cntrl->dev = NULL;
	mhi_dev->powered_on = false;
}

static void mhi_bl_dl_cb(struct mhi_device *mhi_device,