aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_qos.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pm_qos.h')
-rw-r--r--include/linux/pm_qos.h22
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);
78int pm_qos_request_active(struct pm_qos_request *req); 78int pm_qos_request_active(struct pm_qos_request *req);
79s32 pm_qos_read_value(struct pm_qos_constraints *c); 79s32 pm_qos_read_value(struct pm_qos_constraints *c);
80 80
81s32 __dev_pm_qos_read_value(struct device *dev);
81s32 dev_pm_qos_read_value(struct device *dev); 82s32 dev_pm_qos_read_value(struct device *dev);
82int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req, 83int 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);
91int dev_pm_qos_remove_global_notifier(struct notifier_block *notifier); 92int dev_pm_qos_remove_global_notifier(struct notifier_block *notifier);
92void dev_pm_qos_constraints_init(struct device *dev); 93void dev_pm_qos_constraints_init(struct device *dev);
93void dev_pm_qos_constraints_destroy(struct device *dev); 94void dev_pm_qos_constraints_destroy(struct device *dev);
95int dev_pm_qos_add_ancestor_request(struct device *dev,
96 struct dev_pm_qos_request *req, s32 value);
94#else 97#else
95static inline int pm_qos_update_target(struct pm_qos_constraints *c, 98static 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
109static inline int pm_qos_request(int pm_qos_class) 112static 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
111static inline int pm_qos_add_notifier(int pm_qos_class, 126static 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)
119static inline s32 pm_qos_read_value(struct pm_qos_constraints *c) 134static inline s32 pm_qos_read_value(struct pm_qos_constraints *c)
120 { return 0; } 135 { return 0; }
121 136
137static inline s32 __dev_pm_qos_read_value(struct device *dev)
138 { return 0; }
122static inline s32 dev_pm_qos_read_value(struct device *dev) 139static inline s32 dev_pm_qos_read_value(struct device *dev)
123 { return 0; } 140 { return 0; }
124static inline int dev_pm_qos_add_request(struct device *dev, 141static 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}
170static 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