1 CPU cooling APIs How To
2 ===================================
4 Written by Amit Daniel Kachhap <amit.kachhap@linaro.org>
8 Copyright (c) 2012 Samsung Electronics Co., Ltd(http://www.samsung.com)
12 The generic cpu cooling(freq clipping, cpuhotplug etc) provides
13 registration/unregistration APIs to the caller. The binding of the cooling
14 devices to the trip point is left for the user. The registration APIs returns
15 the cooling device pointer.
19 1.1 cpufreq registration/unregistration APIs
20 1.1.1 struct thermal_cooling_device *cpufreq_cooling_register(
21 struct freq_clip_table *tab_ptr, unsigned int tab_size)
23 This interface function registers the cpufreq cooling device with the name
24 "thermal-cpufreq-%x". This api can support multiple instances of cpufreq
27 tab_ptr: The table containing the maximum value of frequency to be clipped
28 for each cooling state.
29 .freq_clip_max: Value of frequency to be clipped for each allowed
31 .temp_level: Temperature level at which the frequency clamping will
33 .mask_val: cpumask of the allowed cpu's
34 tab_size: the total number of cpufreq cooling states.
36 1.1.2 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
38 This interface function unregisters the "thermal-cpufreq-%x" cooling device.
40 cdev: Cooling device pointer which has to be unregistered.
43 1.2 CPU cooling action notifier register/unregister interface
44 1.2.1 int cputherm_register_notifier(struct notifier_block *nb,
47 This interface registers a driver with cpu cooling layer. The driver will
48 be notified when any cpu cooling action is called.
50 nb: notifier function to register
51 list: CPUFREQ_COOLING_START or CPUFREQ_COOLING_STOP
53 1.2.2 int cputherm_unregister_notifier(struct notifier_block *nb,
56 This interface registers a driver with cpu cooling layer. The driver will
57 be notified when any cpu cooling action is called.
59 nb: notifier function to register
60 list: CPUFREQ_COOLING_START or CPUFREQ_COOLING_STOP