summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2011-03-10 23:14:31 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2011-03-10 23:14:31 +0000
commitbcc53476188646a13fa8afe78d5b87a831c1cc08 (patch)
tree18fcfead63bc509bf94191c1f304a0d240941527 /sys
parentb25c6f5b64e72a1079b92f61c32abdafffe3b7c7 (diff)
Add support for detecting the NXP SA56004X (we have not actually
seen it in the wild yet, but the detection seems easy). Few bugs spotted by kettenis. ok kettenis
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/i2c/adm1021.c3
-rw-r--r--sys/dev/i2c/i2c_scan.c11
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/i2c/adm1021.c b/sys/dev/i2c/adm1021.c
index e49e67b1215..3bf90ee934b 100644
--- a/sys/dev/i2c/adm1021.c
+++ b/sys/dev/i2c/adm1021.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1021.c,v 1.27 2007/06/24 05:34:35 dlg Exp $ */
+/* $OpenBSD: adm1021.c,v 1.28 2011/03/10 23:14:30 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -74,6 +74,7 @@ admtemp_match(struct device *parent, void *match, void *aux)
strcmp(ia->ia_name, "g781-1") == 0 ||
strcmp(ia->ia_name, "gl523sm") == 0 ||
strcmp(ia->ia_name, "max1617") == 0 ||
+ strcmp(ia->ia_name, "sa56004x") == 0 ||
strcmp(ia->ia_name, "xeontemp") == 0)
return (1);
return (0);
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index 86de8991250..27604690fc8 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.137 2010/07/09 08:05:45 deraadt Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.138 2011/03/10 23:14:30 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -734,6 +734,15 @@ iic_probe_sensor(struct device *self, u_int8_t addr)
(iicprobe(0x17) & 0x0f) == 0x00)
name = "tmp401";
break;
+ case 0xa1:
+ if ((addr >= 0x48 && addr <= 0x4f) &&
+ iicprobe(0xff) == 0x00 &&
+ (iicprobe(0x03) & 0xf8) == 0x00 &&
+ iicprobe(0x04) <= 0x09) {
+ name = "sa56004x"; /* NXP sa56004x */
+ skip_fc = 1;
+ }
+ break;
}
if (addr == iicprobe(0x48) &&