summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2006-03-04 08:14:02 +0000
committerDamien Miller <djm@cvs.openbsd.org>2006-03-04 08:14:02 +0000
commitd1cf25b69ac78c0e945e405055d763c0b1a9282f (patch)
treeb7dad6b01e675c5ed2da13f216a82a0ed264f1a7 /sys
parentfd9e124cb85a6b966dde003f7172928a15938332 (diff)
don't permanently disable temperature sensors when they fail a read,
just mark it as invalid
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/i2c/asb100.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/i2c/asb100.c b/sys/dev/i2c/asb100.c
index 97f6c75f085..f4e9e46161a 100644
--- a/sys/dev/i2c/asb100.c
+++ b/sys/dev/i2c/asb100.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asb100.c,v 1.5 2006/01/31 11:18:28 djm Exp $ */
+/* $OpenBSD: asb100.c,v 1.6 2006/03/04 08:14:01 djm Exp $ */
/*
* Copyright (c) 2005 Damien Miller <djm@openbsd.org>
@@ -400,8 +400,9 @@ asbtm_refresh(void *arg)
sizeof sdata2, 0) == 0 && sdata2 != 0xffff) {
sc->sc_sensor[ASB100_SENSOR_TEMP1].value = 273150000 +
500000 * (swap16(sdata2) / 128);
+ sc->sc_sensor[ASB100_SENSOR_TEMP2].flags &=
+ ~SENSOR_FINVALID;
} else {
- sc->sc_satellite[0] = -1;
sc->sc_sensor[ASB100_SENSOR_TEMP2].flags |=
SENSOR_FINVALID;
}
@@ -414,8 +415,9 @@ asbtm_refresh(void *arg)
sizeof sdata2, 0) == 0 && sdata2 != 0xffff) {
sc->sc_sensor[ASB100_SENSOR_TEMP2].value = 273150000 +
500000 * (swap16(sdata2) / 128);
+ sc->sc_sensor[ASB100_SENSOR_TEMP2].flags &=
+ ~SENSOR_FINVALID;
} else {
- sc->sc_satellite[1] = -1;
sc->sc_sensor[ASB100_SENSOR_TEMP2].flags |=
SENSOR_FINVALID;
}