Linux Kernel
3.7.1
|
#include <linux/pm_qos.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/export.h>
#include "power.h"
Go to the source code of this file.
int dev_pm_qos_add_global_notifier | ( | struct notifier_block * | notifier | ) |
int dev_pm_qos_add_notifier | ( | struct device * | dev, |
struct notifier_block * | notifier | ||
) |
dev_pm_qos_add_notifier - sets notification entry for changes to target value of per-device PM QoS constraints
: target device for the constraint : notifier block managed by caller.
Will register the notifier into a notification chain that gets called upon changes to the target value for the device.
If the device's constraints object doesn't exist when this routine is called, it will be created (or error code will be returned if that fails).
dev_pm_qos_add_request - inserts new qos request into the list : target device for the constraint : pointer to a preallocated handle : defines the qos request
This function inserts a new entry in the device constraints list of requested qos performance characteristics. It recomputes the aggregate QoS expectations of parameters and initializes the dev_pm_qos_request handle. Caller needs to save this handle for later use in updates and removal.
Returns 1 if the aggregated constraint value has changed, 0 if the aggregated constraint value has not changed, -EINVAL in case of wrong parameters, -ENOMEM if there's not enough memory to allocate for data structures, -ENODEV if the device has just been removed from the system.
dev_pm_qos_constraints_destroy : target device
Called from the device PM subsystem on device removal under device_pm_lock().
dev_pm_qos_constraints_init - Initalize device's PM QoS constraints pointer. : target device
Called from the device PM subsystem during device insertion under device_pm_lock().
int dev_pm_qos_remove_global_notifier | ( | struct notifier_block * | notifier | ) |
int dev_pm_qos_remove_notifier | ( | struct device * | dev, |
struct notifier_block * | notifier | ||
) |
int dev_pm_qos_remove_request | ( | struct dev_pm_qos_request * | req | ) |
dev_pm_qos_remove_request - modifies an existing qos request : handle to request list element
Will remove pm qos request from the list of constraints and recompute the current target value. Call this on slow code paths.
Returns 1 if the aggregated constraint value has changed, 0 if the aggregated constraint value has not changed, -EINVAL in case of wrong parameters, -ENODEV if the device has been removed from the system
int dev_pm_qos_update_request | ( | struct dev_pm_qos_request * | req, |
s32 | new_value | ||
) |
dev_pm_qos_update_request - modifies an existing qos request : handle to list element holding a dev_pm_qos request to use : defines the qos request
Updates an existing dev PM qos request along with updating the target value.
Attempts are made to make this code callable on hot code paths.
Returns 1 if the aggregated constraint value has changed, 0 if the aggregated constraint value has not changed, -EINVAL in case of wrong parameters, -ENODEV if the device has been removed from the system
EXPORT_SYMBOL_GPL | ( | dev_pm_qos_add_request | ) |
EXPORT_SYMBOL_GPL | ( | dev_pm_qos_update_request | ) |
EXPORT_SYMBOL_GPL | ( | dev_pm_qos_remove_request | ) |
EXPORT_SYMBOL_GPL | ( | dev_pm_qos_add_notifier | ) |
EXPORT_SYMBOL_GPL | ( | dev_pm_qos_remove_notifier | ) |
EXPORT_SYMBOL_GPL | ( | dev_pm_qos_add_global_notifier | ) |
EXPORT_SYMBOL_GPL | ( | dev_pm_qos_remove_global_notifier | ) |
EXPORT_SYMBOL_GPL | ( | dev_pm_qos_add_ancestor_request | ) |