@@ -7,7 +7,7 @@ one of the parameters.
77Two different PM QoS frameworks are available:
881. PM QoS classes for cpu_dma_latency, network_latency, network_throughput.
992. the per-device PM QoS framework provides the API to manage the per-device latency
10- constraints.
10+ constraints and PM QoS flags .
1111
1212Each parameters have defined units:
1313 * latency: usec
@@ -86,13 +86,17 @@ To remove the user mode request for a target value simply close the device
8686node.
8787
8888
89- 2. PM QoS per-device latency framework
89+ 2. PM QoS per-device latency and flags framework
90+
91+ For each device, there are two lists of PM QoS requests. One is maintained
92+ along with the aggregated target of latency value and the other is for PM QoS
93+ flags. Values are updated in response to changes of the request list.
94+
95+ Target latency value is simply the minimum of the request values held in the
96+ parameter list elements. The PM QoS flags aggregate value is a gather (bitwise
97+ OR) of all list elements' values. Two device PM QoS flags are defined currently:
98+ PM_QOS_FLAG_NO_POWER_OFF and PM_QOS_FLAG_REMOTE_WAKEUP.
9099
91- For each device a list of performance requests is maintained along with
92- an aggregated target value. The aggregated target value is updated with
93- changes to the request list or elements of the list. Typically the
94- aggregated target value is simply the max or min of the request values held
95- in the parameter list elements.
96100Note: the aggregated target value is implemented as an atomic variable so that
97101reading the aggregated value does not require any locking mechanism.
98102
@@ -119,6 +123,38 @@ the request.
119123s32 dev_pm_qos_read_value(device):
120124Returns the aggregated value for a given device's constraints list.
121125
126+ enum pm_qos_flags_status dev_pm_qos_flags(device, mask)
127+ Check PM QoS flags of the given device against the given mask of flags.
128+ The 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+
135+ int dev_pm_qos_add_ancestor_request(dev, handle, value)
136+ Add a PM QoS request for the first direct ancestor of the given device whose
137+ power.ignore_children flag is unset.
138+
139+ int dev_pm_qos_expose_latency_limit(device, value)
140+ Add a request to the device's PM QoS list of latency constraints and create
141+ a sysfs attribute pm_qos_resume_latency_us under the device's power directory
142+ allowing user space to manipulate that request.
143+
144+ void dev_pm_qos_hide_latency_limit(device)
145+ Drop the request added by dev_pm_qos_expose_latency_limit() from the device's
146+ PM QoS list of latency constraints and remove sysfs attribute pm_qos_resume_latency_us
147+ from the device's power directory.
148+
149+ int dev_pm_qos_expose_flags(device, value)
150+ Add a request to the device's PM QoS list of flags and create sysfs attributes
151+ pm_qos_no_power_off and pm_qos_remote_wakeup under the device's power directory
152+ allowing user space to change these flags' value.
153+
154+ void dev_pm_qos_hide_flags(device)
155+ Drop the request added by dev_pm_qos_expose_flags() from the device's PM QoS list
156+ of flags and remove sysfs attributes pm_qos_no_power_off and pm_qos_remote_wakeup
157+ under the device's power directory.
122158
123159Notification mechanisms:
124160The per-device PM QoS framework has 2 different and distinct notification trees:
0 commit comments