diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-04-18 19:28:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-04-18 19:28:45 +0000 |
commit | 22db742c56a14689d61d21e299e9a01d48252e6b (patch) | |
tree | 62ce9a30e70fef38058e7b1292028ec0ba13b87f /sys/dev/i2c/i2c_scan.c | |
parent | b242afc18e90c681be69e0b15775fcb8cfad2d6d (diff) |
detect adm1034
Diffstat (limited to 'sys/dev/i2c/i2c_scan.c')
-rw-r--r-- | sys/dev/i2c/i2c_scan.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c index 19b42b05bac..e538434e6a2 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.123 2008/04/18 18:51:01 deraadt Exp $ */ +/* $OpenBSD: i2c_scan.c,v 1.124 2008/04/18 19:28:44 deraadt Exp $ */ /* * Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org> @@ -522,7 +522,9 @@ iic_probe_sensor(struct device *self, u_int8_t addr) name = "adt7467"; /* or adt7468 */ else if (iicprobe(0x3d) == 0x33 && iicprobe(0x3f) == 0x02) name = "adm1033"; - else if ((addr == 0x2c || addr == 0x2d || addr == 0x2e) && + else if (iicprobe(0x3d) == 0x34 && iicprobe(0x3f) == 0x02) + name = "adm1034"; + else if ((addr == 0x2c || addr == 0x2d || addr == 0x2e) && iicprobe(0x3d) == 0x30 && (iicprobe(0x01) & 0x80) == 0x00 && (iicprobe(0x0d) & 0x70) == 0x00 && @@ -533,8 +535,8 @@ iic_probe_sensor(struct device *self, u_int8_t addr) * cannot assume the reserved/unused bits of * register 0x03 and 0x06 are set to zero. */ - name = "adm1030"; /* complete check */ - else if ((addr == 0x2c || addr == 0x2d || addr == 0x2e) && + name = "adm1030"; /* complete check */ + else if ((addr == 0x2c || addr == 0x2d || addr == 0x2e) && iicprobe(0x3d) == 0x31 && (iicprobe(0x01) & 0x80) == 0x00 && (iicprobe(0x0d) & 0x70) == 0x00 && @@ -845,7 +847,7 @@ iic_probe_sensor(struct device *self, u_int8_t addr) */ name = "gl518sm"; } else if ((addr == 0x2c || addr == 0x2d || addr == 0x2e) && - iicprobe(0x16) == 0x41 && ((iicprobe(0x17) & 0xf0) == 0x40)) { + iicprobe(0x16) == 0x41 && ((iicprobe(0x17) & 0xf0) == 0x40)) { name = "adm1026"; } else if ((addr & 0x18) == 0x18 && iicprobew(0x06) == 0x1131 && iicprobew(0x07) == 0xa101 && |