summaryrefslogtreecommitdiff
path: root/sys/dev/i2c/i2c_scan.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-01-04 18:36:23 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-01-04 18:36:23 +0000
commitcf14fc1833072f14f7147dda53f00da9b3964109 (patch)
tree804c7d5ca719c82e6a6656b4cfaee1639de231e7 /sys/dev/i2c/i2c_scan.c
parent091c226877ed1ad12bd5050a894fa1b9bd04219b (diff)
detect lm96000
Diffstat (limited to 'sys/dev/i2c/i2c_scan.c')
-rw-r--r--sys/dev/i2c/i2c_scan.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index 4c623b3d100..370f2d95cf9 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.49 2006/01/04 18:14:47 deraadt Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.50 2006/01/04 18:36:22 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -367,9 +367,12 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
name = "lm93";
else if (iicprobe(0x3f) == 0x17)
name = "lm86";
- else if ((iicprobe(0x3f) & 0xf0) == 0x60 &&
+ else if (iicprobe(0x3f) == 0x68 &&
(addr == 0x2c || addr == 0x2d || addr == 0x2e))
- name = "lm85"; /* adt7460 compat */
+ name = "lm96000"; /* adt7460 compat? */
+ else if ((iicprobe(0x3f) == 0x60 || iicprobe(0x3f) == 0x62) &&
+ (addr == 0x2c || addr == 0x2d || addr == 0x2e))
+ name = "lm85"; /* lm85C/B == adt7460 compat */
else if (iicprobe(0x3f) == 0x03 && iicprobe(0x48) == addr &&
((iicprobe(0x40) & 0x80) == 0x00) && ((addr & 0x7c) == 0x2c))
name = "lm81";