summaryrefslogtreecommitdiff
path: root/sys/dev/i2c/i2c_scan.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2005-12-30 09:45:21 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2005-12-30 09:45:21 +0000
commit3c7d2c5ea9fed6b853b86213255356dcfeaa2a46 (patch)
tree78164bfe3071990412f4c6efdbbd1320a57901a4 /sys/dev/i2c/i2c_scan.c
parent2ef6b179a49244ff48f356625bf6d7344cbc0280 (diff)
Initial W83791D support for lm(4).
ok krw@
Diffstat (limited to 'sys/dev/i2c/i2c_scan.c')
-rw-r--r--sys/dev/i2c/i2c_scan.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index 7d81340a3cb..0ed2878e12d 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.38 2005/12/30 04:05:30 deraadt Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.39 2005/12/30 09:45:20 kettenis Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -410,18 +410,17 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
addr == 0x4c || addr == 0x4d || addr == 0x4e)) {
name = "adm1021"; /* lots of addresses... bleah */
skip_fc = 1;
- } else if (iicprobe(0x4f) == 0x5c && (iicprobe(0x4e) & 0x80)) {
+ } else if ((iicprobe(0x4f) == 0x5c && (iicprobe(0x4e) & 0x80)) ||
+ (iicprobe(0x4f) == 0xa3 && !(iicprobe(0x4e) & 0x80))) {
/*
* We should toggle 0x4e bit 0x80, then re-read
* 0x4f to see if it is 0xa3 (for Winbond).
*/
switch (iicprobe(0x58)) {
case 0x10:
+ case 0x11: /* rev 2? */
name = "w83781d";
break;
- case 0x11:
- name = "w83781d"; /* rev 2? */
- break;
case 0x21:
name = "w83627hf";
break;
@@ -435,11 +434,9 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
name = "w83783s";
break;
case 0x71:
+ case 0x72: /* rev 2? */
name = "w83791d";
break;
- case 0x72:
- name = "w12345x"; /* unknown chip id */
- break;
case 0x7a:
name = "w83792d";
break;