diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-09-26 15:24:57 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-09-26 15:24:57 +0000 |
commit | 2878e3d0a9aead5aa39b9497e5f7ab9acef66a6a (patch) | |
tree | 3e5a6447fa58b2825608c8f02c3ad03fec75d259 /sys/dev | |
parent | 3e9df77a9eb942ab239c4f4ed52dd09dbaf8e8fb (diff) |
Don't mask off revision bits for tests against a full
device id/revision id value. Makes it possible for se98 and stts424
sensors to match.
ok deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/i2c/i2c_scan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c index 99d7847f386..b13d0de8a67 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.140 2011/10/07 06:29:43 deraadt Exp $ */ +/* $OpenBSD: i2c_scan.c,v 1.141 2014/09/26 15:24:56 jsg Exp $ */ /* * Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org> @@ -878,7 +878,7 @@ iic_probe_sensor(struct device *self, u_int8_t addr) (iicprobew(0x07) & 0xfffc) == 0xa200) { name = "se97"; /* or se97b */ } else if ((addr & 0x78) == 0x18 && iicprobew(0x06) == 0x1131 && - (iicprobew(0x07) & 0xfffc) == 0xa101 && + (iicprobew(0x07) & 0xfffc) == 0xa100 && (iicprobew(0x00) & 0xfff0) == 0x0010) { name = "se98"; } else if ((addr & 0x78) == 0x18 && iicprobew(0x06) == 0x004d && @@ -910,7 +910,7 @@ iic_probe_sensor(struct device *self, u_int8_t addr) (iicprobew(0x00) == 0x006f)) { name = "stts2002"; } else if ((addr & 0x78) == 0x18 && iicprobew(0x06) == 0x104a && - (iicprobew(0x07) & 0xfffe) == 0x0101 && + (iicprobew(0x07) & 0xffff) == 0x0101 && (iicprobew(0x00) == 0x002d || iicprobew(0x00) == 0x002f)) { name = "stts424"; } else if ((addr & 0x78) == 0x18 && iicprobew(0x06) == 0x1b09 && |