Commit 8eaa8d6c authored by Zhang Rui's avatar Zhang Rui Committed by Len Brown

Thermal: Documentation update

With commit 6503e5df,
the value of /sys/class/thermal/thermal_zoneX/mode has been changed
from user/kernel to enabled/disabled.
Update the documentation so that users won't be confused.
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 27365a6c
...@@ -47,11 +47,11 @@ temperature) and throttle appropriate devices. ...@@ -47,11 +47,11 @@ temperature) and throttle appropriate devices.
.bind: bind the thermal zone device with a thermal cooling device. .bind: bind the thermal zone device with a thermal cooling device.
.unbind: unbind the thermal zone device with a thermal cooling device. .unbind: unbind the thermal zone device with a thermal cooling device.
.get_temp: get the current temperature of the thermal zone. .get_temp: get the current temperature of the thermal zone.
.get_mode: get the current mode (user/kernel) of the thermal zone. .get_mode: get the current mode (enabled/disabled) of the thermal zone.
- "kernel" means thermal management is done in kernel. - "enabled" means the kernel thermal management is enabled.
- "user" will prevent kernel thermal driver actions upon trip points - "disabled" will prevent kernel thermal driver action upon trip points
so that user applications can take charge of thermal management. so that user applications can take charge of thermal management.
.set_mode: set the mode (user/kernel) of the thermal zone. .set_mode: set the mode (enabled/disabled) of the thermal zone.
.get_trip_type: get the type of certain trip point. .get_trip_type: get the type of certain trip point.
.get_trip_temp: get the temperature above which the certain trip point .get_trip_temp: get the temperature above which the certain trip point
will be fired. will be fired.
...@@ -170,14 +170,14 @@ temp ...@@ -170,14 +170,14 @@ temp
RO, Required RO, Required
mode mode
One of the predefined values in [kernel, user]. One of the predefined values in [enabled, disabled].
This file gives information about the algorithm that is currently This file gives information about the algorithm that is currently
managing the thermal zone. It can be either default kernel based managing the thermal zone. It can be either default kernel based
algorithm or user space application. algorithm or user space application.
kernel = Thermal management in kernel thermal zone driver. enabled = enable Kernel Thermal management.
user = Preventing kernel thermal zone driver actions upon disabled = Preventing kernel thermal zone driver actions upon
trip points so that user application can take full trip points so that user application can take full
charge of the thermal management. charge of the thermal management.
RW, Optional RW, Optional
trip_point_[0-*]_temp trip_point_[0-*]_temp
...@@ -256,7 +256,7 @@ method, the sys I/F structure will be built like this: ...@@ -256,7 +256,7 @@ method, the sys I/F structure will be built like this:
|thermal_zone1: |thermal_zone1:
|---type: acpitz |---type: acpitz
|---temp: 37000 |---temp: 37000
|---mode: kernel |---mode: enabled
|---trip_point_0_temp: 100000 |---trip_point_0_temp: 100000
|---trip_point_0_type: critical |---trip_point_0_type: critical
|---trip_point_1_temp: 80000 |---trip_point_1_temp: 80000
......
...@@ -550,8 +550,6 @@ static int thermal_get_temp(struct thermal_zone_device *thermal, ...@@ -550,8 +550,6 @@ static int thermal_get_temp(struct thermal_zone_device *thermal,
return 0; return 0;
} }
static const char enabled[] = "kernel";
static const char disabled[] = "user";
static int thermal_get_mode(struct thermal_zone_device *thermal, static int thermal_get_mode(struct thermal_zone_device *thermal,
enum thermal_device_mode *mode) enum thermal_device_mode *mode)
{ {
...@@ -588,8 +586,8 @@ static int thermal_set_mode(struct thermal_zone_device *thermal, ...@@ -588,8 +586,8 @@ static int thermal_set_mode(struct thermal_zone_device *thermal,
if (enable != tz->tz_enabled) { if (enable != tz->tz_enabled) {
tz->tz_enabled = enable; tz->tz_enabled = enable;
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"%s ACPI thermal control\n", "%s kernel ACPI thermal control\n",
tz->tz_enabled ? enabled : disabled)); tz->tz_enabled ? "Enable" : "Disable"));
acpi_thermal_check(tz); acpi_thermal_check(tz);
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment