diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-12-27 03:46:51 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-12-27 03:46:51 +0000 |
commit | 52808f417623dab451dcf9b34fcc0d052a61e387 (patch) | |
tree | fc621357dc746878e7242c87e622ad9286927777 /sys/dev | |
parent | cf0f37163df4f5f47c32c1cee28d5605c8439777 (diff) |
completely bogus adm1021 check; it is much more like the xeon-style
thingies; except for now i only want to do that rather loose check
chip on i386 machines
with this, i get sensors on a sparc64 v120. hurray
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/i2c/i2c_scan.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c index 6fe029389eb..70bcc13323a 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.19 2005/12/26 17:52:12 deraadt Exp $ */ +/* $OpenBSD: i2c_scan.c,v 1.20 2005/12/27 03:46:50 deraadt Exp $ */ /* * Copyright (c) 2005 Alexander Yurchenko <grange@openbsd.org> @@ -266,7 +266,7 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr) else if ((probe(0xff) & 0xf0) == 0x90) name = "adm1022"; else if ((probe(0xff) & 0xf0) == 0x00) - name = "adm1021"; + name = "adm1021"; /* ????? */ break; case 0xa1: /* Philips vendor code 0xa1 at 0x3e */ @@ -325,6 +325,11 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr) name = "lm90"; } else if (probe(0xfe) == 0x4d && probe(0xff) == 0x08) { name = "maxim6690"; /* somewhat similar to lm90 */ + } else if (probe(0xfe) == 0x41 && probe(0x3c) == 0x00 && + (addr == 0x18 || addr == 0x19 || addr == 0x1a || + addr == 0x29 || addr == 0x2a || addr == 0x2b || + addr == 0x4c || addr == 0x4d || addr == 0x4e)) { + name = "adm1021"; /* lots of addresses... bleah */ } else if (probe(0x4f) == 0x5c && (probe(0x4e) & 0x80)) { /* * We should toggle 0x4e bit 0x80, then re-read |