Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63950
b: refs/heads/master
c: f8707ec
h: refs/heads/master
v: v3
  • Loading branch information
Len Brown committed Aug 12, 2007
1 parent 1ff6684 commit b8a876b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f54871456162aff557d57bec51639b1288d4a84b
refs/heads/master: f8707ec9643769957065405b5090e4aa64fd8214
4 changes: 4 additions & 0 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1820,6 +1820,10 @@ and is between 256 and 4096 characters. It is defined in the file
thash_entries= [KNL,NET]
Set number of hash buckets for TCP connection

thermal.act= [HW,ACPI]
-1: disable all active trip points in all thermal zones
<degrees C>: override all lowest active trip points

thermal.nocrt= [HW,ACPI]
Set to disable actions on ACPI thermal zone
critical and hot trip points.
Expand Down
34 changes: 30 additions & 4 deletions trunk/drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION("ACPI Thermal Zone Driver");
MODULE_LICENSE("GPL");

static int act;
module_param(act, int, 0644);
MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.\n");

static int tzp;
module_param(tzp, int, 0444);
MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n");
Expand Down Expand Up @@ -405,11 +409,33 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)

char name[5] = { '_', 'A', 'C', ('0' + i), '\0' };

status =
acpi_evaluate_integer(tz->device->handle, name, NULL,
&tz->trips.active[i].temperature);
if (ACPI_FAILURE(status))
if (act == -1)
break; /* disable all active trip points */

status = acpi_evaluate_integer(tz->device->handle,
name, NULL, &tz->trips.active[i].temperature);

if (ACPI_FAILURE(status)) {
if (i == 0) /* no active trip points */
break;
if (act <= 0) /* no override requested */
break;
if (i == 1) { /* 1 trip point */
tz->trips.active[0].temperature =
CELSIUS_TO_KELVIN(act);
} else { /* multiple trips */
/*
* Don't allow override higher than
* the next higher trip point
*/
tz->trips.active[i - 1].temperature =
(tz->trips.active[i - 2].temperature <
CELSIUS_TO_KELVIN(act) ?
tz->trips.active[i - 2].temperature :
CELSIUS_TO_KELVIN(act));
}
break;
}

name[2] = 'L';
status =
Expand Down

0 comments on commit b8a876b

Please sign in to comment.