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

Commit f1bdd750 authored by Vivek Pernamitta's avatar Vivek Pernamitta
Browse files

cnss2: Prevent PCIE l1 substatus at MHI fast resume



Prevent PCIE L1 substates while MHI fast resume to make
device not to enter any low power substates and allow l1
once mhi fast resume is completed.

Change-Id: Id92af704ce6f38ce13df25ef8be5d9c67b4b588a
Signed-off-by: default avatarVivek Pernamitta <vpernami@codeaurora.org>
parent f4e98f0c
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1381,10 +1381,13 @@ static int cnss_pci_set_mhi_state(struct cnss_pci_data *pci_priv,
		break;
	case CNSS_MHI_RESUME:
		mutex_lock(&pci_priv->mhi_ctrl->pm_mutex);
		if (pci_priv->drv_connected_last)
		if (pci_priv->drv_connected_last) {
			cnss_pci_prevent_l1(&pci_priv->pci_dev->dev);
			ret = mhi_pm_fast_resume(pci_priv->mhi_ctrl, true);
		else
			cnss_pci_allow_l1(&pci_priv->pci_dev->dev);
		} else {
			ret = mhi_pm_resume(pci_priv->mhi_ctrl);
		}
		mutex_unlock(&pci_priv->mhi_ctrl->pm_mutex);
		break;
	case CNSS_MHI_TRIGGER_RDDM: