From c56f5c0342dfee11a1a13d2f5bb7618de5b17590 Mon Sep 17 00:00:00 2001 From: Durgadoss R Date: Wed, 25 Jul 2012 10:10:58 +0800 Subject: Thermal: Make Thermal trip points writeable Some of the thermal drivers using the Generic Thermal Framework require (all/some) trip points to be writeable. This patch makes the trip point temperatures writeable on a per-trip point basis, and modifies the required function call in thermal.c. This patch also updates the Documentation to reflect the new change. Signed-off-by: Durgadoss R Signed-off-by: Zhang Rui Signed-off-by: Len Brown --- drivers/acpi/thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/acpi/thermal.c') diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 7dbebea1ec3..2107d1bb84a 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -845,7 +845,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz) if (tz->trips.passive.flags.valid) tz->thermal_zone = - thermal_zone_device_register("acpitz", trips, tz, + thermal_zone_device_register("acpitz", trips, 0, tz, &acpi_thermal_zone_ops, tz->trips.passive.tc1, tz->trips.passive.tc2, @@ -853,7 +853,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz) tz->polling_frequency*100); else tz->thermal_zone = - thermal_zone_device_register("acpitz", trips, tz, + thermal_zone_device_register("acpitz", trips, 0, tz, &acpi_thermal_zone_ops, 0, 0, 0, tz->polling_frequency*100); -- cgit v1.2.3 From 8eaa8d6ca27788aa23659082362a608c1fabcdfe Mon Sep 17 00:00:00 2001 From: Zhang Rui Date: Wed, 25 Jul 2012 10:11:00 +0800 Subject: Thermal: Documentation update With commit 6503e5df08008b9a47022b5e9ebba658c8fa69af, 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: Zhang Rui Signed-off-by: Len Brown --- drivers/acpi/thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/acpi/thermal.c') diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 2107d1bb84a..8275e7b0696 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -550,8 +550,6 @@ static int thermal_get_temp(struct thermal_zone_device *thermal, return 0; } -static const char enabled[] = "kernel"; -static const char disabled[] = "user"; static int thermal_get_mode(struct thermal_zone_device *thermal, enum thermal_device_mode *mode) { @@ -588,8 +586,8 @@ static int thermal_set_mode(struct thermal_zone_device *thermal, if (enable != tz->tz_enabled) { tz->tz_enabled = enable; ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "%s ACPI thermal control\n", - tz->tz_enabled ? enabled : disabled)); + "%s kernel ACPI thermal control\n", + tz->tz_enabled ? "Enable" : "Disable")); acpi_thermal_check(tz); } return 0; -- cgit v1.2.3