Lines Matching defs:state

20  * Not all MHI state transitions are synchronous. Transitions like Linkdown,
22 * transition to a new state only if we're allowed to.
24 * Priority increases as we go down. For instance, from any state in L0, the
26 * this rule is state DISABLE. From DISABLE state we can only transition to
27 * POR state. Also, while in L2 state, user cannot jump back to previous
111 enum mhi_pm_state state)
122 if (unlikely(!(dev_state_transitions[index].to_states & state)))
125 mhi_cntrl->pm_state = state;
129 void mhi_set_mhi_state(struct mhi_controller *mhi_cntrl, enum mhi_state state)
131 if (state == MHI_STATE_RESET) {
137 MHICTRL_MHISTATE_SHIFT, state);
141 /* NOP for backward compatibility, host allowed to ring DB in M2 state */
152 /* Handle device ready state transition */
174 /* Check if device entered error state */
180 /* Timeout if device did not transition to ready state */
193 dev_err(dev, "Error moving to state %s from %s\n",
232 /* Set MHI to M0 state */
256 dev_err(dev, "Unable to transition to M0 state\n");
315 * After receiving the MHI state change event from the device indicating the
316 * transition to M1 state, the host can transition the device to M2 state
317 * for keeping it in low power state.
321 enum mhi_pm_state state;
325 state = mhi_tryset_pm_state(mhi_cntrl, MHI_PM_M2);
326 if (state == MHI_PM_M2) {
357 enum mhi_pm_state state;
362 state = mhi_tryset_pm_state(mhi_cntrl, MHI_PM_M3);
364 if (state != MHI_PM_M3) {
365 dev_err(dev, "Unable to transition to M3 state\n");
399 /* Force MHI to be in M0 state before continuing */
459 dev_dbg(dev, "Transitioning from PM state: %s to: %s\n",
477 /* Wake up threads waiting for state transition */
481 dev_err(dev, "Failed to transition to state: %s from: %s\n",
493 /* Skip MHI RESET if in RDDM state */
510 dev_err(dev, "Device failed to exit MHI Reset state\n");
577 /* Move to disable state */
582 dev_err(dev, "Error moving from PM state: %s to: %s\n",
587 dev_dbg(dev, "Exiting with PM state: %s, MHI state: %s\n",
596 enum dev_st_transition state)
604 item->state = state;
644 dev_dbg(dev, "Handling state transition: %s\n",
645 TO_DEV_STATE_TRANS_STR(itr->state));
647 switch (itr->state) {
706 /* Take MHI out of M2 state */
723 "Could not enter M0/M1 state");
740 "Error setting to PM state: %s from: %s\n",
758 "Did not enter M3 state, MHI state: %s, PM state: %s\n",
783 dev_info(dev, "Entered with PM state: %s, MHI state: %s\n",
806 "Error setting to PM state: %s from: %s\n",
824 "Did not enter M0 state, MHI state: %s, PM state: %s\n",
922 enum mhi_state state;
992 state = mhi_get_mhi_state(mhi_cntrl);
993 if (state == MHI_STATE_SYS_ERR) {
1007 dev_info(dev, "Failed to reset MHI due to syserr state\n");
1018 /* Transition to next state */
1049 /* If it's not a graceful shutdown, force MHI to linkdown state */
1058 dev_dbg(dev, "Failed to move to state: %s from: %s\n",
1110 dev_dbg(dev, "Triggering SYS_ERR to force RDDM state\n");