From 57a68908fa56260bd124a1be1ab679678a3a34fd Mon Sep 17 00:00:00 2001 From: "Constantine A. Murenin" Date: Fri, 10 Jul 2009 00:17:31 +0000 Subject: support onsemi's cat34ts02 and cat6095; ok deraadt --- sys/dev/i2c/i2c_scan.c | 6 +++++- sys/dev/i2c/sdtemp.c | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c index 5709b57583a..33894dfeeea 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.131 2009/03/14 06:31:48 deraadt Exp $ */ +/* $OpenBSD: i2c_scan.c,v 1.132 2009/07/10 00:17:30 cnst Exp $ */ /* * Copyright (c) 2005 Theo de Raadt @@ -879,6 +879,10 @@ iic_probe_sensor(struct device *self, u_int8_t addr) (iicprobew(0x07) & 0xfffe) == 0x0000 && (iicprobew(0x00) == 0x002d || iicprobew(0x00) == 0x002e)) { name = "stts424e02"; + } else if ((addr & 0x18) == 0x18 && iicprobew(0x06) == 0x1b09 && + (iicprobew(0x07) & 0xffe0) == 0x0800 && + iicprobew(0x00) == 0x001f) { + name = "cat34ts02"; /* or cat6095 */ } 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 f245001ac0a..42d61b95983 100644 --- a/sys/dev/i2c/sdtemp.c +++ b/sys/dev/i2c/sdtemp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdtemp.c,v 1.9 2009/07/10 00:07:37 cnst Exp $ */ +/* $OpenBSD: sdtemp.c,v 1.10 2009/07/10 00:17:30 cnst Exp $ */ /* * Copyright (c) 2008 Theo de Raadt @@ -61,7 +61,8 @@ sdtemp_match(struct device *parent, void *match, void *aux) strcmp(ia->ia_name, "mcp9805") == 0 || strcmp(ia->ia_name, "mcp98242") == 0 || strcmp(ia->ia_name, "adt7408") == 0 || - strcmp(ia->ia_name, "stts424e02") == 0) + strcmp(ia->ia_name, "stts424e02") == 0 || + strcmp(ia->ia_name, "cat34ts02") == 0) return (1); return (0); } -- cgit v1.2.3