mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Merge branches 'fixes-for-37', 'ec' and 'thermal' into release
This commit is contained in:
commit
d1d4a81b84
22 changed files with 2202 additions and 733 deletions
32
Documentation/thermal/cpu-cooling-api.txt
Normal file
32
Documentation/thermal/cpu-cooling-api.txt
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
CPU cooling APIs How To
|
||||
===================================
|
||||
|
||||
Written by Amit Daniel Kachhap <[email protected]>
|
||||
|
||||
Updated: 12 May 2012
|
||||
|
||||
Copyright (c) 2012 Samsung Electronics Co., Ltd(http://www.samsung.com)
|
||||
|
||||
0. Introduction
|
||||
|
||||
The generic cpu cooling(freq clipping) provides registration/unregistration APIs
|
||||
to the caller. The binding of the cooling devices to the trip point is left for
|
||||
the user. The registration APIs returns the cooling device pointer.
|
||||
|
||||
1. cpu cooling APIs
|
||||
|
||||
1.1 cpufreq registration/unregistration APIs
|
||||
1.1.1 struct thermal_cooling_device *cpufreq_cooling_register(
|
||||
struct cpumask *clip_cpus)
|
||||
|
||||
This interface function registers the cpufreq cooling device with the name
|
||||
"thermal-cpufreq-%x". This api can support multiple instances of cpufreq
|
||||
cooling devices.
|
||||
|
||||
clip_cpus: cpumask of cpus where the frequency constraints will happen.
|
||||
|
||||
1.1.2 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
|
||||
|
||||
This interface function unregisters the "thermal-cpufreq-%x" cooling device.
|
||||
|
||||
cdev: Cooling device pointer which has to be unregistered.
|
||||
|
|
@ -46,36 +46,7 @@ The threshold levels are defined as follows:
|
|||
The threshold and each trigger_level are set
|
||||
through the corresponding registers.
|
||||
|
||||
When an interrupt occurs, this driver notify user space of
|
||||
one of four threshold levels for the interrupt
|
||||
through kobject_uevent_env and sysfs_notify functions.
|
||||
When an interrupt occurs, this driver notify kernel thermal framework
|
||||
with the function exynos4_report_trigger.
|
||||
Although an interrupt condition for level_0 can be set,
|
||||
it is not notified to user space through sysfs_notify function.
|
||||
|
||||
Sysfs Interface
|
||||
---------------
|
||||
name name of the temperature sensor
|
||||
RO
|
||||
|
||||
temp1_input temperature
|
||||
RO
|
||||
|
||||
temp1_max temperature for level_1 interrupt
|
||||
RO
|
||||
|
||||
temp1_crit temperature for level_2 interrupt
|
||||
RO
|
||||
|
||||
temp1_emergency temperature for level_3 interrupt
|
||||
RO
|
||||
|
||||
temp1_max_alarm alarm for level_1 interrupt
|
||||
RO
|
||||
|
||||
temp1_crit_alarm
|
||||
alarm for level_2 interrupt
|
||||
RO
|
||||
|
||||
temp1_emergency_alarm
|
||||
alarm for level_3 interrupt
|
||||
RO
|
||||
it can be used to synchronize the cooling action.
|
||||
|
|
@ -84,7 +84,8 @@ temperature) and throttle appropriate devices.
|
|||
|
||||
1.3 interface for binding a thermal zone device with a thermal cooling device
|
||||
1.3.1 int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
|
||||
int trip, struct thermal_cooling_device *cdev);
|
||||
int trip, struct thermal_cooling_device *cdev,
|
||||
unsigned long upper, unsigned long lower);
|
||||
|
||||
This interface function bind a thermal cooling device to the certain trip
|
||||
point of a thermal zone device.
|
||||
|
|
@ -93,6 +94,12 @@ temperature) and throttle appropriate devices.
|
|||
cdev: thermal cooling device
|
||||
trip: indicates which trip point the cooling devices is associated with
|
||||
in this thermal zone.
|
||||
upper:the Maximum cooling state for this trip point.
|
||||
THERMAL_NO_LIMIT means no upper limit,
|
||||
and the cooling device can be in max_state.
|
||||
lower:the Minimum cooling state can be used for this trip point.
|
||||
THERMAL_NO_LIMIT means no lower limit,
|
||||
and the cooling device can be in cooling state 0.
|
||||
|
||||
1.3.2 int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz,
|
||||
int trip, struct thermal_cooling_device *cdev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue