• Patrick Mochel's avatar
    [power] Improve suspend functions. · 47d696a9
    Patrick Mochel authored
    - Implement pm_suspend(), which is callable from anywhere in the kernel, 
      and takes one of 
    
      	PM_SUSPEND_STANDBY
    	PM_SUSPEND_MEM
    	PM_SUSPEND_DISK
    
      and enters the appropriate state. 
    
    - Change sysfs file to look for 
    
      "standby"
      "mem"
      "disk"
    
      for what state to enter (rather than 'suspend' and 'hibernate' for the 
      latter two). 
    
    - Add pm_sem to block multiple suspend sequences happening at once. 
    
    - Allocate a console and stop processes from common code before entering
      state.
    
    - Add pm_power_down() callback for platform drivers to implement. Will be 
      called to actually enter the low-power state.
    47d696a9
main.c 3.68 KB