aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/power/pm_qos_interface.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/power/pm_qos_interface.txt')
-rw-r--r--Documentation/power/pm_qos_interface.txt50
1 files changed, 43 insertions, 7 deletions
diff --git a/Documentation/power/pm_qos_interface.txt b/Documentation/power/pm_qos_interface.txt
index 79a2a58425ee..483632087788 100644
--- a/Documentation/power/pm_qos_interface.txt
+++ b/Documentation/power/pm_qos_interface.txt
@@ -7,7 +7,7 @@ one of the parameters.
7Two different PM QoS frameworks are available: 7Two different PM QoS frameworks are available:
81. PM QoS classes for cpu_dma_latency, network_latency, network_throughput. 81. PM QoS classes for cpu_dma_latency, network_latency, network_throughput.
92. the per-device PM QoS framework provides the API to manage the per-device latency 92. the per-device PM QoS framework provides the API to manage the per-device latency
10constraints. 10constraints and PM QoS flags.
11 11
12Each parameters have defined units: 12Each parameters have defined units:
13 * latency: usec 13 * latency: usec
@@ -86,13 +86,17 @@ To remove the user mode request for a target value simply close the device
86node. 86node.
87 87
88 88
892. PM QoS per-device latency framework 892. PM QoS per-device latency and flags framework
90
91For each device, there are two lists of PM QoS requests. One is maintained
92along with the aggregated target of latency value and the other is for PM QoS
93flags. Values are updated in response to changes of the request list.
94
95Target latency value is simply the minimum of the request values held in the
96parameter list elements. The PM QoS flags aggregate value is a gather (bitwise
97OR) of all list elements' values. Two device PM QoS flags are defined currently:
98PM_QOS_FLAG_NO_POWER_OFF and PM_QOS_FLAG_REMOTE_WAKEUP.
90 99
91For each device a list of performance requests is maintained along with
92an aggregated target value. The aggregated target value is updated with
93changes to the request list or elements of the list. Typically the
94aggregated target value is simply the max or min of the request values held
95in the parameter list elements.
96Note: the aggregated target value is implemented as an atomic variable so that 100Note: the aggregated target value is implemented as an atomic variable so that
97reading the aggregated value does not require any locking mechanism. 101reading the aggregated value does not require any locking mechanism.
98 102
@@ -119,6 +123,38 @@ the request.
119s32 dev_pm_qos_read_value(device): 123s32 dev_pm_qos_read_value(device):
120Returns the aggregated value for a given device's constraints list. 124Returns the aggregated value for a given device's constraints list.
121 125
126enum pm_qos_flags_status dev_pm_qos_flags(device, mask)
127Check PM QoS flags of the given device against the given mask of flags.
128The meaning of the return values is as follows:
129 PM_QOS_FLAGS_ALL: All flags from the mask are set
130 PM_QOS_FLAGS_SOME: Some flags from the mask are set
131 PM_QOS_FLAGS_NONE: No flags from the mask are set
132 PM_QOS_FLAGS_UNDEFINED: The device's PM QoS structure has not been
133 initialized or the list of requests is empty.
134
135int dev_pm_qos_add_ancestor_request(dev, handle, value)
136Add a PM QoS request for the first direct ancestor of the given device whose
137power.ignore_children flag is unset.
138
139int dev_pm_qos_expose_latency_limit(device, value)
140Add a request to the device's PM QoS list of latency constraints and create
141a sysfs attribute pm_qos_resume_latency_us under the device's power directory
142allowing user space to manipulate that request.
143
144void dev_pm_qos_hide_latency_limit(device)
145Drop the request added by dev_pm_qos_expose_latency_limit() from the device's
146PM QoS list of latency constraints and remove sysfs attribute pm_qos_resume_latency_us
147from the device's power directory.
148
149int dev_pm_qos_expose_flags(device, value)
150Add a request to the device's PM QoS list of flags and create sysfs attributes
151pm_qos_no_power_off and pm_qos_remote_wakeup under the device's power directory
152allowing user space to change these flags' value.
153
154void dev_pm_qos_hide_flags(device)
155Drop the request added by dev_pm_qos_expose_flags() from the device's PM QoS list
156of flags and remove sysfs attributes pm_qos_no_power_off and pm_qos_remote_wakeup
157under the device's power directory.
122 158
123Notification mechanisms: 159Notification mechanisms:
124The per-device PM QoS framework has 2 different and distinct notification trees: 160The per-device PM QoS framework has 2 different and distinct notification trees: