diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-11-13 17:57:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-11-13 17:57:20 +0000 |
commit | 17359e5bb2a489b4b56a5175f05ace7530e5aabb (patch) | |
tree | a2e30e5eb2f9a51101754aeda5372a1e5f765209 | |
parent | 3baca67d3284059df26e2e50ae3a7b964b322a35 (diff) |
add support for ST's chip since documentation is now available at
http://www.st.com/stonline/products/literature/ds/13448/stts424e02.pdf
as discovered by Gert-Jan Vons.
-rw-r--r-- | share/man/man4/sdtemp.4 | 6 | ||||
-rw-r--r-- | sys/dev/i2c/i2c_scan.c | 6 | ||||
-rw-r--r-- | sys/dev/i2c/sdtemp.c | 5 |
3 files changed, 11 insertions, 6 deletions
diff --git a/share/man/man4/sdtemp.4 b/share/man/man4/sdtemp.4 index a922d7abf28..adfe7eb776e 100644 --- a/share/man/man4/sdtemp.4 +++ b/share/man/man4/sdtemp.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sdtemp.4,v 1.5 2008/04/22 03:28:13 cnst Exp $ +.\" $OpenBSD: sdtemp.4,v 1.6 2008/11/13 17:57:19 deraadt Exp $ .\" .\" Copyright (c) 2008 Theo de Raadt <deraadt@openbsd.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: April 22 2008 $ +.Dd $Mdocdate: November 13 2008 $ .Dt SDTEMP 4 .Os .Sh NAME @@ -29,7 +29,7 @@ driver retrieves temperature sensor information from memory modules which contain sensor chips defined in JEDEC JC-42.4. .Pp Current sensor chips include the NXP SE97, NXP SE98, -Microchip MCP9805, Microchip MCP98242, +Microchip MCP9805, Microchip MCP98242, ST STTS424, and AD ADT7408. .Sh SEE ALSO .Xr iic 4 diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c index e3367fa6215..01cd5885f72 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.127 2008/11/03 00:17:47 cnst Exp $ */ +/* $OpenBSD: i2c_scan.c,v 1.128 2008/11/13 17:57:15 deraadt Exp $ */ /* * Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org> @@ -875,6 +875,10 @@ iic_probe_sensor(struct device *self, u_int8_t addr) (iicprobew(0x07) & 0xfff0) == 0x0800 && iicprobew(0x00) == 0x001d) { name = "adt7408"; + } else if ((addr & 0x18) == 0x18 && iicprobew(0x06) == 0x104a && + (iicprobew(0x07) & 0xfffe) == 0x0000 && + (iicprobew(0x00) == 0x002d || iicprobew(0x00) == 0x002e)) { + name = "stts424e02"; } else if (name == NULL && (addr & 0x78) == 0x48) { /* addr 0b1001xxx */ name = lm75probe(); diff --git a/sys/dev/i2c/sdtemp.c b/sys/dev/i2c/sdtemp.c index ea83ec46dc5..442f77c81bd 100644 --- a/sys/dev/i2c/sdtemp.c +++ b/sys/dev/i2c/sdtemp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdtemp.c,v 1.5 2008/04/17 19:01:48 deraadt Exp $ */ +/* $OpenBSD: sdtemp.c,v 1.6 2008/11/13 17:57:15 deraadt Exp $ */ /* * Copyright (c) 2008 Theo de Raadt @@ -61,7 +61,8 @@ sdtemp_match(struct device *parent, void *match, void *aux) strcmp(ia->ia_name, "se98") == 0 || strcmp(ia->ia_name, "mcp9805") == 0 || strcmp(ia->ia_name, "mcp98242") == 0 || - strcmp(ia->ia_name, "adt7408") == 0) + strcmp(ia->ia_name, "adt7408") == 0 || + strcmp(ia->ia_name, "stts424e02") == 0) return (1); return (0); } |