Wakeup via Key

  • Wakeup via GPIO:
  • Awake function call process:
    echo mem > /sys/power/state
    |--late_initcall_sync(software_resume)
    |  |--swsusp_check  #  Check is the image is valid of not from swsusp_resume_device device. If it is invalid, the following process will not be excuted, you can exit and proceed with the normal startup process.
    |  |--pm_prepare_console
    |  |--__pm_notifier_call_chain
    |  |--freeze_processes  # Freeze the processes of the current user space
    |  |-load_image_and_restore
    |  |  |--lock_device_hotplug
    |  |  |--create_basic_memory_bitmaps
    |  |  |--swsusp_read
    |  |  |--swsusp_close
    |  |  |--hibernation_restore  # Restore from the hibernate image
    |  |  |  |--resume_target_kernel      
    |  |  |--swsusp_free
    |  |  |--free_basic_memory_bitmaps
    |  |  |--unlock_device_hotplug
    |  |--thaw_processes  # Thaw the processes of the user sapce. And at this point, the process being thawed and restored is a process in Hibernate.
    |  |--__pm_notifier_call_chain
    |  |--pm_restore_console
    |  |--swsusp_close