summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2006-07-15 19:39:57 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2006-07-15 19:39:57 +0000
commit69948c91bd82f2bf316a1c047103e6050887fe13 (patch)
tree62c12c38b4c041ada7d4efd2f979534c655b7f8f
parent7282105c96d81f6684bf9171c0ebe40857d82be5 (diff)
Add support for Genesys Logic GL523SM and Global Mixed-mode Technology G781.
tested by fgs@ and Stuart Henderson.
-rw-r--r--sys/dev/i2c/adm1021.c9
-rw-r--r--sys/dev/i2c/i2c_scan.c21
2 files changed, 26 insertions, 4 deletions
diff --git a/sys/dev/i2c/adm1021.c b/sys/dev/i2c/adm1021.c
index 4097435fc58..a0edd51765e 100644
--- a/sys/dev/i2c/adm1021.c
+++ b/sys/dev/i2c/adm1021.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1021.c,v 1.22 2006/04/10 00:57:23 deraadt Exp $ */
+/* $OpenBSD: adm1021.c,v 1.23 2006/07/15 19:39:55 kettenis Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -68,8 +68,11 @@ admtemp_match(struct device *parent, void *match, void *aux)
if (strcmp(ia->ia_name, "adm1021") == 0 ||
strcmp(ia->ia_name, "adm1032") == 0 ||
- strcmp(ia->ia_name, "xeontemp") == 0 ||
- strcmp(ia->ia_name, "max1617") == 0)
+ strcmp(ia->ia_name, "g781") == 0 ||
+ strcmp(ia->ia_name, "g781-1") == 0 ||
+ strcmp(ia->ia_name, "gl523sm") == 0 ||
+ strcmp(ia->ia_name, "max1617") == 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 394e8b62678..48464ca9bf0 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.86 2006/07/12 15:35:40 deraadt Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.87 2006/07/15 19:39:56 kettenis Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -497,6 +497,17 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
iicprobe(0x04) <= 0x09 && (iicprobe(0xbf) & 0xf8) == 0)
name = "lm90";
break;
+ case 0x23: /* Genesys Logic? */
+ if ((addr == 0x4c) &&
+ (iicprobe(0x03) & 0x3f) == 0x00 && iicprobe(0x04) <= 0x08)
+ /*
+ * Genesys Logic doesn't make the datasheet
+ * for the GL523SM publically available, so
+ * the checks above are nothing more than a
+ * (conservative) educated guess.
+ */
+ name = "gl523sm";
+ break;
case 0x41: /* Analog Devices */
if ((addr == 0x4c || addr == 0x4d) &&
iicprobe(0xff) == 0x51 &&
@@ -527,6 +538,14 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
skip_fc = 1;
}
break;
+ case 0x47: /* Global Mixed-mode Technology */
+ if (addr == 0x4c && iicprobe(0xff) == 0x01 &&
+ (iicprobe(0x03) & 0x3f) == 0x00 && iicprobe(0x04) <= 0x08)
+ name = "g781";
+ if (addr == 0x4d && iicprobe(0xff) == 0x03 &&
+ (iicprobe(0x03) & 0x3f) == 0x00 && iicprobe(0x04) <= 0x08)
+ name = "g781-1";
+ break;
case 0x4d: /* Maxim */
if ((addr == 0x18 || addr == 0x19 || addr == 0x1a ||
addr == 0x29 || addr == 0x2a || addr == 0x2b ||