• Home
  • Raw
  • Download

Lines Matching +full:zero +full:- +full:based

1 // SPDX-License-Identifier: GPL-2.0
20 * struct cpuidle_cooling_device - data for the idle cooling device
32 * cpuidle_cooling_runtime - Running time computation
34 * @state: a percentile based number
38 * means the running duration is zero. If we have a 50% ratio
44 * running = idle x ((100 / ratio) - 1)
48 * running = (idle x 100) / ratio - idle
53 * Return: An unsigned int for a usec based runtime duration.
61 return ((idle_duration_us * 100) / state) - idle_duration_us; in cpuidle_cooling_runtime()
65 * cpuidle_cooling_get_max_state - Get the maximum state
70 * percentile based for consistency accross different platforms.
72 * Return: The function can not fail, it is always zero
94 * cpuidle_cooling_get_cur_state - Get the current cooling state
99 * cooling device structure, the mapping is 1 <-> 1.
101 * Return: The function can not fail, it is always zero
106 struct cpuidle_cooling_device *idle_cdev = cdev->devdata; in cpuidle_cooling_get_cur_state()
108 *state = idle_cdev->state; in cpuidle_cooling_get_cur_state()
114 * cpuidle_cooling_set_cur_state - Set the current cooling state
123 * Return: The function can not fail, it is always zero
128 struct cpuidle_cooling_device *idle_cdev = cdev->devdata; in cpuidle_cooling_set_cur_state()
129 struct idle_inject_device *ii_dev = idle_cdev->ii_dev; in cpuidle_cooling_set_cur_state()
130 unsigned long current_state = idle_cdev->state; in cpuidle_cooling_set_cur_state()
133 idle_cdev->state = state; in cpuidle_cooling_set_cur_state()
151 * cpuidle_cooling_ops - thermal cooling device ops
168 * Return: zero on success, a negative value returned by one of the
184 ret = -ENOMEM; in __cpuidle_cooling_register()
194 ii_dev = idle_inject_register(drv->cpumask); in __cpuidle_cooling_register()
196 ret = -EINVAL; in __cpuidle_cooling_register()
200 of_property_read_u32(np, "duration-us", &idle_duration_us); in __cpuidle_cooling_register()
201 of_property_read_u32(np, "exit-latency-us", &latency_us); in __cpuidle_cooling_register()
206 idle_cdev->ii_dev = ii_dev; in __cpuidle_cooling_register()
208 snprintf(dev_name, sizeof(dev_name), "thermal-idle-%d", id); in __cpuidle_cooling_register()
233 * cpuidle_cooling_register - Idle cooling device initialization function
239 * Return: zero on success, or negative value corresponding to the
248 for_each_cpu(cpu, drv->cpumask) { in cpuidle_cooling_register()
252 cooling_node = of_get_child_by_name(cpu_node, "thermal-idle"); in cpuidle_cooling_register()
257 pr_debug("'thermal-idle' node not found for cpu%d\n", cpu); in cpuidle_cooling_register()