All of lore.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <len.brown@intel.com>
To: linux-acpi@vger.kernel.org
Cc: Len Brown <len.brown@intel.com>
Subject: [PATCH 5/6] ACPI: thermal: add thermal.act= bootparam
Date: Thu,  9 Aug 2007 01:58:55 -0400	[thread overview]
Message-ID: <11866391402883-git-send-email-len.brown@intel.com> (raw)
Message-ID: <131367d2e0318da7feca70b91c2c3c1c47534bed.1186638234.git.len.brown@intel.com> (raw)
In-Reply-To: <11866391393475-git-send-email-len.brown@intel.com>
In-Reply-To: <c405f58ecf5ebf0ba3752cb24a7cd0cc5075646d.1186638234.git.len.brown@intel.com>

thermal.act=-1 disables all active trip points
in all ACPI thermal zones.

thermal.act=C, where C > 0, overrides all first active trip points
in all thermal zones to C degrees Celcius.

Note, overriding this trip-point will disable any BIOS attempts
to implement hysterisis around AC0, and may result in the fan
starting and stopping frequently if temperature frequently crosses C.

Signed-off-by: Len Brown <len.brown@intel.com>
---
 Documentation/kernel-parameters.txt |    4 ++++
 drivers/acpi/thermal.c              |   20 ++++++++++++++++----
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 897bb63..a82d46f 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
 	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.
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 1642980..2b48ab9 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -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");
@@ -405,11 +409,19 @@ 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)) {
+			/* override last valid trip point */
+			if ((i > 0) && (act > 0))
+				tz->trips.active[i - 1].temperature =
+					CELSIUS_TO_KELVIN(act);
 			break;
+		}
 
 		name[2] = 'L';
 		status =
-- 
1.5.3.rc4.29.g74276

  parent reply	other threads:[~2007-08-09  5:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-09  5:58 ACPI Thermal workaround hooks Len Brown
2007-08-09  5:58 ` [PATCH 1/6] ACPI: thermal: "thermal.off=1" disables ACPI thermal support Len Brown
2007-08-09  5:58   ` Len Brown
2007-08-09  5:58   ` [PATCH 2/6] ACPI: thermal: expose "thermal.tzp=" Len Brown
2007-08-09  5:58     ` Len Brown
2007-08-09  5:58   ` [PATCH 3/6] ACPI: thermal: create "thermal.psv=" bootparam Len Brown
2007-08-09  5:58     ` Len Brown
2007-08-09 17:22       ` Len Brown
2007-08-09  5:58   ` [PATCH 4/6] ACPI: thermal: create "thermal.nocrt" bootparam Len Brown
2007-08-09  5:58     ` Len Brown
2007-08-09  5:58   ` Len Brown [this message]
2007-08-09  5:58     ` [PATCH 5/6] ACPI: thermal: add thermal.act= bootparam Len Brown
2007-08-11  4:29       ` Len Brown
2007-08-09  5:58   ` [PATCH 6/6] ACPI: thermal: work around broken AOpen Award BIOS Len Brown
2007-08-09  5:58     ` Len Brown
2007-08-09 17:33 ` ACPI Thermal workaround hooks Thomas Renninger
2007-08-11  4:41   ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11866391402883-git-send-email-len.brown@intel.com \
    --to=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.