Lines Matching defs:devfreq

3  * linux/drivers/devfreq/governor_passive.c
12 #include <linux/devfreq.h>
15 static int devfreq_passive_get_target_freq(struct devfreq *devfreq,
19 = (struct devfreq_passive_data *)devfreq->data;
20 struct devfreq *parent_devfreq = (struct devfreq *)p_data->parent;
26 * If the devfreq device with passive governor has the specific method
31 ret = p_data->get_target_freq(devfreq, freq);
36 * If the parent and passive devfreq device uses the OPP table,
41 * - parent devfreq device uses the governors except for passive.
42 * - passive devfreq device uses the passive governor.
44 * Each devfreq has the OPP table. After deciding the new frequency
45 * from the governor of parent devfreq device, the passive governor
48 * new frequency for passive devfreq device.
50 if (!devfreq->profile || !devfreq->profile->freq_table
51 || devfreq->profile->max_state <= 0)
81 if (i < devfreq->profile->max_state) {
82 child_freq = devfreq->profile->freq_table[i];
84 count = devfreq->profile->max_state;
85 child_freq = devfreq->profile->freq_table[count - 1];
95 static int update_devfreq_passive(struct devfreq *devfreq, unsigned long freq)
99 if (!devfreq->governor)
102 mutex_lock_nested(&devfreq->lock, SINGLE_DEPTH_NESTING);
104 ret = devfreq->governor->get_target_freq(devfreq, &freq);
108 ret = devfreq->profile->target(devfreq->dev.parent, &freq, 0);
112 if (devfreq->profile->freq_table
113 && (devfreq_update_status(devfreq, freq)))
114 dev_err(&devfreq->dev,
117 devfreq->previous_freq = freq;
120 mutex_unlock(&devfreq->lock);
130 struct devfreq *devfreq = (struct devfreq *)data->this;
131 struct devfreq *parent = (struct devfreq *)data->parent;
138 update_devfreq_passive(devfreq, freq);
142 update_devfreq_passive(devfreq, freq);
149 static int devfreq_passive_event_handler(struct devfreq *devfreq,
153 = (struct devfreq_passive_data *)devfreq->data;
154 struct devfreq *parent = (struct devfreq *)p_data->parent;
164 p_data->this = devfreq;