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

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

Merge "mhi: core: provide helper function to check MHI device status"

parents 9390895e ab455ee3
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -629,6 +629,19 @@ enum mhi_dev_state mhi_get_mhi_state(struct mhi_controller *mhi_cntrl);
void mhi_set_mhi_state(struct mhi_controller *mhi_cntrl,
		       enum mhi_dev_state state);


/**
 * mhi_is_active - helper function to determine if MHI in active state
 * @mhi_dev: client device
 */
static inline bool mhi_is_active(struct mhi_device *mhi_dev)
{
	struct mhi_controller *mhi_cntrl = mhi_dev->mhi_cntrl;

	return (mhi_cntrl->dev_state >= MHI_STATE_M0 &&
		mhi_cntrl->dev_state <= MHI_STATE_M3);
}

#ifndef CONFIG_ARCH_QCOM

#ifdef CONFIG_MHI_DEBUG