Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\suspend.c Create Date:2022-07-28 09:58:22
Last Modify:2020-03-17 14:47:48 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:suspend_devices_and_enter - Suspend devices and enter system sleep state.*@state: System sleep state to enter.

Proto:int suspend_devices_and_enter(suspend_state_t state)

Type:int

Parameter:

TypeParameterName
suspend_state_tstate
479  bool wakeup = false
481  If Not sleep_state_supported(state) Then Return -ENOSYS
484  pm_suspend_target_state = state
486  If state == PM_SUSPEND_TO_IDLE Then pm_set_suspend_no_platform()
489  error = platform_suspend_begin(state)
490  If error Then Go to Close
493  Suspend and resume console messages over PM events
494  suspend_test_start()
495  error = dpm_suspend_start(PMSG_SUSPEND)
496  If error Then
497  pr_err("Some devices failed to suspend, or early wake event detected\n")
498  Go to Recover_platform
500  suspend_test_finish("suspend devices")
501  If suspend_test(TEST_DEVICES) Then Go to Recover_platform
504  Do
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  When Not error && Not wakeup && platform_suspend_again(state) cycle
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  Return error
521  Recover_platform :
522  platform_recover(state)
523  Go to Resume_devices
Caller
NameDescribe
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