summaryrefslogtreecommitdiffstats
path: root/include/linux/pm_qos.h
diff options
context:
space:
mode:
authorJean Pihet <j-pihet@ti.com>2011-08-25 15:35:27 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2011-08-25 15:35:27 +0200
commit4e1779baaa542c83b459b0a56585e0c1a04c7782 (patch)
tree0708390d5e00c000d97b89e846a94a7006249521 /include/linux/pm_qos.h
parent4a31a33425a1eb92f6a0b9846f081842268361c8 (diff)
downloadop-kernel-dev-4e1779baaa542c83b459b0a56585e0c1a04c7782.zip
op-kernel-dev-4e1779baaa542c83b459b0a56585e0c1a04c7782.tar.gz
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 6b0968f..9772311 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -25,6 +25,25 @@ struct pm_qos_request {
int pm_qos_class;
};
+enum pm_qos_type {
+ PM_QOS_UNITIALIZED,
+ PM_QOS_MAX, /* return the largest value */
+ PM_QOS_MIN /* return the smallest value */
+};
+
+/*
+ * Note: The lockless read path depends on the CPU accessing
+ * target_value atomically. Atomic access is only guaranteed on all CPU
+ * types linux supports for 32 bit quantites
+ */
+struct pm_qos_constraints {
+ struct plist_head list;
+ s32 target_value; /* Do not change to 64 bit */
+ s32 default_value;
+ enum pm_qos_type type;
+ struct blocking_notifier_head *notifiers;
+};
+
#ifdef CONFIG_PM
void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class,
s32 value);
OpenPOWER on IntegriCloud