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

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

Merge "mhi: cntrl: qcom: read power down state from boot monitor"

parents 7bdc1fbe 55adf9ab
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -327,7 +327,8 @@ static void mhi_boot_monitor(void *data, async_cookie_t cookie)

	/* wait for device to enter boot stage */
	wait_event_timeout(mhi_cntrl->state_event, mhi_cntrl->ee == MHI_EE_AMSS
			   || mhi_cntrl->ee == MHI_EE_DISABLE_TRANSITION,
			   || mhi_cntrl->ee == MHI_EE_DISABLE_TRANSITION
			   || mhi_cntrl->power_down,
			   timeout);

	ipc_log_string(arch_info->boot_ipc_log, HLOG "Device current ee = %s\n",
+2 −1
Original line number Diff line number Diff line
@@ -545,8 +545,9 @@ static int mhi_qcom_power_up(struct mhi_controller *mhi_cntrl)
			return -EIO;
	}

	/* when coming out of SSR, initial ee state is not valid */
	/* when coming out of SSR, initial states are not valid */
	mhi_cntrl->ee = 0;
	mhi_cntrl->power_down = false;

	ret = mhi_arch_power_up(mhi_cntrl);
	if (ret)
+2 −0
Original line number Diff line number Diff line
@@ -578,6 +578,8 @@ static void mhi_pm_disable_transition(struct mhi_controller *mhi_cntrl,
		mhi_cntrl->ee = MHI_EE_DISABLE_TRANSITION;
		mhi_cntrl->dev_state = MHI_STATE_RESET;
	}
	/* notify controller of power down regardless of state transitions */
	mhi_cntrl->power_down = true;
	write_unlock_irq(&mhi_cntrl->pm_lock);

	/* wake up any threads waiting for state transitions */
+2 −0
Original line number Diff line number Diff line
@@ -350,6 +350,8 @@ struct mhi_controller {
	enum MHI_DEBUG_LEVEL log_lvl;

	/* controller specific data */
	const char *name;
	bool power_down;
	void *priv_data;
	void *log_buf;
	struct dentry *dentry;