• Home
  • Raw
  • Download

Lines Matching refs:state

155 	suspend_state_t state;  in decode_suspend_state()  local
162 for (state = PM_SUSPEND_MIN; state < PM_SUSPEND_MAX; state++) { in decode_suspend_state()
163 const char *label = mem_sleep_states[state]; in decode_suspend_state()
166 return state; in decode_suspend_state()
175 suspend_state_t state; in mem_sleep_store() local
187 state = decode_suspend_state(buf, n); in mem_sleep_store()
188 if (state < PM_SUSPEND_MAX && state > PM_SUSPEND_ON) in mem_sleep_store()
189 mem_sleep_current = state; in mem_sleep_store()
595 suspend_state_t state; in decode_state() local
608 for (state = PM_SUSPEND_MIN; state < PM_SUSPEND_MAX; state++) { in decode_state()
609 const char *label = pm_states[state]; in decode_state()
612 return state; in decode_state()
622 suspend_state_t state; in state_store() local
634 state = decode_state(buf, n); in state_store()
635 if (state < PM_SUSPEND_MAX) { in state_store()
636 if (state == PM_SUSPEND_MEM) in state_store()
637 state = mem_sleep_current; in state_store()
639 error = pm_suspend(state); in state_store()
640 } else if (state == PM_SUSPEND_MAX) { in state_store()
651 power_attr(state);
728 suspend_state_t state = pm_autosleep_state(); in autosleep_show() local
730 if (state == PM_SUSPEND_ON) in autosleep_show()
734 if (state < PM_SUSPEND_MAX) in autosleep_show()
735 return sprintf(buf, "%s\n", pm_states[state] ? in autosleep_show()
736 pm_states[state] : "error"); in autosleep_show()
749 suspend_state_t state = decode_state(buf, n); in autosleep_store() local
752 if (state == PM_SUSPEND_ON in autosleep_store()
756 if (state == PM_SUSPEND_MEM) in autosleep_store()
757 state = mem_sleep_current; in autosleep_store()
759 error = pm_autosleep_set_state(state); in autosleep_store()