Lines Matching defs:state
29 * Cooling state <-> CPUFreq frequency
34 * Highest cooling state corresponds to lowest possible frequency.
55 * @cpufreq_state: integer value representing the current state of cpufreq
250 * cpufreq_state2power() - convert a cpu cdev state to power consumed
252 * @state: cooling device state to be converted
255 * Convert cooling device state @state into power consumption in
259 * Return: 0 on success, -EINVAL if the cooling device state is bigger
263 unsigned long state, u32 *power)
268 /* Request state should be less than max_level */
269 if (state > cpufreq_cdev->max_level)
274 idx = cpufreq_cdev->max_level - state;
282 * cpufreq_power2state() - convert power to a cooling device state
285 * @state: pointer in which to store the resulting state
287 * Calculate a cooling device state for the cpus described by @cdev
289 * @state. Note that this calculation depends on external factors
297 u32 power, unsigned long *state)
308 *state = get_level(cpufreq_cdev, target_freq);
309 trace_thermal_power_cpu_limit(policy->related_cpus, target_freq, *state,
373 unsigned long state)
381 idx = cpufreq_cdev->max_level - state;
389 idx = cpufreq_cdev->max_level - state;
391 idx = state;
399 * cpufreq_get_max_state - callback function to get the max cooling state.
401 * @state: fill this variable with the max cooling state.
404 * max cooling state.
409 unsigned long *state)
413 *state = cpufreq_cdev->max_level;
418 * cpufreq_get_cur_state - callback function to get the current cooling state.
420 * @state: fill this variable with the current cooling state.
423 * current cooling state.
428 unsigned long *state)
432 *state = cpufreq_cdev->cpufreq_state;
438 * cpufreq_set_cur_state - callback function to set the current cooling state.
440 * @state: set this variable to the current cooling state.
443 * current cooling state.
448 unsigned long state)
455 /* Request state should be less than max_level */
456 if (state > cpufreq_cdev->max_level)
460 if (cpufreq_cdev->cpufreq_state == state)
463 frequency = get_state_freq(cpufreq_cdev, state);
467 cpufreq_cdev->cpufreq_state = state;