diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-11 10:04:17 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-11 10:04:17 -0400 |
| commit | 5fd41f2a10b38ab84b4c2436140ce490d34291fa (patch) | |
| tree | 0c5e39f8c0ca03004db863cf05e5b20873c0cb48 /include/linux | |
| parent | 2213d7c29a434626a15ffb285182cd19ed0b722d (diff) | |
| parent | 47d104ba5879790c7c91c3390b0b08399e168efe (diff) | |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Pull thermal updates from Zhang Rui:
"Specifics:
- adds full support for 2 types of Thermal Controllers produced by
STMicroelectronics. One is a more traditional memory mapped
variant, the other is controlled solely by system configuration
registers. From Lee Jones.
- add TMU (Thermal Management Unit) support for Exynos3250 Soc.
From Chanwoo Choi.
- add critical and passive trip point support for int3403 thermal
driver. From Srinivas Pandruvada.
- a couple of small fixes/cleanups from Javi Merino, and Geert
Uytterhoeven"
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
thermal: document struct thermal_zone_device and thermal_governor
thermal: cpu_cooling: fix typo highjack -> hijack
thermal: rcar: Document SoC-specific bindings
thermal: samsung: Add TMU support for Exynos3250 SoC
thermal: exynos: fix ordering in exynos_tmu_remove()
thermal: allow building dove_thermal with mvebu
thermal: sti: Add support for ST's Memory Mapped based Thermal controller
thermal: sti: Add support for ST's System Config Register based Thermal controller
thermal: sti: Introduce ST Thermal core code
thermal: sti: Supply Device Tree documentation
Thermal: int3403: Add CRT and PSV trip
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/thermal.h | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index f7e11c7ea7d9..0305cde21a74 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
| @@ -158,6 +158,42 @@ struct thermal_attr { | |||
| 158 | char name[THERMAL_NAME_LENGTH]; | 158 | char name[THERMAL_NAME_LENGTH]; |
| 159 | }; | 159 | }; |
| 160 | 160 | ||
| 161 | /** | ||
| 162 | * struct thermal_zone_device - structure for a thermal zone | ||
| 163 | * @id: unique id number for each thermal zone | ||
| 164 | * @type: the thermal zone device type | ||
| 165 | * @device: &struct device for this thermal zone | ||
| 166 | * @trip_temp_attrs: attributes for trip points for sysfs: trip temperature | ||
| 167 | * @trip_type_attrs: attributes for trip points for sysfs: trip type | ||
| 168 | * @trip_hyst_attrs: attributes for trip points for sysfs: trip hysteresis | ||
| 169 | * @devdata: private pointer for device private data | ||
| 170 | * @trips: number of trip points the thermal zone supports | ||
| 171 | * @passive_delay: number of milliseconds to wait between polls when | ||
| 172 | * performing passive cooling. Currenty only used by the | ||
| 173 | * step-wise governor | ||
| 174 | * @polling_delay: number of milliseconds to wait between polls when | ||
| 175 | * checking whether trip points have been crossed (0 for | ||
| 176 | * interrupt driven systems) | ||
| 177 | * @temperature: current temperature. This is only for core code, | ||
| 178 | * drivers should use thermal_zone_get_temp() to get the | ||
| 179 | * current temperature | ||
| 180 | * @last_temperature: previous temperature read | ||
| 181 | * @emul_temperature: emulated temperature when using CONFIG_THERMAL_EMULATION | ||
| 182 | * @passive: 1 if you've crossed a passive trip point, 0 otherwise. | ||
| 183 | * Currenty only used by the step-wise governor. | ||
| 184 | * @forced_passive: If > 0, temperature at which to switch on all ACPI | ||
| 185 | * processor cooling devices. Currently only used by the | ||
| 186 | * step-wise governor. | ||
| 187 | * @ops: operations this &thermal_zone_device supports | ||
| 188 | * @tzp: thermal zone parameters | ||
| 189 | * @governor: pointer to the governor for this thermal zone | ||
| 190 | * @thermal_instances: list of &struct thermal_instance of this thermal zone | ||
| 191 | * @idr: &struct idr to generate unique id for this zone's cooling | ||
| 192 | * devices | ||
| 193 | * @lock: lock to protect thermal_instances list | ||
| 194 | * @node: node in thermal_tz_list (in thermal_core.c) | ||
| 195 | * @poll_queue: delayed work for polling | ||
| 196 | */ | ||
| 161 | struct thermal_zone_device { | 197 | struct thermal_zone_device { |
| 162 | int id; | 198 | int id; |
| 163 | char type[THERMAL_NAME_LENGTH]; | 199 | char type[THERMAL_NAME_LENGTH]; |
| @@ -179,12 +215,18 @@ struct thermal_zone_device { | |||
| 179 | struct thermal_governor *governor; | 215 | struct thermal_governor *governor; |
| 180 | struct list_head thermal_instances; | 216 | struct list_head thermal_instances; |
| 181 | struct idr idr; | 217 | struct idr idr; |
| 182 | struct mutex lock; /* protect thermal_instances list */ | 218 | struct mutex lock; |
| 183 | struct list_head node; | 219 | struct list_head node; |
| 184 | struct delayed_work poll_queue; | 220 | struct delayed_work poll_queue; |
| 185 | }; | 221 | }; |
| 186 | 222 | ||
| 187 | /* Structure that holds thermal governor information */ | 223 | /** |
| 224 | * struct thermal_governor - structure that holds thermal governor information | ||
| 225 | * @name: name of the governor | ||
| 226 | * @throttle: callback called for every trip point even if temperature is | ||
| 227 | * below the trip point temperature | ||
| 228 | * @governor_list: node in thermal_governor_list (in thermal_core.c) | ||
| 229 | */ | ||
| 188 | struct thermal_governor { | 230 | struct thermal_governor { |
| 189 | char name[THERMAL_NAME_LENGTH]; | 231 | char name[THERMAL_NAME_LENGTH]; |
| 190 | int (*throttle)(struct thermal_zone_device *tz, int trip); | 232 | int (*throttle)(struct thermal_zone_device *tz, int trip); |
