s32 new_value, unsigned long timeout_us);
void pm_qos_remove_request(struct pm_qos_request *req);
+int pm_qos_read_req_value(int pm_qos_class, struct pm_qos_request *req);
int pm_qos_request(int pm_qos_class);
int pm_qos_add_notifier(int pm_qos_class, struct notifier_block *notifier);
int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier);
return prev_value != curr_value;
}
+/**
+ * pm_qos_read_req_value - returns requested qos value
+ * @pm_qos_class: identification of which qos value is requested
+ * @req: request wanted to find set value
+ *
+ * This function returns the requested qos value by sysfs node.
+ */
+int pm_qos_read_req_value(int pm_qos_class, struct pm_qos_request *req)
+{
+ struct plist_node *p;
+ unsigned long flags;
+
+ spin_lock_irqsave(&pm_qos_lock, flags);
+
+ plist_for_each(p, &pm_qos_array[pm_qos_class]->constraints->list) {
+ if (req == container_of(p, struct pm_qos_request, node)) {
+ spin_unlock_irqrestore(&pm_qos_lock, flags);
+ return p->prio;
+ }
+ }
+
+ spin_unlock_irqrestore(&pm_qos_lock, flags);
+
+ return -ENODATA;
+}
+EXPORT_SYMBOL_GPL(pm_qos_read_req_value);
+
/**
* pm_qos_request - returns current system wide qos expectation
* @pm_qos_class: identification of which qos value is requested