Amit Daniel Kachhap | 0236141 | 2012-08-16 17:11:40 +0530 | [diff] [blame] | 1 | CPU cooling APIs How To |
| 2 | =================================== |
| 3 | |
| 4 | Written by Amit Daniel Kachhap <amit.kachhap@linaro.org> |
| 5 | |
Javi Merino | 9477e18 | 2015-01-06 18:14:25 +0000 | [diff] [blame] | 6 | Updated: 6 Jan 2015 |
Amit Daniel Kachhap | 0236141 | 2012-08-16 17:11:40 +0530 | [diff] [blame] | 7 | |
| 8 | Copyright (c) 2012 Samsung Electronics Co., Ltd(http://www.samsung.com) |
| 9 | |
| 10 | 0. Introduction |
| 11 | |
| 12 | The generic cpu cooling(freq clipping) provides registration/unregistration APIs |
| 13 | to the caller. The binding of the cooling devices to the trip point is left for |
| 14 | the user. The registration APIs returns the cooling device pointer. |
| 15 | |
| 16 | 1. cpu cooling APIs |
| 17 | |
| 18 | 1.1 cpufreq registration/unregistration APIs |
| 19 | 1.1.1 struct thermal_cooling_device *cpufreq_cooling_register( |
| 20 | struct cpumask *clip_cpus) |
| 21 | |
| 22 | This interface function registers the cpufreq cooling device with the name |
| 23 | "thermal-cpufreq-%x". This api can support multiple instances of cpufreq |
| 24 | cooling devices. |
| 25 | |
| 26 | clip_cpus: cpumask of cpus where the frequency constraints will happen. |
| 27 | |
Javi Merino | 9477e18 | 2015-01-06 18:14:25 +0000 | [diff] [blame] | 28 | 1.1.2 struct thermal_cooling_device *of_cpufreq_cooling_register( |
| 29 | struct device_node *np, const struct cpumask *clip_cpus) |
| 30 | |
| 31 | This interface function registers the cpufreq cooling device with |
| 32 | the name "thermal-cpufreq-%x" linking it with a device tree node, in |
| 33 | order to bind it via the thermal DT code. This api can support multiple |
| 34 | instances of cpufreq cooling devices. |
| 35 | |
| 36 | np: pointer to the cooling device device tree node |
| 37 | clip_cpus: cpumask of cpus where the frequency constraints will happen. |
| 38 | |
| 39 | 1.1.3 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) |
Amit Daniel Kachhap | 0236141 | 2012-08-16 17:11:40 +0530 | [diff] [blame] | 40 | |
| 41 | This interface function unregisters the "thermal-cpufreq-%x" cooling device. |
| 42 | |
| 43 | cdev: Cooling device pointer which has to be unregistered. |