summaryrefslogtreecommitdiffstats
path: root/drivers/base/power/power.h
diff options
context:
space:
mode:
authorRafael J. Wysocki2011-10-07 23:17:07 +0200
committerRafael J. Wysocki2011-10-07 23:17:07 +0200
commit9696cc90071e3660ec02a3728acdedb68afdce4c (patch)
tree99783d31dd42262c29346c92760f7896c3d81cb6 /drivers/base/power/power.h
parentMerge branch 'pm-domains' into pm-for-linus (diff)
parentPM / QoS: Update Documentation for the pm_qos and dev_pm_qos frameworks (diff)
downloadkernel-qcow2-linux-9696cc90071e3660ec02a3728acdedb68afdce4c.tar.gz
kernel-qcow2-linux-9696cc90071e3660ec02a3728acdedb68afdce4c.tar.xz
kernel-qcow2-linux-9696cc90071e3660ec02a3728acdedb68afdce4c.zip
Merge branch 'pm-qos' into pm-for-linus
* pm-qos: PM / QoS: Update Documentation for the pm_qos and dev_pm_qos frameworks PM / QoS: Add function dev_pm_qos_read_value() (v3) PM QoS: Add global notification mechanism for device constraints PM QoS: Implement per-device PM QoS constraints PM QoS: Generalize and export constraints management code PM QoS: Reorganize data structs PM QoS: Code reorganization PM QoS: Minor clean-ups PM QoS: Move and rename the implementation files
Diffstat (limited to 'drivers/base/power/power.h')
-rw-r--r--drivers/base/power/power.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/base/power/power.h b/drivers/base/power/power.h
index f2a25f18fde7..9bf62323aaf3 100644
--- a/drivers/base/power/power.h
+++ b/drivers/base/power/power.h
@@ -1,3 +1,5 @@
+#include <linux/pm_qos.h>
+
#ifdef CONFIG_PM_RUNTIME
extern void pm_runtime_init(struct device *dev);
@@ -35,15 +37,21 @@ extern void device_pm_move_last(struct device *);
static inline void device_pm_init(struct device *dev)
{
spin_lock_init(&dev->power.lock);
+ dev->power.power_state = PMSG_INVALID;
pm_runtime_init(dev);
}
+static inline void device_pm_add(struct device *dev)
+{
+ dev_pm_qos_constraints_init(dev);
+}
+
static inline void device_pm_remove(struct device *dev)
{
+ dev_pm_qos_constraints_destroy(dev);
pm_runtime_remove(dev);
}
-static inline void device_pm_add(struct device *dev) {}
static inline void device_pm_move_before(struct device *deva,
struct device *devb) {}
static inline void device_pm_move_after(struct device *deva,