summaryrefslogtreecommitdiff
path: root/sys/dev/i2c/adm1021.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-12-24 22:08:18 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-12-24 22:08:18 +0000
commit76321b6afb30361768e0605d340eca7d4aa85f8e (patch)
treecf17a6170e182248902392e57064370d4fdb1dca /sys/dev/i2c/adm1021.c
parentd2dcd87a01aaff97e11789e84567c14f9104b6a9 (diff)
handle embedded xeon temperature probes. yes, you got it -- i2c wires
coming off the processor... for an embedded adm1021 on the chip. only the "external" temperature is valid, the other one is disabled.
Diffstat (limited to 'sys/dev/i2c/adm1021.c')
-rw-r--r--sys/dev/i2c/adm1021.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/i2c/adm1021.c b/sys/dev/i2c/adm1021.c
index 3d4924a55ed..3f7e223b61a 100644
--- a/sys/dev/i2c/adm1021.c
+++ b/sys/dev/i2c/adm1021.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1021.c,v 1.3 2005/12/24 19:41:45 deraadt Exp $ */
+/* $OpenBSD: adm1021.c,v 1.4 2005/12/24 22:08:17 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -63,7 +63,8 @@ admtemp_match(struct device *parent, void *match, void *aux)
{
struct i2c_attach_args *ia = aux;
- if (strcmp(ia->ia_name, "adm1021") == 0) {
+ if (strcmp(ia->ia_name, "adm1021") == 0 ||
+ strcmp(ia->ia_name, "xeon") == 0) {
/*
* should also ensure that
* config & 0x80 == 0x00
@@ -113,6 +114,8 @@ admtemp_attach(struct device *parent, struct device *self, void *aux)
sc->sc_sensor[ADMTEMP_INT].type = SENSOR_TEMP;
strlcpy(sc->sc_sensor[ADMTEMP_INT].desc, "Internal",
sizeof(sc->sc_sensor[ADMTEMP_INT].desc));
+ if (ia->ia_name && strcmp(ia->ia_name, "xeon") == 0)
+ sc->sc_sensor[ADMTEMP_INT].flags |= SENSOR_FINVALID;
sc->sc_sensor[ADMTEMP_EXT].type = SENSOR_TEMP;
strlcpy(sc->sc_sensor[ADMTEMP_EXT].desc, "External",