Lines Matching refs:operation
596 static int can_sleep_internal(const SleepConfig *sleep_config, SleepOperation operation, bool check…
627 SleepOperation operation, in can_sleep_internal() argument
630 assert(operation >= 0); in can_sleep_internal()
631 assert(operation < _SLEEP_OPERATION_MAX); in can_sleep_internal()
633 if (check_allowed && !sleep_config->allow[operation]) { in can_sleep_internal()
634 …log_debug("Sleep mode \"%s\" is disabled by configuration.", sleep_operation_to_string(operation)); in can_sleep_internal()
638 if (operation == SLEEP_SUSPEND_THEN_HIBERNATE) in can_sleep_internal()
641 if (can_sleep_state(sleep_config->states[operation]) <= 0 || in can_sleep_internal()
642 can_sleep_disk(sleep_config->modes[operation]) <= 0) in can_sleep_internal()
645 if (operation == SLEEP_SUSPEND) in can_sleep_internal()
654 int can_sleep(SleepOperation operation) { in can_sleep() argument
662 return can_sleep_internal(sleep_config, operation, true); in can_sleep()