summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-01-07 18:27:47 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-01-07 18:27:47 +0000
commit8110d28b54513281971214d7227dfcc0ff933183 (patch)
treebc154b1c87aeddc5f8270defe4b897b209184dd6 /sys
parentb3f266ca412dc47853a5d3de203358fb6cca7eaf (diff)
fcu fans are PWM, express as %; from murenin
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/i2c/fcu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/i2c/fcu.c b/sys/dev/i2c/fcu.c
index d588f06af4e..ba4dbd0e81d 100644
--- a/sys/dev/i2c/fcu.c
+++ b/sys/dev/i2c/fcu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fcu.c,v 1.4 2006/12/23 17:46:39 deraadt Exp $ */
+/* $OpenBSD: fcu.c,v 1.5 2007/01/07 18:27:46 deraadt Exp $ */
/*
* Copyright (c) 2005 Mark Kettenis
@@ -93,7 +93,7 @@ fcu_attach(struct device *parent, struct device *self, void *aux)
for (i = 0; i < FCU_FANS; i++)
sc->sc_sensor[i].type = SENSOR_FANRPM;
for (i = 0; i < FCU_PWMS; i++) {
- sc->sc_sensor[FCU_PWM1 + i].type = SENSOR_FANRPM;
+ sc->sc_sensor[FCU_PWM1 + i].type = SENSOR_PERCENT;
strlcpy(sc->sc_sensor[FCU_PWM1 + i].desc, "PWM",
sizeof(sc->sc_sensor[FCU_PWM1 + i].desc));
}
@@ -170,7 +170,7 @@ fcu_refresh(void *arg)
sc->sc_sensor[FCU_PWM1 + i].flags |= SENSOR_FINVALID;
continue;
}
- sc->sc_sensor[FCU_PWM1 + i].value = (fan[0] * 1000) / 2559;
+ sc->sc_sensor[FCU_PWM1 + i].value = (fan[0] * 100 * 1000) / 255;
}
abort: