summaryrefslogtreecommitdiffstats
path: root/sys/dev/i2c
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2006-07-15 19:39:55 +0000
committerkettenis <kettenis@openbsd.org>2006-07-15 19:39:55 +0000
commit7a7081bae7129f6e4f71ff8921da9c41cfa847ba (patch)
tree72ac6c0aad3605d6a22fdb8b725e5742a4e5433b /sys/dev/i2c
parent- .Sq for single letters (diff)
downloadwireguard-openbsd-7a7081bae7129f6e4f71ff8921da9c41cfa847ba.tar.xz
wireguard-openbsd-7a7081bae7129f6e4f71ff8921da9c41cfa847ba.zip
Add support for Genesys Logic GL523SM and Global Mixed-mode Technology G781.
tested by fgs@ and Stuart Henderson.
Diffstat (limited to 'sys/dev/i2c')
-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 ||