Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi evaluate _RTV as preparation for passive cooling.



details:   https://anonhg.NetBSD.org/src/rev/b8e347338258
branches:  trunk
changeset: 749261:b8e347338258
user:      cegger <cegger%NetBSD.org@localhost>
date:      Mon Nov 23 14:42:39 2009 +0000

description:
evaluate _RTV as preparation for passive cooling.

diffstat:

 sys/dev/acpi/acpi_tz.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r f0d83d15e934 -r b8e347338258 sys/dev/acpi/acpi_tz.c
--- a/sys/dev/acpi/acpi_tz.c    Mon Nov 23 14:39:35 2009 +0000
+++ b/sys/dev/acpi/acpi_tz.c    Mon Nov 23 14:42:39 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.47 2009/09/16 10:47:54 mlelstv Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.48 2009/11/23 14:42:39 cegger Exp $ */
 
 /*
  * Copyright (c) 2003 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.47 2009/09/16 10:47:54 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.48 2009/11/23 14:42:39 cegger Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -93,6 +93,8 @@
        UINT32 hot;
        /* Package of references to processor objects for passive cooling */
        ACPI_BUFFER psl;
+       /* Conveys if temperatures are absolute or relative values. */
+       UINT32 rtv;
        /* Passive cooling temperature threshold */
        UINT32 psv;
        /* Thermal constants for use in passive cooling formulas */
@@ -481,6 +483,13 @@
        acpitz_get_integer(dv, "_TC1", &sc->sc_zone.tc1);
        acpitz_get_integer(dv, "_TC2", &sc->sc_zone.tc2);
 
+       /* ACPI spec: If _RTV is not present or present and zero,
+        * values are absolute. */
+       acpitz_get_integer(dv, "_RTV", &sc->sc_zone.rtv);
+       if (sc->sc_zone.rtv == ATZ_TMP_INVALID)
+               sc->sc_zone.rtv = 0;
+
+
        acpitz_sane_temp(&sc->sc_zone.tmp);
        acpitz_sane_temp(&sc->sc_zone.crt);
        acpitz_sane_temp(&sc->sc_zone.hot);



Home | Main Index | Thread Index | Old Index