]> git.hungrycats.org Git - linux/commit
[power] Improve suspend functions.
authorPatrick Mochel <mochel@osdl.org>
Mon, 18 Aug 2003 08:31:59 +0000 (01:31 -0700)
committerPatrick Mochel <mochel@osdl.org>
Mon, 18 Aug 2003 08:31:59 +0000 (01:31 -0700)
commit47d696a99c502d7f75d3cf77ec1feb21ffc0ac9f
treee770aa01395fc11f308f1adf651e579aabb5118a
parentadc58de4ba16591e7a520ee3c634edc03c4cd130
[power] Improve suspend functions.

- 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.
include/linux/pm.h
kernel/power/main.c