]> git.hungrycats.org Git - linux/commit
[power] Add PM usage counting
authorPatrick Mochel <mochel@osdl.org>
Sun, 10 Aug 2003 04:58:35 +0000 (21:58 -0700)
committerPatrick Mochel <mochel@osdl.org>
Sun, 10 Aug 2003 04:58:35 +0000 (21:58 -0700)
commit98247e0a408b4b551441bee5068eaa59ee646a11
tree3f2a22f19059d91895c9dd34fa804566eeef7a74
parenta40b9b0b335c466d587ba43f6337d432ea524a72
[power] Add PM usage counting

- Add ->pm_users and ->pm_parent fields to struct dev_pm_info.
- Add function device_pm_set_parent()

The default power parent for a device is the device's physical parent, but
a driver may change it to represent a tranversal power dependency.

Though it's not incorporated into the suspend/resume sequences yet, the
core will respect the power tree, rather than the physical/electrical one.

Also added is a power usage count for devices, which indicates how many
devices are dependent on that one for power (how many children it has in
the power tree). The core will use this count to determine whether or not
a device can be put into a low power state or not.
drivers/base/power/main.c
include/linux/pm.h