• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Generic OPP Interface
4  *
5  * Copyright (C) 2009-2010 Texas Instruments Incorporated.
6  *	Nishanth Menon
7  *	Romit Dasgupta
8  *	Kevin Hilman
9  */
10 
11 #ifndef __LINUX_OPP_H__
12 #define __LINUX_OPP_H__
13 
14 #include <linux/energy_model.h>
15 #include <linux/err.h>
16 #include <linux/notifier.h>
17 
18 struct clk;
19 struct regulator;
20 struct dev_pm_opp;
21 struct device;
22 struct opp_table;
23 
24 enum dev_pm_opp_event {
25 	OPP_EVENT_ADD, OPP_EVENT_REMOVE, OPP_EVENT_ENABLE, OPP_EVENT_DISABLE,
26 	OPP_EVENT_ADJUST_VOLTAGE,
27 };
28 
29 /**
30  * struct dev_pm_opp_supply - Power supply voltage/current values
31  * @u_volt:	Target voltage in microvolts corresponding to this OPP
32  * @u_volt_min:	Minimum voltage in microvolts corresponding to this OPP
33  * @u_volt_max:	Maximum voltage in microvolts corresponding to this OPP
34  * @u_amp:	Maximum current drawn by the device in microamperes
35  *
36  * This structure stores the voltage/current values for a single power supply.
37  */
38 struct dev_pm_opp_supply {
39 	unsigned long u_volt;
40 	unsigned long u_volt_min;
41 	unsigned long u_volt_max;
42 	unsigned long u_amp;
43 };
44 
45 /**
46  * struct dev_pm_opp_icc_bw - Interconnect bandwidth values
47  * @avg:	Average bandwidth corresponding to this OPP (in icc units)
48  * @peak:	Peak bandwidth corresponding to this OPP (in icc units)
49  *
50  * This structure stores the bandwidth values for a single interconnect path.
51  */
52 struct dev_pm_opp_icc_bw {
53 	u32 avg;
54 	u32 peak;
55 };
56 
57 /**
58  * struct dev_pm_opp_info - OPP freq/voltage/current values
59  * @rate:	Target clk rate in hz
60  * @supplies:	Array of voltage/current values for all power supplies
61  *
62  * This structure stores the freq/voltage/current values for a single OPP.
63  */
64 struct dev_pm_opp_info {
65 	unsigned long rate;
66 	struct dev_pm_opp_supply *supplies;
67 };
68 
69 /**
70  * struct dev_pm_set_opp_data - Set OPP data
71  * @old_opp:	Old OPP info
72  * @new_opp:	New OPP info
73  * @regulators:	Array of regulator pointers
74  * @regulator_count: Number of regulators
75  * @clk:	Pointer to clk
76  * @dev:	Pointer to the struct device
77  *
78  * This structure contains all information required for setting an OPP.
79  */
80 struct dev_pm_set_opp_data {
81 	struct dev_pm_opp_info old_opp;
82 	struct dev_pm_opp_info new_opp;
83 
84 	struct regulator **regulators;
85 	unsigned int regulator_count;
86 	struct clk *clk;
87 	struct device *dev;
88 };
89 
90 #if defined(CONFIG_PM_OPP)
91 
92 struct opp_table *dev_pm_opp_get_opp_table(struct device *dev);
93 void dev_pm_opp_put_opp_table(struct opp_table *opp_table);
94 
95 unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp);
96 
97 unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp);
98 
99 unsigned int dev_pm_opp_get_level(struct dev_pm_opp *opp);
100 
101 unsigned int dev_pm_opp_get_required_pstate(struct dev_pm_opp *opp,
102 					    unsigned int index);
103 
104 bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp);
105 
106 int dev_pm_opp_get_opp_count(struct device *dev);
107 unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev);
108 unsigned long dev_pm_opp_get_max_volt_latency(struct device *dev);
109 unsigned long dev_pm_opp_get_max_transition_latency(struct device *dev);
110 unsigned long dev_pm_opp_get_suspend_opp_freq(struct device *dev);
111 
112 struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
113 					      unsigned long freq,
114 					      bool available);
115 struct dev_pm_opp *dev_pm_opp_find_level_exact(struct device *dev,
116 					       unsigned int level);
117 struct dev_pm_opp *dev_pm_opp_find_level_ceil(struct device *dev,
118 					      unsigned int *level);
119 
120 struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev,
121 					      unsigned long *freq);
122 struct dev_pm_opp *dev_pm_opp_find_freq_ceil_by_volt(struct device *dev,
123 						     unsigned long u_volt);
124 
125 struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev,
126 					     unsigned long *freq);
127 void dev_pm_opp_put(struct dev_pm_opp *opp);
128 
129 int dev_pm_opp_add(struct device *dev, unsigned long freq,
130 		   unsigned long u_volt);
131 void dev_pm_opp_remove(struct device *dev, unsigned long freq);
132 void dev_pm_opp_remove_all_dynamic(struct device *dev);
133 
134 int dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq,
135 			      unsigned long u_volt, unsigned long u_volt_min,
136 			      unsigned long u_volt_max);
137 
138 int dev_pm_opp_enable(struct device *dev, unsigned long freq);
139 
140 int dev_pm_opp_disable(struct device *dev, unsigned long freq);
141 
142 int dev_pm_opp_register_notifier(struct device *dev, struct notifier_block *nb);
143 int dev_pm_opp_unregister_notifier(struct device *dev, struct notifier_block *nb);
144 
145 struct opp_table *dev_pm_opp_set_supported_hw(struct device *dev, const u32 *versions, unsigned int count);
146 void dev_pm_opp_put_supported_hw(struct opp_table *opp_table);
147 int devm_pm_opp_set_supported_hw(struct device *dev, const u32 *versions, unsigned int count);
148 struct opp_table *dev_pm_opp_set_prop_name(struct device *dev, const char *name);
149 void dev_pm_opp_put_prop_name(struct opp_table *opp_table);
150 struct opp_table *dev_pm_opp_set_regulators(struct device *dev, const char * const names[], unsigned int count);
151 void dev_pm_opp_put_regulators(struct opp_table *opp_table);
152 int devm_pm_opp_set_regulators(struct device *dev, const char * const names[], unsigned int count);
153 struct opp_table *dev_pm_opp_set_clkname(struct device *dev, const char *name);
154 void dev_pm_opp_put_clkname(struct opp_table *opp_table);
155 int devm_pm_opp_set_clkname(struct device *dev, const char *name);
156 struct opp_table *dev_pm_opp_register_set_opp_helper(struct device *dev, int (*set_opp)(struct dev_pm_set_opp_data *data));
157 void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table);
158 int devm_pm_opp_register_set_opp_helper(struct device *dev, int (*set_opp)(struct dev_pm_set_opp_data *data));
159 struct opp_table *dev_pm_opp_attach_genpd(struct device *dev, const char **names, struct device ***virt_devs);
160 void dev_pm_opp_detach_genpd(struct opp_table *opp_table);
161 int devm_pm_opp_attach_genpd(struct device *dev, const char **names, struct device ***virt_devs);
162 struct dev_pm_opp *dev_pm_opp_xlate_required_opp(struct opp_table *src_table, struct opp_table *dst_table, struct dev_pm_opp *src_opp);
163 int dev_pm_opp_xlate_performance_state(struct opp_table *src_table, struct opp_table *dst_table, unsigned int pstate);
164 int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq);
165 int dev_pm_opp_set_opp(struct device *dev, struct dev_pm_opp *opp);
166 int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, const struct cpumask *cpumask);
167 int dev_pm_opp_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask);
168 void dev_pm_opp_remove_table(struct device *dev);
169 void dev_pm_opp_cpumask_remove_table(const struct cpumask *cpumask);
170 int dev_pm_opp_sync_regulators(struct device *dev);
171 #else
dev_pm_opp_get_opp_table(struct device * dev)172 static inline struct opp_table *dev_pm_opp_get_opp_table(struct device *dev)
173 {
174 	return ERR_PTR(-EOPNOTSUPP);
175 }
176 
dev_pm_opp_get_opp_table_indexed(struct device * dev,int index)177 static inline struct opp_table *dev_pm_opp_get_opp_table_indexed(struct device *dev, int index)
178 {
179 	return ERR_PTR(-EOPNOTSUPP);
180 }
181 
dev_pm_opp_put_opp_table(struct opp_table * opp_table)182 static inline void dev_pm_opp_put_opp_table(struct opp_table *opp_table) {}
183 
dev_pm_opp_get_voltage(struct dev_pm_opp * opp)184 static inline unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp)
185 {
186 	return 0;
187 }
188 
dev_pm_opp_get_freq(struct dev_pm_opp * opp)189 static inline unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp)
190 {
191 	return 0;
192 }
193 
dev_pm_opp_get_level(struct dev_pm_opp * opp)194 static inline unsigned int dev_pm_opp_get_level(struct dev_pm_opp *opp)
195 {
196 	return 0;
197 }
198 
199 static inline
dev_pm_opp_get_required_pstate(struct dev_pm_opp * opp,unsigned int index)200 unsigned int dev_pm_opp_get_required_pstate(struct dev_pm_opp *opp,
201 					    unsigned int index)
202 {
203 	return 0;
204 }
205 
dev_pm_opp_is_turbo(struct dev_pm_opp * opp)206 static inline bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp)
207 {
208 	return false;
209 }
210 
dev_pm_opp_get_opp_count(struct device * dev)211 static inline int dev_pm_opp_get_opp_count(struct device *dev)
212 {
213 	return 0;
214 }
215 
dev_pm_opp_get_max_clock_latency(struct device * dev)216 static inline unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev)
217 {
218 	return 0;
219 }
220 
dev_pm_opp_get_max_volt_latency(struct device * dev)221 static inline unsigned long dev_pm_opp_get_max_volt_latency(struct device *dev)
222 {
223 	return 0;
224 }
225 
dev_pm_opp_get_max_transition_latency(struct device * dev)226 static inline unsigned long dev_pm_opp_get_max_transition_latency(struct device *dev)
227 {
228 	return 0;
229 }
230 
dev_pm_opp_get_suspend_opp_freq(struct device * dev)231 static inline unsigned long dev_pm_opp_get_suspend_opp_freq(struct device *dev)
232 {
233 	return 0;
234 }
235 
dev_pm_opp_find_freq_exact(struct device * dev,unsigned long freq,bool available)236 static inline struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
237 					unsigned long freq, bool available)
238 {
239 	return ERR_PTR(-EOPNOTSUPP);
240 }
241 
dev_pm_opp_find_level_exact(struct device * dev,unsigned int level)242 static inline struct dev_pm_opp *dev_pm_opp_find_level_exact(struct device *dev,
243 					unsigned int level)
244 {
245 	return ERR_PTR(-EOPNOTSUPP);
246 }
247 
dev_pm_opp_find_level_ceil(struct device * dev,unsigned int * level)248 static inline struct dev_pm_opp *dev_pm_opp_find_level_ceil(struct device *dev,
249 					unsigned int *level)
250 {
251 	return ERR_PTR(-EOPNOTSUPP);
252 }
253 
dev_pm_opp_find_freq_floor(struct device * dev,unsigned long * freq)254 static inline struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev,
255 					unsigned long *freq)
256 {
257 	return ERR_PTR(-EOPNOTSUPP);
258 }
259 
dev_pm_opp_find_freq_ceil_by_volt(struct device * dev,unsigned long u_volt)260 static inline struct dev_pm_opp *dev_pm_opp_find_freq_ceil_by_volt(struct device *dev,
261 					unsigned long u_volt)
262 {
263 	return ERR_PTR(-EOPNOTSUPP);
264 }
265 
dev_pm_opp_find_freq_ceil(struct device * dev,unsigned long * freq)266 static inline struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev,
267 					unsigned long *freq)
268 {
269 	return ERR_PTR(-EOPNOTSUPP);
270 }
271 
dev_pm_opp_put(struct dev_pm_opp * opp)272 static inline void dev_pm_opp_put(struct dev_pm_opp *opp) {}
273 
dev_pm_opp_add(struct device * dev,unsigned long freq,unsigned long u_volt)274 static inline int dev_pm_opp_add(struct device *dev, unsigned long freq,
275 					unsigned long u_volt)
276 {
277 	return -EOPNOTSUPP;
278 }
279 
dev_pm_opp_remove(struct device * dev,unsigned long freq)280 static inline void dev_pm_opp_remove(struct device *dev, unsigned long freq)
281 {
282 }
283 
dev_pm_opp_remove_all_dynamic(struct device * dev)284 static inline void dev_pm_opp_remove_all_dynamic(struct device *dev)
285 {
286 }
287 
288 static inline int
dev_pm_opp_adjust_voltage(struct device * dev,unsigned long freq,unsigned long u_volt,unsigned long u_volt_min,unsigned long u_volt_max)289 dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq,
290 			  unsigned long u_volt, unsigned long u_volt_min,
291 			  unsigned long u_volt_max)
292 {
293 	return 0;
294 }
295 
dev_pm_opp_enable(struct device * dev,unsigned long freq)296 static inline int dev_pm_opp_enable(struct device *dev, unsigned long freq)
297 {
298 	return 0;
299 }
300 
dev_pm_opp_disable(struct device * dev,unsigned long freq)301 static inline int dev_pm_opp_disable(struct device *dev, unsigned long freq)
302 {
303 	return 0;
304 }
305 
dev_pm_opp_register_notifier(struct device * dev,struct notifier_block * nb)306 static inline int dev_pm_opp_register_notifier(struct device *dev, struct notifier_block *nb)
307 {
308 	return -EOPNOTSUPP;
309 }
310 
dev_pm_opp_unregister_notifier(struct device * dev,struct notifier_block * nb)311 static inline int dev_pm_opp_unregister_notifier(struct device *dev, struct notifier_block *nb)
312 {
313 	return -EOPNOTSUPP;
314 }
315 
dev_pm_opp_set_supported_hw(struct device * dev,const u32 * versions,unsigned int count)316 static inline struct opp_table *dev_pm_opp_set_supported_hw(struct device *dev,
317 							    const u32 *versions,
318 							    unsigned int count)
319 {
320 	return ERR_PTR(-EOPNOTSUPP);
321 }
322 
dev_pm_opp_put_supported_hw(struct opp_table * opp_table)323 static inline void dev_pm_opp_put_supported_hw(struct opp_table *opp_table) {}
324 
devm_pm_opp_set_supported_hw(struct device * dev,const u32 * versions,unsigned int count)325 static inline int devm_pm_opp_set_supported_hw(struct device *dev,
326 					       const u32 *versions,
327 					       unsigned int count)
328 {
329 	return -EOPNOTSUPP;
330 }
331 
dev_pm_opp_register_set_opp_helper(struct device * dev,int (* set_opp)(struct dev_pm_set_opp_data * data))332 static inline struct opp_table *dev_pm_opp_register_set_opp_helper(struct device *dev,
333 			int (*set_opp)(struct dev_pm_set_opp_data *data))
334 {
335 	return ERR_PTR(-EOPNOTSUPP);
336 }
337 
dev_pm_opp_unregister_set_opp_helper(struct opp_table * opp_table)338 static inline void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table) {}
339 
devm_pm_opp_register_set_opp_helper(struct device * dev,int (* set_opp)(struct dev_pm_set_opp_data * data))340 static inline int devm_pm_opp_register_set_opp_helper(struct device *dev,
341 				    int (*set_opp)(struct dev_pm_set_opp_data *data))
342 {
343 	return -EOPNOTSUPP;
344 }
345 
dev_pm_opp_set_prop_name(struct device * dev,const char * name)346 static inline struct opp_table *dev_pm_opp_set_prop_name(struct device *dev, const char *name)
347 {
348 	return ERR_PTR(-EOPNOTSUPP);
349 }
350 
dev_pm_opp_put_prop_name(struct opp_table * opp_table)351 static inline void dev_pm_opp_put_prop_name(struct opp_table *opp_table) {}
352 
dev_pm_opp_set_regulators(struct device * dev,const char * const names[],unsigned int count)353 static inline struct opp_table *dev_pm_opp_set_regulators(struct device *dev, const char * const names[], unsigned int count)
354 {
355 	return ERR_PTR(-EOPNOTSUPP);
356 }
357 
dev_pm_opp_put_regulators(struct opp_table * opp_table)358 static inline void dev_pm_opp_put_regulators(struct opp_table *opp_table) {}
359 
devm_pm_opp_set_regulators(struct device * dev,const char * const names[],unsigned int count)360 static inline int devm_pm_opp_set_regulators(struct device *dev,
361 					     const char * const names[],
362 					     unsigned int count)
363 {
364 	return -EOPNOTSUPP;
365 }
366 
dev_pm_opp_set_clkname(struct device * dev,const char * name)367 static inline struct opp_table *dev_pm_opp_set_clkname(struct device *dev, const char *name)
368 {
369 	return ERR_PTR(-EOPNOTSUPP);
370 }
371 
dev_pm_opp_put_clkname(struct opp_table * opp_table)372 static inline void dev_pm_opp_put_clkname(struct opp_table *opp_table) {}
373 
devm_pm_opp_set_clkname(struct device * dev,const char * name)374 static inline int devm_pm_opp_set_clkname(struct device *dev, const char *name)
375 {
376 	return -EOPNOTSUPP;
377 }
378 
dev_pm_opp_attach_genpd(struct device * dev,const char ** names,struct device *** virt_devs)379 static inline struct opp_table *dev_pm_opp_attach_genpd(struct device *dev, const char **names, struct device ***virt_devs)
380 {
381 	return ERR_PTR(-EOPNOTSUPP);
382 }
383 
dev_pm_opp_detach_genpd(struct opp_table * opp_table)384 static inline void dev_pm_opp_detach_genpd(struct opp_table *opp_table) {}
385 
devm_pm_opp_attach_genpd(struct device * dev,const char ** names,struct device *** virt_devs)386 static inline int devm_pm_opp_attach_genpd(struct device *dev,
387 					   const char **names,
388 					   struct device ***virt_devs)
389 {
390 	return -EOPNOTSUPP;
391 }
392 
dev_pm_opp_xlate_required_opp(struct opp_table * src_table,struct opp_table * dst_table,struct dev_pm_opp * src_opp)393 static inline struct dev_pm_opp *dev_pm_opp_xlate_required_opp(struct opp_table *src_table,
394 				struct opp_table *dst_table, struct dev_pm_opp *src_opp)
395 {
396 	return ERR_PTR(-EOPNOTSUPP);
397 }
398 
dev_pm_opp_xlate_performance_state(struct opp_table * src_table,struct opp_table * dst_table,unsigned int pstate)399 static inline int dev_pm_opp_xlate_performance_state(struct opp_table *src_table, struct opp_table *dst_table, unsigned int pstate)
400 {
401 	return -EOPNOTSUPP;
402 }
403 
dev_pm_opp_set_rate(struct device * dev,unsigned long target_freq)404 static inline int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq)
405 {
406 	return -EOPNOTSUPP;
407 }
408 
dev_pm_opp_set_opp(struct device * dev,struct dev_pm_opp * opp)409 static inline int dev_pm_opp_set_opp(struct device *dev, struct dev_pm_opp *opp)
410 {
411 	return -EOPNOTSUPP;
412 }
413 
dev_pm_opp_set_sharing_cpus(struct device * cpu_dev,const struct cpumask * cpumask)414 static inline int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, const struct cpumask *cpumask)
415 {
416 	return -EOPNOTSUPP;
417 }
418 
dev_pm_opp_get_sharing_cpus(struct device * cpu_dev,struct cpumask * cpumask)419 static inline int dev_pm_opp_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask)
420 {
421 	return -EINVAL;
422 }
423 
dev_pm_opp_remove_table(struct device * dev)424 static inline void dev_pm_opp_remove_table(struct device *dev)
425 {
426 }
427 
dev_pm_opp_cpumask_remove_table(const struct cpumask * cpumask)428 static inline void dev_pm_opp_cpumask_remove_table(const struct cpumask *cpumask)
429 {
430 }
431 
dev_pm_opp_sync_regulators(struct device * dev)432 static inline int dev_pm_opp_sync_regulators(struct device *dev)
433 {
434 	return -EOPNOTSUPP;
435 }
436 
437 #endif		/* CONFIG_PM_OPP */
438 
439 #if defined(CONFIG_PM_OPP) && defined(CONFIG_OF)
440 int dev_pm_opp_of_add_table(struct device *dev);
441 int dev_pm_opp_of_add_table_indexed(struct device *dev, int index);
442 int dev_pm_opp_of_add_table_noclk(struct device *dev, int index);
443 void dev_pm_opp_of_remove_table(struct device *dev);
444 int devm_pm_opp_of_add_table(struct device *dev);
445 int dev_pm_opp_of_cpumask_add_table(const struct cpumask *cpumask);
446 void dev_pm_opp_of_cpumask_remove_table(const struct cpumask *cpumask);
447 int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask);
448 struct device_node *dev_pm_opp_of_get_opp_desc_node(struct device *dev);
449 struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp);
450 int of_get_required_opp_performance_state(struct device_node *np, int index);
451 int dev_pm_opp_of_find_icc_paths(struct device *dev, struct opp_table *opp_table);
452 int dev_pm_opp_of_register_em(struct device *dev, struct cpumask *cpus);
dev_pm_opp_of_unregister_em(struct device * dev)453 static inline void dev_pm_opp_of_unregister_em(struct device *dev)
454 {
455 	em_dev_unregister_perf_domain(dev);
456 }
457 #else
dev_pm_opp_of_add_table(struct device * dev)458 static inline int dev_pm_opp_of_add_table(struct device *dev)
459 {
460 	return -EOPNOTSUPP;
461 }
462 
dev_pm_opp_of_add_table_indexed(struct device * dev,int index)463 static inline int dev_pm_opp_of_add_table_indexed(struct device *dev, int index)
464 {
465 	return -EOPNOTSUPP;
466 }
467 
dev_pm_opp_of_add_table_noclk(struct device * dev,int index)468 static inline int dev_pm_opp_of_add_table_noclk(struct device *dev, int index)
469 {
470 	return -EOPNOTSUPP;
471 }
472 
dev_pm_opp_of_remove_table(struct device * dev)473 static inline void dev_pm_opp_of_remove_table(struct device *dev)
474 {
475 }
476 
devm_pm_opp_of_add_table(struct device * dev)477 static inline int devm_pm_opp_of_add_table(struct device *dev)
478 {
479 	return -EOPNOTSUPP;
480 }
481 
dev_pm_opp_of_cpumask_add_table(const struct cpumask * cpumask)482 static inline int dev_pm_opp_of_cpumask_add_table(const struct cpumask *cpumask)
483 {
484 	return -EOPNOTSUPP;
485 }
486 
dev_pm_opp_of_cpumask_remove_table(const struct cpumask * cpumask)487 static inline void dev_pm_opp_of_cpumask_remove_table(const struct cpumask *cpumask)
488 {
489 }
490 
dev_pm_opp_of_get_sharing_cpus(struct device * cpu_dev,struct cpumask * cpumask)491 static inline int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpumask)
492 {
493 	return -EOPNOTSUPP;
494 }
495 
dev_pm_opp_of_get_opp_desc_node(struct device * dev)496 static inline struct device_node *dev_pm_opp_of_get_opp_desc_node(struct device *dev)
497 {
498 	return NULL;
499 }
500 
dev_pm_opp_get_of_node(struct dev_pm_opp * opp)501 static inline struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp)
502 {
503 	return NULL;
504 }
505 
dev_pm_opp_of_register_em(struct device * dev,struct cpumask * cpus)506 static inline int dev_pm_opp_of_register_em(struct device *dev,
507 					    struct cpumask *cpus)
508 {
509 	return -EOPNOTSUPP;
510 }
511 
dev_pm_opp_of_unregister_em(struct device * dev)512 static inline void dev_pm_opp_of_unregister_em(struct device *dev)
513 {
514 }
515 
of_get_required_opp_performance_state(struct device_node * np,int index)516 static inline int of_get_required_opp_performance_state(struct device_node *np, int index)
517 {
518 	return -EOPNOTSUPP;
519 }
520 
dev_pm_opp_of_find_icc_paths(struct device * dev,struct opp_table * opp_table)521 static inline int dev_pm_opp_of_find_icc_paths(struct device *dev, struct opp_table *opp_table)
522 {
523 	return -EOPNOTSUPP;
524 }
525 #endif
526 
527 #endif		/* __LINUX_OPP_H__ */
528