Function report |
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 activity | Download SCCT | Chinese |
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:
| Type | Parameter | Name |
|---|---|---|
| suspend_state_t | state |
| 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) |
| 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 |
| 506 | When Not error && Not wakeup && platform_suspend_again(state) cycle |
| 508 | Resume_devices : |
| 509 | suspend_test_start() |
| 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) |
| 519 | Return error |
| 521 | Recover_platform : |
| 522 | platform_recover(state) |
| 523 | Go to Resume_devices |
| Name | Describe |
|---|---|
| enter_state | r_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 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |