Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Within the scope of the ACPI spec, K = C + 273....
details: https://anonhg.NetBSD.org/src/rev/53f3bec36e41
branches: trunk
changeset: 558244:53f3bec36e41
user: soren <soren%NetBSD.org@localhost>
date: Mon Feb 02 07:58:11 2004 +0000
description:
Within the scope of the ACPI spec, K = C + 273.2; correct for it.
diffstat:
sys/dev/acpi/acpi_tz.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r 61bc3ed4caa9 -r 53f3bec36e41 sys/dev/acpi/acpi_tz.c
--- a/sys/dev/acpi/acpi_tz.c Mon Feb 02 07:55:14 2004 +0000
+++ b/sys/dev/acpi/acpi_tz.c Mon Feb 02 07:58:11 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.6 2003/11/03 18:07:10 mycroft Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.7 2004/02/02 07:58:11 soren 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.6 2003/11/03 18:07:10 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.7 2004/02/02 07:58:11 soren Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -198,7 +198,14 @@
return;
}
- sc->sc_data[ATZ_SENSOR_TEMP].cur.data_us = sc->sc_zone.tmp * 100000;
+ /*
+ * The temperature unit for envsys(9) is microKelvin, so convert to
+ * that from ACPI's microKelvin. Also, the ACPI specification assumes
+ * that K = C + 273.2 rather than the nominal 273.16 used by envsys(9),
+ * so we correct for that too.
+ */
+ sc->sc_data[ATZ_SENSOR_TEMP].cur.data_us =
+ sc->sc_zone.tmp * 100000 - 40000;
sc->sc_data[ATZ_SENSOR_TEMP].validflags |= ENVSYS_FCURVALID;
if (sc->sc_flags & ATZ_F_VERBOSE)
Home |
Main Index |
Thread Index |
Old Index