aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/thermal.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-08-12 00:12:35 -0400
committerLen Brown <len.brown@intel.com>2007-08-12 00:12:35 -0400
commita70cdc5200b0eb9fc3ef64efb29baac9b2cf2431 (patch)
tree1ae0722744cea5740ecf3141b7b3a4da2411bb19 /drivers/acpi/thermal.c
parent730ff34de766a6fddee25ac1c32bc49c1a2fd758 (diff)
ACPI: thermal: create "thermal.psv=" to override passive trip points
"thermal.psv=-1" disables passive trip points for all ACPI thermal zones. "thermal.psv=C", where 'C' is degrees Celsius, overrides all existing passive trip points for all ACPI thermal zones. thermal.psv is checked at module load time, and in response to trip-point change events. Note that if the system does not deliver thermal zone temperature change events near the new trip-point, then it will not be noticed. To force your custom trip point to be noticed, you may need to enable polling: eg. thermal.tzp=3000 invokes polling every 5 minutes. Note that once passive thermal throttling is invoked, it has its own internal Thermal Sampling Period (_TSP), that is unrelated to _TZP. WARNING: disabling or raising a thermal trip point may result in increased running temperature and shorter hardware lifetime on some systems. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r--drivers/acpi/thermal.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index b6b3bec84547..74e25be8abc9 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -82,6 +82,10 @@ static int off;
82module_param(off, int, 0); 82module_param(off, int, 0);
83MODULE_PARM_DESC(off, "Set to disable ACPI thermal support.\n"); 83MODULE_PARM_DESC(off, "Set to disable ACPI thermal support.\n");
84 84
85static int psv;
86module_param(psv, int, 0644);
87MODULE_PARM_DESC(psv, "Disable or override all passive trip points.\n");
88
85static int acpi_thermal_add(struct acpi_device *device); 89static int acpi_thermal_add(struct acpi_device *device);
86static int acpi_thermal_remove(struct acpi_device *device, int type); 90static int acpi_thermal_remove(struct acpi_device *device, int type);
87static int acpi_thermal_resume(struct acpi_device *device); 91static int acpi_thermal_resume(struct acpi_device *device);
@@ -343,9 +347,16 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
343 347
344 /* Passive: Processors (optional) */ 348 /* Passive: Processors (optional) */
345 349
346 status = 350 if (psv == -1) {
347 acpi_evaluate_integer(tz->device->handle, "_PSV", NULL, 351 status = AE_SUPPORT;
348 &tz->trips.passive.temperature); 352 } else if (psv > 0) {
353 tz->trips.passive.temperature = CELSIUS_TO_KELVIN(psv);
354 status = AE_OK;
355 } else {
356 status = acpi_evaluate_integer(tz->device->handle,
357 "_PSV", NULL, &tz->trips.passive.temperature);
358 }
359
349 if (ACPI_FAILURE(status)) { 360 if (ACPI_FAILURE(status)) {
350 tz->trips.passive.flags.valid = 0; 361 tz->trips.passive.flags.valid = 0;
351 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No passive threshold\n")); 362 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No passive threshold\n"));