aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJean Pihet <j-pihet@ti.com>2011-08-25 09:35:47 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-08-25 09:35:47 -0400
commitb66213cdb002b08b29603d488c451dfe25e2ca20 (patch)
treeeebdfa34524d5cd40f30c722098e8c51457a15e0 /include/linux
parent91ff4cb803df6de9114351b9f2f0f39f397ee03e (diff)
PM QoS: Add global notification mechanism for device constraints
Add a global notification chain that gets called upon changes to the aggregated constraint value for any device. The notification callbacks are passing the full constraint request data in order for the callees to have access to it. The current use is for the platform low-level code to access the target device of the constraint. 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')
-rw-r--r--include/linux/pm_qos.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index f75f74dd9b90..ca7bd3f98cb4 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -75,6 +75,7 @@ int pm_qos_request(int pm_qos_class);
75int pm_qos_add_notifier(int pm_qos_class, struct notifier_block *notifier); 75int pm_qos_add_notifier(int pm_qos_class, struct notifier_block *notifier);
76int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier); 76int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier);
77int pm_qos_request_active(struct pm_qos_request *req); 77int pm_qos_request_active(struct pm_qos_request *req);
78s32 pm_qos_read_value(struct pm_qos_constraints *c);
78 79
79int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req, 80int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req,
80 s32 value); 81 s32 value);
@@ -84,6 +85,8 @@ int dev_pm_qos_add_notifier(struct device *dev,
84 struct notifier_block *notifier); 85 struct notifier_block *notifier);
85int dev_pm_qos_remove_notifier(struct device *dev, 86int dev_pm_qos_remove_notifier(struct device *dev,
86 struct notifier_block *notifier); 87 struct notifier_block *notifier);
88int dev_pm_qos_add_global_notifier(struct notifier_block *notifier);
89int dev_pm_qos_remove_global_notifier(struct notifier_block *notifier);
87void dev_pm_qos_constraints_init(struct device *dev); 90void dev_pm_qos_constraints_init(struct device *dev);
88void dev_pm_qos_constraints_destroy(struct device *dev); 91void dev_pm_qos_constraints_destroy(struct device *dev);
89#else 92#else
@@ -111,6 +114,8 @@ static inline int pm_qos_remove_notifier(int pm_qos_class,
111 { return 0; } 114 { return 0; }
112static inline int pm_qos_request_active(struct pm_qos_request *req) 115static inline int pm_qos_request_active(struct pm_qos_request *req)
113 { return 0; } 116 { return 0; }
117static inline s32 pm_qos_read_value(struct pm_qos_constraints *c)
118 { return 0; }
114 119
115static inline int dev_pm_qos_add_request(struct device *dev, 120static inline int dev_pm_qos_add_request(struct device *dev,
116 struct dev_pm_qos_request *req, 121 struct dev_pm_qos_request *req,
@@ -127,6 +132,12 @@ static inline int dev_pm_qos_add_notifier(struct device *dev,
127static inline int dev_pm_qos_remove_notifier(struct device *dev, 132static inline int dev_pm_qos_remove_notifier(struct device *dev,
128 struct notifier_block *notifier) 133 struct notifier_block *notifier)
129 { return 0; } 134 { return 0; }
135static inline int dev_pm_qos_add_global_notifier(
136 struct notifier_block *notifier)
137 { return 0; }
138static inline int dev_pm_qos_remove_global_notifier(
139 struct notifier_block *notifier)
140 { return 0; }
130static inline void dev_pm_qos_constraints_init(struct device *dev) 141static inline void dev_pm_qos_constraints_init(struct device *dev)
131 { return; } 142 { return; }
132static inline void dev_pm_qos_constraints_destroy(struct device *dev) 143static inline void dev_pm_qos_constraints_destroy(struct device *dev)