diff options
author | 2006-03-04 08:14:01 +0000 | |
---|---|---|
committer | 2006-03-04 08:14:01 +0000 | |
commit | 5b811e82d9e9fc9da8f40560ac001aadf3d67a4e (patch) | |
tree | c0efde2545b1e2b353f023a828305d98bfc6a3e0 /sys/dev/i2c/asb100.c | |
parent | Show the CPU state %'s on first display as well. "looks good" deraadt@ (diff) | |
download | wireguard-openbsd-5b811e82d9e9fc9da8f40560ac001aadf3d67a4e.tar.xz wireguard-openbsd-5b811e82d9e9fc9da8f40560ac001aadf3d67a4e.zip |
don't permanently disable temperature sensors when they fail a read,
just mark it as invalid
Diffstat (limited to 'sys/dev/i2c/asb100.c')
-rw-r--r-- | sys/dev/i2c/asb100.c | 8 |
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; } |