aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_qos.h
diff options
context:
space:
mode:
authorJean Pihet <j-pihet@ti.com>2011-08-25 09:35:27 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-08-25 09:35:27 -0400
commit4e1779baaa542c83b459b0a56585e0c1a04c7782 (patch)
tree0708390d5e00c000d97b89e846a94a7006249521 /include/linux/pm_qos.h
parent4a31a33425a1eb92f6a0b9846f081842268361c8 (diff)
PM QoS: Reorganize data structs
In preparation for the per-device constratins support, re-organize the data strctures: - add a struct pm_qos_constraints which contains the constraints related data - update struct pm_qos_object contents to the PM QoS internal object data. Add a pointer to struct pm_qos_constraints - update the internal code to use the new data structs. Signed-off-by: Jean Pihet <j-pihet@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/pm_qos.h')
-rw-r--r--include/linux/pm_qos.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index 6b0968f8bc6e..97723113ae92 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -25,6 +25,25 @@ struct pm_qos_request {
25 int pm_qos_class; 25 int pm_qos_class;
26}; 26};
27 27
28enum pm_qos_type {
29 PM_QOS_UNITIALIZED,
30 PM_QOS_MAX, /* return the largest value */
31 PM_QOS_MIN /* return the smallest value */
32};
33
34/*
35 * Note: The lockless read path depends on the CPU accessing
36 * target_value atomically. Atomic access is only guaranteed on all CPU
37 * types linux supports for 32 bit quantites
38 */
39struct pm_qos_constraints {
40 struct plist_head list;
41 s32 target_value; /* Do not change to 64 bit */
42 s32 default_value;
43 enum pm_qos_type type;
44 struct blocking_notifier_head *notifiers;
45};
46
28#ifdef CONFIG_PM 47#ifdef CONFIG_PM
29void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class, 48void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class,
30 s32 value); 49 s32 value);