aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/kernel-parameters.txt4
-rw-r--r--drivers/acpi/thermal.c34
2 files changed, 34 insertions, 4 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 4c7d2774d2a4..06db892b558a 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1820,6 +1820,10 @@ and is between 256 and 4096 characters. It is defined in the file
1820 thash_entries= [KNL,NET] 1820 thash_entries= [KNL,NET]
1821 Set number of hash buckets for TCP connection 1821 Set number of hash buckets for TCP connection
1822 1822
1823 thermal.act= [HW,ACPI]
1824 -1: disable all active trip points in all thermal zones
1825 <degrees C>: override all lowest active trip points
1826
1823 thermal.nocrt= [HW,ACPI] 1827 thermal.nocrt= [HW,ACPI]
1824 Set to disable actions on ACPI thermal zone 1828 Set to disable actions on ACPI thermal zone
1825 critical and hot trip points. 1829 critical and hot trip points.
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 57d05ff44dd1..3521c37bbd33 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -74,6 +74,10 @@ MODULE_AUTHOR("Paul Diefenbaugh");
74MODULE_DESCRIPTION("ACPI Thermal Zone Driver"); 74MODULE_DESCRIPTION("ACPI Thermal Zone Driver");
75MODULE_LICENSE("GPL"); 75MODULE_LICENSE("GPL");
76 76
77static int act;
78module_param(act, int, 0644);
79MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.\n");
80
77static int tzp; 81static int tzp;
78module_param(tzp, int, 0444); 82module_param(tzp, int, 0444);
79MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n"); 83MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n");
@@ -405,11 +409,33 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
405 409
406 char name[5] = { '_', 'A', 'C', ('0' + i), '\0' }; 410 char name[5] = { '_', 'A', 'C', ('0' + i), '\0' };
407 411
408 status = 412 if (act == -1)
409 acpi_evaluate_integer(tz->device->handle, name, NULL, 413 break; /* disable all active trip points */
410 &tz->trips.active[i].temperature); 414
411 if (ACPI_FAILURE(status)) 415 status = acpi_evaluate_integer(tz->device->handle,
416 name, NULL, &tz->trips.active[i].temperature);
417
418 if (ACPI_FAILURE(status)) {
419 if (i == 0) /* no active trip points */
420 break;
421 if (act <= 0) /* no override requested */
422 break;
423 if (i == 1) { /* 1 trip point */
424 tz->trips.active[0].temperature =
425 CELSIUS_TO_KELVIN(act);
426 } else { /* multiple trips */
427 /*
428 * Don't allow override higher than
429 * the next higher trip point
430 */
431 tz->trips.active[i - 1].temperature =
432 (tz->trips.active[i - 2].temperature <
433 CELSIUS_TO_KELVIN(act) ?
434 tz->trips.active[i - 2].temperature :
435 CELSIUS_TO_KELVIN(act));
436 }
412 break; 437 break;
438 }
413 439
414 name[2] = 'L'; 440 name[2] = 'L';
415 status = 441 status =