[ltp] [PATCH] ibm_acpi - Allow fan to be set to full speed
Thomas Renninger
linux-thinkpad@linux-thinkpad.org
Sun, 21 Aug 2005 06:31:19 +0200
This is a multi-part message in MIME format.
--------------030607060009080809050904
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
echo full-speed >/proc/acpi/ibm/fan
sets the speed to max for most Thinkpads.
Thomas
--------------030607060009080809050904
Content-Type: text/x-patch;
name="ibm_add_full-speed.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="ibm_add_full-speed.diff"
--- drivers/acpi/ibm_acpi.c.orig 2005-08-20 19:42:16.000000000 -0600
+++ drivers/acpi/ibm_acpi.c 2005-08-20 19:42:48.000000000 -0600
@@ -1507,7 +1507,7 @@
" (<level> is 0-7)\n");
if (!gfan_handle)
/* all except 570, 600e/x, 770e, 770x */
- len += sprintf(p + len, "commands:\tenable, disable\n");
+ len += sprintf(p + len, "commands:\tenable, disable, full-speed\n");
if (fans_handle)
/* X31, X40 */
len += sprintf(p + len, "commands:\tspeed <speed>"
@@ -1538,6 +1538,11 @@
/* all except 570, 600e/x, 770e, 770x */
if (!acpi_ec_write(fan_status_offset, 0x00))
return -EIO;
+ } else if (!gfan_handle &&
+ strlencmp(cmd, "full-speed") == 0) {
+ /* all except 570, 600e/x, 770e, 770x */
+ if (!acpi_ec_write(fan_status_offset, 0x50))
+ return -EIO;
} else if (fans_handle &&
sscanf(cmd, "speed %d", &speed) == 1 &&
speed >= 0 && speed <= 65535) {
--------------030607060009080809050904--