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
112 enum mhi_pm_state state)
123 if (unlikely(!(dev_state_transitions[index].to_states & state)))
126 mhi_cntrl->pm_state = state;
130 void mhi_set_mhi_state(struct mhi_controller *mhi_cntrl, enum mhi_state state)
135 if (state == MHI_STATE_RESET) {
140 MHICTRL_MHISTATE_MASK, state);
144 dev_err(dev, "Failed to set MHI state to: %s\n",
145 mhi_state_str(state));
148 /* NOP for backward compatibility, host allowed to ring DB in M2 state */
159 /* Handle device ready state transition */
168 /* Check if device entered error state */
196 dev_err(dev, "Error moving to state %s from %s\n",
235 /* Set MHI to M0 state */
259 dev_err(dev, "Unable to transition to M0 state\n");
318 * After receiving the MHI state change event from the device indicating the
319 * transition to M1 state, the host can transition the device to M2 state
320 * for keeping it in low power state.
324 enum mhi_pm_state state;
328 state = mhi_tryset_pm_state(mhi_cntrl, MHI_PM_M2);
329 if (state == MHI_PM_M2) {
360 enum mhi_pm_state state;
365 state = mhi_tryset_pm_state(mhi_cntrl, MHI_PM_M3);
367 if (state != MHI_PM_M3) {
368 dev_err(dev, "Unable to transition to M3 state\n");
407 /* Force MHI to be in M0 state before continuing */
466 dev_dbg(dev, "Processing disable transition with PM state: %s\n",
473 /* Skip MHI RESET if in RDDM state */
498 dev_err(dev, "Device failed to enter READY state\n");
555 /* Move to disable state */
560 dev_err(dev, "Error moving from PM state: %s to: %s\n",
564 dev_dbg(dev, "Exiting with PM state: %s, MHI state: %s\n",
583 dev_dbg(dev, "Transitioning from PM state: %s to: %s\n",
597 dev_err(dev, "Failed to transition from PM state: %s to: %s\n",
606 /* Wake up threads waiting for state transition */
626 dev_err(dev, "Device failed to exit MHI Reset state\n");
688 /* Transition to next state */
694 dev_err(dev, "Error moving to state %s from %s\n",
707 dev_dbg(dev, "Exiting with PM state: %s, MHI state: %s\n",
716 enum dev_st_transition state)
724 item->state = state;
764 dev_dbg(dev, "Handling state transition: %s\n",
765 TO_DEV_STATE_TRANS_STR(itr->state));
767 switch (itr->state) {
831 /* Take MHI out of M2 state */
848 "Could not enter M0/M1 state");
865 "Error setting to PM state: %s from: %s\n",
883 "Did not enter M3 state, MHI state: %s, PM state: %s\n",
908 dev_dbg(dev, "Entered with PM state: %s, MHI state: %s\n",
919 dev_warn(dev, "Resuming from non M3 state (%s)\n",
938 "Error setting to PM state: %s from: %s\n",
956 "Did not enter M0 state, MHI state: %s, PM state: %s\n",
1070 enum mhi_state state;
1107 state = mhi_get_mhi_state(mhi_cntrl);
1108 dev_dbg(dev, "Attempting power on with EE: %s, state: %s\n",
1109 TO_MHI_EXEC_STR(current_ee), mhi_state_str(state));
1111 if (state == MHI_STATE_SYS_ERR) {
1116 dev_info(dev, "Failed to reset MHI due to syserr state\n");
1137 /* Transition to next state */
1171 /* If it's not a graceful shutdown, force MHI to linkdown state */
1177 dev_err(dev, "Failed to move to state: %s from: %s\n",
1180 /* Force link down or error fatal detected state */
1231 dev_dbg(dev, "Triggering SYS_ERR to force RDDM state\n");