summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-12-27 22:49:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-12-27 22:49:58 +0000
commit0da93514badadb8efa5c006e48e4a0f54c1cb253 (patch)
treefe5d30f79190fc0edec53d5389b229ee3727a9b6 /sys
parent070f78ebdd558bb60b798056f1a40730878bc0ab (diff)
correct probe for ds1780 (lm87 clone)
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/i2c/i2c_scan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index 99a44bd2a39..a2f97d453dd 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.27 2005/12/27 22:14:23 deraadt Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.28 2005/12/27 22:49:57 deraadt Exp $ */
/*
* Copyright (c) 2005 Alexander Yurchenko <grange@openbsd.org>
@@ -347,8 +347,8 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
break;
case 0xda:
if (probe(0x3f) == 0x01 && probe(0x48) == addr &&
- probe(0x00) == 0x00)
- name = "ds1780"; /* getting desperate! */
+ (probe(0x40) & 0x80) == 0x00)
+ name = "ds1780"; /* lm87 clones */
break;
}
switch (probe(0x4e)) {