Lines Matching defs:state

28  * Cooling state <-> CPUFreq frequency
33 * Highest cooling state corresponds to lowest possible frequency.
56 * @cpufreq_state: integer value representing the current state of cpufreq
252 * cpufreq_state2power() - convert a cpu cdev state to power consumed
254 * @state: cooling device state to be converted
257 * Convert cooling device state @state into power consumption in
261 * Return: 0 on success, -EINVAL if the cooling device state could not
266 unsigned long state, u32 *power)
271 /* Request state should be less than max_level */
272 if (state > cpufreq_cdev->max_level)
277 idx = cpufreq_cdev->max_level - state;
285 * cpufreq_power2state() - convert power to a cooling device state
288 * @state: pointer in which to store the resulting state
290 * Calculate a cooling device state for the cpus described by @cdev
292 * @state. Note that this calculation depends on external factors
298 * the calculated frequency could not be converted to a valid state.
304 u32 power, unsigned long *state)
315 *state = get_level(cpufreq_cdev, target_freq);
316 trace_thermal_power_cpu_limit(policy->related_cpus, target_freq, *state,
350 unsigned long state)
358 idx = cpufreq_cdev->max_level - state;
366 idx = cpufreq_cdev->max_level - state;
368 idx = state;
376 * cpufreq_get_max_state - callback function to get the max cooling state.
378 * @state: fill this variable with the max cooling state.
381 * max cooling state.
386 unsigned long *state)
390 *state = cpufreq_cdev->max_level;
395 * cpufreq_get_cur_state - callback function to get the current cooling state.
397 * @state: fill this variable with the current cooling state.
400 * current cooling state.
405 unsigned long *state)
409 *state = cpufreq_cdev->cpufreq_state;
415 * cpufreq_set_cur_state - callback function to set the current cooling state.
417 * @state: set this variable to the current cooling state.
420 * current cooling state.
425 unsigned long state)
433 /* Request state should be less than max_level */
434 if (state > cpufreq_cdev->max_level)
438 if (cpufreq_cdev->cpufreq_state == state)
441 frequency = get_state_freq(cpufreq_cdev, state);
445 cpufreq_cdev->cpufreq_state = state;