]> git.hungrycats.org Git - linux/commit
[power] Add hooks for runtime device power control.
authorPatrick Mochel <mochel@osdl.org>
Tue, 12 Aug 2003 02:25:20 +0000 (19:25 -0700)
committerPatrick Mochel <mochel@osdl.org>
Tue, 12 Aug 2003 02:25:20 +0000 (19:25 -0700)
commit86ccb7959cf7fde613da85a6b3484a71cd24fbf9
treec54ad5fb7c6a5e7d8acc242a37df02baea027035
parent98247e0a408b4b551441bee5068eaa59ee646a11
[power] Add hooks for runtime device power control.

dpm_runtime_{suspend,resume} control the power state of a single device
while the system is running.

dpm_runtime_suspend() will save state of the device, then attempt to power
it down. This happens with interrupts enabled, so if the device does not
support that, the device's state is restored, and we continue on our merry
way.

dpm_runtime_resume() powers the device back on, then restores state of the
device.

dpm_set_power_state() simply notifies the core of the power state the
device is in. Drivers can use this, since they are the only ones that can
really tell.
drivers/base/power/Makefile
drivers/base/power/power.h
drivers/base/power/resume.c
drivers/base/power/runtime.c [new file with mode: 0644]
drivers/base/power/suspend.c