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

Commit 9353e194 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mhi: core: add wait for m2 state change before suspend"

parents a70ec3da 57444e70
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1216,6 +1216,11 @@ int mhi_pm_fast_suspend(struct mhi_controller *mhi_cntrl, bool notify_client)
		return -EBUSY;
	}

	/* wait here if controller wants device to be in M2 before proceeding */
	wait_event_timeout(mhi_cntrl->state_event,
			   mhi_cntrl->dev_state == MHI_STATE_M2,
			   msecs_to_jiffies(mhi_cntrl->m2_timeout_ms));

	/* disable ctrl event processing */
	tasklet_disable(&mhi_cntrl->mhi_event->task);

+1 −0
Original line number Diff line number Diff line
@@ -277,6 +277,7 @@ struct mhi_controller {
	struct mhi_ctxt *mhi_ctxt;

	u32 timeout_ms;
	u32 m2_timeout_ms; /* wait time for host to continue suspend after m2 */

	/* caller should grab pm_mutex for suspend/resume operations */
	struct mutex pm_mutex;