From 0da93514badadb8efa5c006e48e4a0f54c1cb253 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 27 Dec 2005 22:49:58 +0000 Subject: correct probe for ds1780 (lm87 clone) --- sys/dev/i2c/i2c_scan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c index 99a44bd2a39..a2f97d453dd 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.27 2005/12/27 22:14:23 deraadt Exp $ */ +/* $OpenBSD: i2c_scan.c,v 1.28 2005/12/27 22:49:57 deraadt Exp $ */ /* * Copyright (c) 2005 Alexander Yurchenko @@ -347,8 +347,8 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr) break; case 0xda: if (probe(0x3f) == 0x01 && probe(0x48) == addr && - probe(0x00) == 0x00) - name = "ds1780"; /* getting desperate! */ + (probe(0x40) & 0x80) == 0x00) + name = "ds1780"; /* lm87 clones */ break; } switch (probe(0x4e)) { -- cgit v1.2.3