From 036d20a74d6e214d19133010f12c9fbc5eebeaaf Mon Sep 17 00:00:00 2001 From: Bhaumik Bhatt Date: Thu, 4 Jun 2020 11:38:17 -0700 Subject: [PATCH] mhi: core: Trigger host resume if client requests device vote When an MHI client on the host requests a device resume/vote using the mhi_device_get() API, host should also resume from its own suspended state to allow efficient voting as MHI host could be in DRV suspended state. Host must ensure that link control is brought back to the application processor once a vote is initiated. Change-Id: I4dcf8f0d8079ea3fa4c354d5c8ee98c6ca0a4394 Signed-off-by: Bhaumik Bhatt --- drivers/bus/mhi/core/mhi_pm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bus/mhi/core/mhi_pm.c b/drivers/bus/mhi/core/mhi_pm.c index 4aac85254428..c2eb14e6a485 100644 --- a/drivers/bus/mhi/core/mhi_pm.c +++ b/drivers/bus/mhi/core/mhi_pm.c @@ -1569,6 +1569,7 @@ void mhi_device_get(struct mhi_device *mhi_dev, int vote) if (vote & MHI_VOTE_DEVICE) { read_lock_bh(&mhi_cntrl->pm_lock); + mhi_trigger_resume(mhi_cntrl); mhi_cntrl->wake_get(mhi_cntrl, true); MHI_LOG("dev_wake %d\n", atomic_read(&mhi_cntrl->dev_wake)); read_unlock_bh(&mhi_cntrl->pm_lock);