summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcnst <cnst@openbsd.org>2007-10-11 20:48:21 +0000
committercnst <cnst@openbsd.org>2007-10-11 20:48:21 +0000
commitd58ac4cd195eafa1fae2ee2b57826e07ba52e96d (patch)
treeadf6bccc1cd9c436d91c4b06302ea73cc36ff808
parentOSPFv3 runs on links not on networks so there is no need for a mask in the (diff)
downloadwireguard-openbsd-d58ac4cd195eafa1fae2ee2b57826e07ba52e96d.tar.xz
wireguard-openbsd-d58ac4cd195eafa1fae2ee2b57826e07ba52e96d.zip
probe for Winbond W83793G; tested by jon.steel@esentire.com; suggestions/ok deraadt@
-rw-r--r--sys/dev/i2c/i2c_scan.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index 3571ea4c933..b78b2ced439 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.102 2007/10/09 16:57:47 deraadt Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.103 2007/10/11 20:48:21 cnst Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -764,6 +764,14 @@ iic_probe_sensor(struct device *self, struct i2cbus_attach_args *iba, u_int8_t a
} else if (addr == 0x2e && iicprobe(0x4e) == 0x70 &&
iicprobe(0x4c) == 0xa3 && iicprobe(0x4d) == 0x5c) {
name = "w83l785ts-l";
+ } else if (addr >= 0x2c && addr <= 0x2f &&
+ addr * 2 == iicprobe(0x0b) &&
+ (iicprobe(0x0c) & 0x40) && !(iicprobe(0x0c) & 0x04) &&
+ iicprobe(0x0e) == 0x7b &&
+ (iicprobe(0x0f) == 0x11 || iicprobe(0x0f) == 0x12) &&
+ ((iicprobe(0x0d) == 0x5c && (iicprobe(0x00) & 0x80)) ||
+ (iicprobe(0x0d) == 0xa3 && !(iicprobe(0x00) & 0x80)))) {
+ name = "w83793g";
} else if (addr >= 0x28 && addr <= 0x2f &&
iicprobe(0x4f) == 0x12 && (iicprobe(0x4e) & 0x80)) {
/*