summaryrefslogtreecommitdiff
path: root/sys/dev/i2c/i2c_scan.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2006-11-19 16:40:03 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2006-11-19 16:40:03 +0000
commit2c4921e027274a12eaaab8cf8016f8ab5a4baf0b (patch)
tree9668b8b99aeeb79722326db2a71f45642d5aec38 /sys/dev/i2c/i2c_scan.c
parent7fc93286b9af9717e2dfefc0c97eac525f7a7c67 (diff)
Probe for National Semiconductor LM63.
Diffstat (limited to 'sys/dev/i2c/i2c_scan.c')
-rw-r--r--sys/dev/i2c/i2c_scan.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index 6078245715c..39ea0e63b9a 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.92 2006/11/19 16:16:22 kettenis Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.93 2006/11/19 16:40:02 kettenis Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -566,10 +566,14 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
switch (iicprobe(0xfe)) {
case 0x01: /* National Semiconductor */
if (addr == 0x4c &&
+ iicprobe(0xff) == 0x41 && (iicprobe(0x03) & 0x18) == 0 &&
+ iicprobe(0x04) <= 0x0f && (iicprobe(0xbf) & 0xf8) == 0)
+ name = "lm63";
+ else if (addr == 0x4c &&
iicprobe(0xff) == 0x11 && (iicprobe(0x03) & 0x2a) == 0 &&
iicprobe(0x04) <= 0x09 && (iicprobe(0xbf) & 0xf8) == 0)
name = "lm86";
- if (addr == 0x4c &&
+ else if (addr == 0x4c &&
iicprobe(0xff) == 0x31 && (iicprobe(0x03) & 0x2a) == 0 &&
iicprobe(0x04) <= 0x09 && (iicprobe(0xbf) & 0xf8) == 0)
name = "lm89"; /* or lm99 */