Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Feb 2005 20:58:38 -0500
From:      "Alexandre \"Sunny\" Kovalenko" <Alex.Kovalenko@verizon.net>
To:        freebsd-acpi@freebsd.org
Subject:   Thermal state switching
Message-ID:  <1107914318.1015.15.camel@RabbitsDen>

next in thread | raw e-mail | index | archive | help

--=-cDYnWL8BjwMTyuTKOvjs
Content-Type: text/plain; charset=iso-8859-5
Content-Transfer-Encoding: 8bit

Good people,

I was looking at thermal states switching by acpi_thermal.c and it looks
like follows (provided that temperature raises and falls slowly and
gradually):

NONE =up> AC2 =up> AC1 =up> AC0 =down> NONE                       (1)

I do not know whether this was intentional or not and, for me, something
along the lines of

NONE =up> AC2 =up> AC1 =up> AC0 =down> AC1 =down> AC2 =down> NONE (2)

seemed more natural.

If (2) and not (1) was indeed the desired behavior attached patch seems
to do the job. If (1) is what was intended, I do apologize for the
noise.

I am running -CURRENT from February 3.
-- 
Alexandre "Sunny" Kovalenko (Олександр Коваленко)

--=-cDYnWL8BjwMTyuTKOvjs
Content-Disposition: attachment; filename=acpi_thermal.c.patch
Content-Type: text/x-patch; name=acpi_thermal.c.patch; charset=ASCII
Content-Transfer-Encoding: 7bit

--- acpi_thermal.c.ORIG	Tue Sep 21 14:39:10 2004
+++ acpi_thermal.c	Tue Feb  8 20:17:51 2005
@@ -405,7 +405,6 @@
 			    acpi_device_get_parent_softc(sc->tz_dev),
 			    "_AC%d: temperature %d.%d >= setpoint %d.%d\n", i,
 			    TZ_KELVTOC(temp), TZ_KELVTOC(sc->tz_zone.ac[i]));
-		getnanotime(&sc->tz_cooling_started);
 	    }
 	}
     }
@@ -455,6 +454,7 @@
 		    acpi_tz_aclevel_string(sc->tz_active),
 		    acpi_tz_aclevel_string(newactive), TZ_KELVTOC(temp));
 	sc->tz_active = newactive;
+        getnanotime(&sc->tz_cooling_started);
     }
 
     /* XXX (de)activate any passive cooling that may be required. */

--=-cDYnWL8BjwMTyuTKOvjs--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1107914318.1015.15.camel>