From 50063d65a2d790d71c482c6be8f1222648ec57c5 Mon Sep 17 00:00:00 2001
From: Theo de Raadt <deraadt@cvs.openbsd.org>
Date: Wed, 28 Dec 2005 23:06:15 +0000
Subject: probe for adm1032, a stupid stupid adm1021

---
 sys/dev/i2c/adm1021.c  | 3 ++-
 sys/dev/i2c/i2c_scan.c | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

(limited to 'sys/dev')

diff --git a/sys/dev/i2c/adm1021.c b/sys/dev/i2c/adm1021.c
index 99d54f89c7e..771c1cf8a41 100644
--- a/sys/dev/i2c/adm1021.c
+++ b/sys/dev/i2c/adm1021.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: adm1021.c,v 1.15 2005/12/27 23:03:04 deraadt Exp $	*/
+/*	$OpenBSD: adm1021.c,v 1.16 2005/12/28 23:06:14 deraadt Exp $	*/
 
 /*
  * Copyright (c) 2005 Theo de Raadt
@@ -65,6 +65,7 @@ admtemp_match(struct device *parent, void *match, void *aux)
 	struct i2c_attach_args *ia = aux;
 
 	if (strcmp(ia->ia_name, "adm1021") == 0 ||
+	    strcmp(ia->ia_name, "adm1032") == 0 ||
 	    strcmp(ia->ia_name, "xeontemp") == 0 ||
 	    strcmp(ia->ia_name, "maxim1617") == 0)
 		return (1);
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index 394593c35c8..89dd38f6aba 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.32 2005/12/28 22:35:33 deraadt Exp $	*/
+/*	$OpenBSD: i2c_scan.c,v 1.33 2005/12/28 23:05:38 deraadt Exp $	*/
 
 /*
  * Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -369,6 +369,9 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
 			name = "lm86";
 	} else if (probe(0xfe) == 0x4d && probe(0xff) == 0x08) {
 		name = "maxim6690";	/* somewhat similar to lm90 */
+	} else if (probe(0xfe) == 0x41 && (addr == 0x4c || addr == 0x4d) &&
+	    (probe(0x03) & 0x2a) == 0 && probe(0x04) <= 0x09) {
+		name = "adm1032";
 	} else if (probe(0xfe) == 0x41 && probe(0x3c) == 0x00 &&
 	    (addr == 0x18 || addr == 0x19 || addr == 0x1a ||
 	    addr == 0x29 || addr == 0x2a || addr == 0x2b ||
-- 
cgit v1.2.3