summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-12-24 23:29:23 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-12-24 23:29:23 +0000
commite3f191f53452fbde3f6a1beaa641f6f85c86e3e0 (patch)
treed982671fe474ca13b7eb6dcaea09baa6026e0871 /sys
parent287a56324132f7617ffb79a1261dca75f9433dd5 (diff)
even though the adm1021 manual page doesn't say that the rev at 0xff
was always 0x0?, the adm1021A (which uses 0x3?) manual page does claim that this was the case. trust it, why not.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/i2c/i2c_scan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index c5a42d61374..70caed2c90c 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.14 2005/12/24 22:08:17 deraadt Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.15 2005/12/24 23:29:22 deraadt Exp $ */
/*
* Copyright (c) 2005 Alexander Yurchenko <grange@openbsd.org>
@@ -236,8 +236,8 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
name = "adm1023";
else if ((probe(0xff) & 0xf0) == 0x90)
name = "adm1022";
- else
- name = "adm1021"; /* getting desperate.. */
+ else if ((probe(0xff) & 0xf0) == 0x00)
+ name = "adm1021";
} else if (probe(0x3e) == 0xa1) {
/* Philips vendor code 0xa1 at 0x3e */
if ((probe(0x3f) & 0xf0) == 0x20)
@@ -286,8 +286,8 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
#ifdef __i386__
} else if (xeonprobe(addr)) {
name = "xeon";
- }
#endif
+ }
printf("%s: addr 0x%x", self->dv_xname, addr);
// for (i = 0; i < sizeof(probereg); i++)