summaryrefslogtreecommitdiff
path: root/sys/dev/i2c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-12-30 04:05:31 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-12-30 04:05:31 +0000
commit388cc63c0cc328888ee5105916d6cf0e2041560e (patch)
treed7ebda3b317f9a626ea0e16951ae4b0f638a083d /sys/dev/i2c
parent2dbff420c69adc1a0932d17a4d59bbdebed815e2 (diff)
check for another sign that a lm75 is not there
Diffstat (limited to 'sys/dev/i2c')
-rw-r--r--sys/dev/i2c/i2c_scan.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index f5f2e281630..7d81340a3cb 100644
--- a/sys/dev/i2c/i2c_scan.c
+++ b/sys/dev/i2c/i2c_scan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i2c_scan.c,v 1.37 2005/12/29 16:08:03 kettenis Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.38 2005/12/30 04:05:30 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -148,6 +148,8 @@ lm75probe(void)
mains[0] = iicprobew(0x02);
mains[1] = iicprobew(0x03);
+ if (main == 0xff && mains[0] == 0xffff && mains[1] == 0xffff)
+ return (0);
mains[2] = iicprobew(0x04); /* read Low Limit */
if (iicprobew(0x07) != mains[2] || iicprobew(0x07) != mains[2])
return (0);
@@ -158,10 +160,10 @@ lm75probe(void)
if (mains[4] != mains[3] || mains[5] != mains[3])
return (0);
-#ifdef I2C_DEBUG
+#if 0
printf("lm75probe: %02x %04x %04x %04x %04x %04x %04x\n", main,
mains[0], mains[1], mains[2], mains[3], mains[4], mains[5]);
-#endif /* I2C_DEBUG */
+#endif
/* a real lm75/77 repeats it's registers.... */
for (i = 0x08; i < 0xff; i += 8) {