函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\suspend.c Create Date:2022-07-27 10:58:31
Last Modify:2020-03-17 14:47:48 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:suspend_devices_and_enter - Suspend devices and enter system sleep state.*@state: System sleep state to enter.

函数原型:int suspend_devices_and_enter(suspend_state_t state)

返回类型:int

参数:

类型参数名称
suspend_state_tstate
479  bool wakeup = false
481  如果非sleep_state_supported(state)则返回:负ENOSYS
484  pm_suspend_target_state等于state
486  如果state恒等于PM_SUSPEND_TO_IDLEpm_set_suspend_no_platform()
489  error等于platform_suspend_begin(state)
490  如果error则转到:Close
493  Suspend and resume console messages over PM events
494  suspend_test_start()
495  error等于dpm_suspend_start(PMSG_SUSPEND)
496  如果error
497  打印错误信息("Some devices failed to suspend, or early wake event detected\n")
498  转到:Recover_platform
500  suspend_test_finish("suspend devices")
501  如果suspend_test(TEST_DEVICES)则转到:Recover_platform
504  循环
505  error等于suspend_enter - Make the system enter the given sleep state.*@state: System sleep state to enter.*@wakeup: Returns information that the sleep state should not be re-entered.* This function should be called after devices have been suspended.
506  当非error且非wakeupplatform_suspend_again(state)循环
508  Resume_devices :
509  suspend_test_start()
510  dpm_resume_end(PMSG_RESUME)
511  suspend_test_finish("resume devices")
512  trace_suspend_resume(TPS("resume_console"), state, true)
513  resume_console()
514  trace_suspend_resume(TPS("resume_console"), state, false)
516  Close :
517  platform_resume_end(state)
518  pm_suspend_target_state等于PM_SUSPEND_ON
519  返回:error
521  Recover_platform :
522  platform_recover(state)
523  转到:Resume_devices
调用者
名称描述
enter_stater_state - Do common work needed to enter system sleep state.*@state: System sleep state to enter.* Make sure that no one else is trying to put the system into a sleep state.* Fail if that's not the case. Otherwise, prepare for system suspend, make the
snapshot_ioctl