summaryrefslogtreecommitdiffstats
path: root/sys/dev/i2c
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2006-03-22 21:03:40 +0000
committerkettenis <kettenis@openbsd.org>2006-03-22 21:03:40 +0000
commit31ba72dc76755bb5064eeb0c4d89dbcf9b724354 (patch)
treede3c4657ec94f0694c94ea0b53dc911dce1067a7 /sys/dev/i2c
parentearlier asprintf diff caused malloc in signal handler. clarify the (diff)
downloadwireguard-openbsd-31ba72dc76755bb5064eeb0c4d89dbcf9b724354.tar.xz
wireguard-openbsd-31ba72dc76755bb5064eeb0c4d89dbcf9b724354.zip
Detect newer revisions of the LM81.
Diffstat (limited to 'sys/dev/i2c')
-rw-r--r--sys/dev/i2c/i2c_scan.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index 64520af5029..b31b7f9c0fa 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.79 2006/03/19 18:19:35 deraadt Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.80 2006/03/22 21:03:40 kettenis Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -447,7 +447,8 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
name = "lm85"; /* lm85C/B == adt7460 compat */
else if ((addr & 0x7c) == 0x2c && /* addr 0b01011xx */
iicprobe(0x48) == addr &&
- iicprobe(0x3f) == 0x03 && (iicprobe(0x40) & 0x80) == 0x00)
+ (iicprobe(0x3f) == 0x03 || iicprobe(0x3f) == 0x04) &&
+ (iicprobe(0x40) & 0x80) == 0x00)
name = "lm81";
break;
case 0x49: /* Texas Instruments */