summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-18 23:06:48 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-18 23:06:48 +0000
commitddd2dec76b7a178a87b054c863a614d5e0d03fb2 (patch)
treef1008a505a8a52d558d494abcf764146d37aca82
parent220a929fdf15ea905a05ea445bf5bca75ae7cb8c (diff)
probe for it8712 and sis950 (somewhat of a clone)
-rw-r--r--sys/dev/i2c/i2c_scan.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index c1e53a39c42..f77ce8e76f7 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.76 2006/03/12 11:18:51 kettenis Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.77 2006/03/18 23:06:47 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -616,7 +616,7 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
iicprobe(0x16) == 0x41 && ((iicprobe(0x17) & 0xf0) == 0x40)) {
name = "adm1026";
} else if (name == NULL &&
- (addr & 0x7c) == 0x48) { /* addr 0b1001xxx */
+ (addr & 0x7c) == 0x48) { /* addr 0b1001xxx */
name = lm75probe();
}
#if 0
@@ -638,6 +638,14 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
name = "ds1721"; /* terrible probe */
}
#endif
+ if (name == NULL && (addr & 0xf8) == 0x28 && iicprobe(0x48) == addr &&
+ (iicprobe(0x00) & 0x90) == 0x10 && iicprobe(0x58) == 0x90) {
+ if (iicprobe(0x5b) == 0x12)
+ name = "it8712";
+ else if (iicprobe(0x5b) == 0x00)
+ name = "sis950"; /* we think */
+ }
+
if (name == NULL) {
name = adm1032cloneprobe(addr);
if (name)