mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
mhi: controller: always return success for suspend when modem is off
When external modem is on a powered off state, always return success for suspend. Otherwise, MHI host driver prevent system suspend from happening. CRs-Fixed: 2319740 Change-Id: I8493742cd5855bb568286c74f50062f9d2e73efe Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
This commit is contained in:
parent
4f5a09848f
commit
c6ba2303eb
@ -164,11 +164,18 @@ static int mhi_runtime_suspend(struct device *dev)
|
||||
{
|
||||
int ret = 0;
|
||||
struct mhi_controller *mhi_cntrl = dev_get_drvdata(dev);
|
||||
struct mhi_dev *mhi_dev = mhi_controller_get_devdata(mhi_cntrl);
|
||||
|
||||
MHI_LOG("Enter\n");
|
||||
|
||||
mutex_lock(&mhi_cntrl->pm_mutex);
|
||||
|
||||
if (!mhi_dev->powered_on) {
|
||||
MHI_LOG("Not fully powered, return success\n");
|
||||
mutex_unlock(&mhi_cntrl->pm_mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = mhi_pm_suspend(mhi_cntrl);
|
||||
if (ret) {
|
||||
MHI_LOG("Abort due to ret:%d\n", ret);
|
||||
|
Loading…
x
Reference in New Issue
Block a user