diff options
Diffstat (limited to 'include/linux/pm_qos.h')
-rw-r--r-- | include/linux/pm_qos.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h index 83b0ea302a80..4d99e4e6ef83 100644 --- a/include/linux/pm_qos.h +++ b/include/linux/pm_qos.h | |||
@@ -78,6 +78,7 @@ int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier); | |||
78 | int pm_qos_request_active(struct pm_qos_request *req); | 78 | int pm_qos_request_active(struct pm_qos_request *req); |
79 | s32 pm_qos_read_value(struct pm_qos_constraints *c); | 79 | s32 pm_qos_read_value(struct pm_qos_constraints *c); |
80 | 80 | ||
81 | s32 __dev_pm_qos_read_value(struct device *dev); | ||
81 | s32 dev_pm_qos_read_value(struct device *dev); | 82 | s32 dev_pm_qos_read_value(struct device *dev); |
82 | int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req, | 83 | int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req, |
83 | s32 value); | 84 | s32 value); |
@@ -91,6 +92,8 @@ int dev_pm_qos_add_global_notifier(struct notifier_block *notifier); | |||
91 | int dev_pm_qos_remove_global_notifier(struct notifier_block *notifier); | 92 | int dev_pm_qos_remove_global_notifier(struct notifier_block *notifier); |
92 | void dev_pm_qos_constraints_init(struct device *dev); | 93 | void dev_pm_qos_constraints_init(struct device *dev); |
93 | void dev_pm_qos_constraints_destroy(struct device *dev); | 94 | void dev_pm_qos_constraints_destroy(struct device *dev); |
95 | int dev_pm_qos_add_ancestor_request(struct device *dev, | ||
96 | struct dev_pm_qos_request *req, s32 value); | ||
94 | #else | 97 | #else |
95 | static inline int pm_qos_update_target(struct pm_qos_constraints *c, | 98 | static inline int pm_qos_update_target(struct pm_qos_constraints *c, |
96 | struct plist_node *node, | 99 | struct plist_node *node, |
@@ -107,7 +110,19 @@ static inline void pm_qos_remove_request(struct pm_qos_request *req) | |||
107 | { return; } | 110 | { return; } |
108 | 111 | ||
109 | static inline int pm_qos_request(int pm_qos_class) | 112 | static inline int pm_qos_request(int pm_qos_class) |
110 | { return 0; } | 113 | { |
114 | switch (pm_qos_class) { | ||
115 | case PM_QOS_CPU_DMA_LATENCY: | ||
116 | return PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE; | ||
117 | case PM_QOS_NETWORK_LATENCY: | ||
118 | return PM_QOS_NETWORK_LAT_DEFAULT_VALUE; | ||
119 | case PM_QOS_NETWORK_THROUGHPUT: | ||
120 | return PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE; | ||
121 | default: | ||
122 | return PM_QOS_DEFAULT_VALUE; | ||
123 | } | ||
124 | } | ||
125 | |||
111 | static inline int pm_qos_add_notifier(int pm_qos_class, | 126 | static inline int pm_qos_add_notifier(int pm_qos_class, |
112 | struct notifier_block *notifier) | 127 | struct notifier_block *notifier) |
113 | { return 0; } | 128 | { return 0; } |
@@ -119,6 +134,8 @@ static inline int pm_qos_request_active(struct pm_qos_request *req) | |||
119 | static inline s32 pm_qos_read_value(struct pm_qos_constraints *c) | 134 | static inline s32 pm_qos_read_value(struct pm_qos_constraints *c) |
120 | { return 0; } | 135 | { return 0; } |
121 | 136 | ||
137 | static inline s32 __dev_pm_qos_read_value(struct device *dev) | ||
138 | { return 0; } | ||
122 | static inline s32 dev_pm_qos_read_value(struct device *dev) | 139 | static inline s32 dev_pm_qos_read_value(struct device *dev) |
123 | { return 0; } | 140 | { return 0; } |
124 | static inline int dev_pm_qos_add_request(struct device *dev, | 141 | static inline int dev_pm_qos_add_request(struct device *dev, |
@@ -150,6 +167,9 @@ static inline void dev_pm_qos_constraints_destroy(struct device *dev) | |||
150 | { | 167 | { |
151 | dev->power.power_state = PMSG_INVALID; | 168 | dev->power.power_state = PMSG_INVALID; |
152 | } | 169 | } |
170 | static inline int dev_pm_qos_add_ancestor_request(struct device *dev, | ||
171 | struct dev_pm_qos_request *req, s32 value) | ||
172 | { return 0; } | ||
153 | #endif | 173 | #endif |
154 | 174 | ||
155 | #endif | 175 | #endif |