Lines Matching full:devfreq
3 * devfreq: Generic Dynamic Voltage and Frequency Scaling (DVFS) Framework
18 /* DEVFREQ governor name */
25 /* DEVFREQ notifier interface */
32 /* DEVFREQ work timers */
39 struct devfreq;
44 * struct devfreq_dev_status - Data given from devfreq user device to
52 * @private_data: An entry not specified by the devfreq framework.
75 * struct devfreq_dev_profile - Devfreq's user device profile
88 * status to devfreq. Governors are recommended not to
91 * devfreq.last_status.
94 * @exit: An optional callback that is called when devfreq
95 * is removing the devfreq object due to error or
97 * has registered devfreq->nb at a notifier-head,
123 * struct devfreq_stats - Statistics of devfreq device behavior
124 * @total_trans: Number of devfreq transitions.
125 * @trans_table: Statistics of devfreq transitions.
126 * @time_in_state: Statistics of devfreq states.
137 * struct devfreq - Device devfreq structure
138 * @node: list node - contains the devices with devfreq that have been
140 * @lock: a mutex to protect accessing devfreq.
141 * @dev: device registered by devfreq class. dev.parent is the device
142 * using devfreq.
143 * @profile: device-specific devfreq profile
146 * @nb: notifier block used to notify devfreq object that it should
147 * reevaluate operable frequencies. Devfreq users may use
148 * devfreq.nb to the corresponding register notifier call chain.
151 * @last_status: devfreq user device info, performance statistics
152 * @data: Private data of the governor. The devfreq framework does not
158 * @stop_polling: devfreq polling status of a device.
162 * @stats: Statistics of devfreq device behavior
164 * @cdev: Cooling device pointer if the devfreq has cooling property
168 * This structure stores the devfreq information for a given device.
170 * Note that when a governor accesses entries in struct devfreq in its
173 * struct mutex lock in struct devfreq. A governor may use this mutex
176 struct devfreq { struct
220 struct devfreq *devfreq_add_device(struct device *dev, argument
224 int devfreq_remove_device(struct devfreq *devfreq);
225 struct devfreq *devm_devfreq_add_device(struct device *dev,
229 void devm_devfreq_remove_device(struct device *dev, struct devfreq *devfreq);
232 int devfreq_suspend_device(struct devfreq *devfreq);
233 int devfreq_resume_device(struct devfreq *devfreq);
239 int update_devfreq(struct devfreq *devfreq);
241 /* Helper functions for devfreq user device driver with OPP. */
245 struct devfreq *devfreq);
247 struct devfreq *devfreq);
249 struct devfreq *devfreq);
251 struct devfreq *devfreq);
252 int devfreq_register_notifier(struct devfreq *devfreq,
255 int devfreq_unregister_notifier(struct devfreq *devfreq,
259 struct devfreq *devfreq,
263 struct devfreq *devfreq,
266 struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node);
267 struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev,
272 * struct devfreq_simple_ondemand_data - ``void *data`` fed to struct devfreq
292 * struct devfreq_passive_data - ``void *data`` fed to struct devfreq
294 * @parent: the devfreq instance of parent device.
298 * by using the new frequency of parent devfreq device
300 * If the devfreq device has the specific method to decide
302 * @this: the devfreq instance of own device.
305 * The devfreq_passive_data have to set the devfreq instance of parent
307 * initialize the 'this' and 'nb' field because the devfreq core will handle
311 /* Should set the devfreq instance of parent device */
312 struct devfreq *parent;
315 int (*get_target_freq)(struct devfreq *this, unsigned long *freq);
318 struct devfreq *this;
324 static inline struct devfreq *devfreq_add_device(struct device *dev, in devfreq_add_device()
332 static inline int devfreq_remove_device(struct devfreq *devfreq) in devfreq_remove_device() argument
337 static inline struct devfreq *devm_devfreq_add_device(struct device *dev, in devm_devfreq_add_device()
346 struct devfreq *devfreq) in devm_devfreq_remove_device() argument
350 static inline int devfreq_suspend_device(struct devfreq *devfreq) in devfreq_suspend_device() argument
355 static inline int devfreq_resume_device(struct devfreq *devfreq) in devfreq_resume_device() argument
370 struct devfreq *devfreq) in devfreq_register_opp_notifier() argument
376 struct devfreq *devfreq) in devfreq_unregister_opp_notifier() argument
382 struct devfreq *devfreq) in devm_devfreq_register_opp_notifier() argument
388 struct devfreq *devfreq) in devm_devfreq_unregister_opp_notifier() argument
392 static inline int devfreq_register_notifier(struct devfreq *devfreq, in devfreq_register_notifier() argument
399 static inline int devfreq_unregister_notifier(struct devfreq *devfreq, in devfreq_unregister_notifier() argument
407 struct devfreq *devfreq, in devm_devfreq_register_notifier() argument
415 struct devfreq *devfreq, in devm_devfreq_unregister_notifier() argument
421 static inline struct devfreq *devfreq_get_devfreq_by_node(struct device_node *node) in devfreq_get_devfreq_by_node()
426 static inline struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, in devfreq_get_devfreq_by_phandle()
432 static inline int devfreq_update_stats(struct devfreq *df) in devfreq_update_stats()