Lines Matching +full:devfreq +full:- +full:event
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * governor.h - internal header for devfreq governors.
8 * This header is for devfreq governors in drivers/devfreq/
14 #include <linux/devfreq.h>
18 #define to_devfreq(DEV) container_of((DEV), struct devfreq, dev)
20 /* Devfreq events */
32 * - DEVFREQ_GOV_FLAG_IMMUTABLE
34 * - DEVFREQ_GOV_FLAG_IRQ_DRIVEN
35 * : The devfreq won't schedule the work for this governor.
42 * - DEVFREQ_GOV_ATTR_POLLING_INTERVAL
44 * - DEVFREQ_GOV_ATTR_TIMER
51 * struct devfreq_cpu_data - Hold the per-cpu data
61 * This is auto-populated by the governor.
76 * struct devfreq_governor - Devfreq policy governor
77 * @node: list node - contains registered devfreq governors
85 * @event_handler: Callback for devfreq core framework to notify events
87 * init and exit, opp changes out of devfreq, suspend
88 * and resume of per device devfreq during device idle.
90 * Note that the callbacks are called with devfreq->lock locked by devfreq.
98 int (*get_target_freq)(struct devfreq *this, unsigned long *freq);
99 int (*event_handler)(struct devfreq *devfreq,
100 unsigned int event, void *data);
103 void devfreq_monitor_start(struct devfreq *devfreq);
104 void devfreq_monitor_stop(struct devfreq *devfreq);
105 void devfreq_monitor_suspend(struct devfreq *devfreq);
106 void devfreq_monitor_resume(struct devfreq *devfreq);
107 void devfreq_update_interval(struct devfreq *devfreq, unsigned int *delay);
115 int devfreq_update_status(struct devfreq *devfreq, unsigned long freq);
116 int devfreq_update_target(struct devfreq *devfreq, unsigned long freq);
117 void devfreq_get_freq_range(struct devfreq *devfreq, unsigned long *min_freq,
120 static inline int devfreq_update_stats(struct devfreq *df) in devfreq_update_stats()
122 if (!df->profile->get_dev_status) in devfreq_update_stats()
123 return -EINVAL; in devfreq_update_stats()
125 return df->profile->get_dev_status(df->dev.parent, &df->last_status); in devfreq_update_stats()