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

Commit 129c41b3 authored by Bhaumik Bhatt's avatar Bhaumik Bhatt
Browse files

mhi: core: timeout if sync power up fails to enter mission mode



When sync power up API is called, it does an asynchronous
attempt to power up with a timeout for mission mode entry.
If unable to enter mission mode in time, return -ETIMEDOUT
to clients so they can perform necessary clean-up actions.

Change-Id: I9f6dfcd1f287ae0c41e3dd39298fc4253d11a6da
Signed-off-by: default avatarBhaumik Bhatt <bbhatt@codeaurora.org>
parent 44f03b80
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1037,7 +1037,7 @@ int mhi_sync_power_up(struct mhi_controller *mhi_cntrl)
			   MHI_PM_IN_ERROR_STATE(mhi_cntrl->pm_state),
			   msecs_to_jiffies(mhi_cntrl->timeout_ms));

	return (MHI_IN_MISSION_MODE(mhi_cntrl->ee)) ? 0 : -EIO;
	return (MHI_IN_MISSION_MODE(mhi_cntrl->ee)) ? 0 : -ETIMEDOUT;
}
EXPORT_SYMBOL(mhi_sync_power_up);