From 367698317579e7e93ff7e89fdf045b12948574ea Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 27 Dec 2005 21:22:37 +0000 Subject: more paranoid checking for 47m192 --- sys/dev/i2c/i2c_scan.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c index 259341a4fbf..f52d6f8e908 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.23 2005/12/27 19:46:28 deraadt Exp $ */ +/* $OpenBSD: i2c_scan.c,v 1.24 2005/12/27 21:22:36 deraadt Exp $ */ /* * Copyright (c) 2005 Alexander Yurchenko @@ -289,7 +289,9 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr) name = "adm9240"; /* lm87 clone */ break; case 0x55: - if (probe(0x3f) == 0x20) + if (probe(0x3f) == 0x20 && (probe(0x47) & 0x70) == 0x00 && + (probe(0x49) & 0xfe) == 0x80 && + (addr & 0x7c) == 0x2c) name = "47m192"; /* adm1025 compat */ break; case 0x01: -- cgit v1.2.3