summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorxtraeme <xtraeme@NetBSD.org>2007-04-19 20:18:39 +0000
committerxtraeme <xtraeme@NetBSD.org>2007-04-19 20:18:39 +0000
commit7b1f83bdfc2a6796a7db52eb6b76490cd0bdab6a (patch)
tree0d2550988e9ed21b34588136e390dff2c54aa1a1 /sys/dev/ic
parentf93b326c17370373a6f0c1ba55f025ddaa55d232 (diff)
Add more debugging printfs, to see the raw data returned by
the registers.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/nslm7x.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/ic/nslm7x.c b/sys/dev/ic/nslm7x.c
index f9e45304332..a5a90a7cb9b 100644
--- a/sys/dev/ic/nslm7x.c
+++ b/sys/dev/ic/nslm7x.c
@@ -1,4 +1,4 @@
-/* $NetBSD: nslm7x.c,v 1.33 2007/03/13 18:32:35 xtraeme Exp $ */
+/* $NetBSD: nslm7x.c,v 1.34 2007/04/19 20:18:39 xtraeme Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.33 2007/03/13 18:32:35 xtraeme Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.34 2007/04/19 20:18:39 xtraeme Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1931,6 +1931,7 @@ lm_refresh_temp(struct lm_softc *sc, int n)
* sensor is between -55 degC and +125 degC.
*/
sdata = (*sc->lm_readreg)(sc, sc->lm_sensors[n].reg);
+ DPRINTF(("%s: temp[%d] 0x%x\n", __func__, n, data));
if (sdata > 0x7d && sdata < 0xc9) {
INVALIDATE_SENSOR(n);
} else {
@@ -1963,6 +1964,7 @@ lm_refresh_fanrpm(struct lm_softc *sc, int n)
}
data = (*sc->lm_readreg)(sc, sc->lm_sensors[n].reg);
+ DPRINTF(("%s: fan[%d] 0x%x\n", __func__, n, data));
if (data == 0xff || data == 0x00) {
INVALIDATE_SENSOR(n);
} else {
@@ -1997,7 +1999,7 @@ wb_w83637hf_refresh_vcore(struct lm_softc *sc, int n)
int data;
data = (*sc->lm_readreg)(sc, sc->lm_sensors[n].reg);
-
+ DPRINTF(("%s: volt[%d] 0x%x\n", __func__, n, data));
/*
* Depending on the voltage detection method,
* one of the following formulas is used:
@@ -2016,6 +2018,7 @@ wb_refresh_nvolt(struct lm_softc *sc, int n)
int data;
data = (*sc->lm_readreg)(sc, sc->lm_sensors[n].reg);
+ DPRINTF(("%s: volt[%d] 0x%x\n", __func__, n , data));
sc->sensors[n].cur.data_s = ((data << 4) - WB_VREF);
sc->sensors[n].cur.data_s *= sc->lm_sensors[n].rfact;
sc->sensors[n].cur.data_s /= 10;
@@ -2028,6 +2031,7 @@ wb_w83627ehf_refresh_nvolt(struct lm_softc *sc, int n)
int data;
data = (*sc->lm_readreg)(sc, sc->lm_sensors[n].reg);
+ DPRINTF(("%s: volt[%d] 0x%x\n", __func__, n , data));
sc->sensors[n].cur.data_s = ((data << 3) - WB_W83627EHF_VREF);
sc->sensors[n].cur.data_s *= RFACT(232, 10);
sc->sensors[n].cur.data_s /= 10;
@@ -2048,6 +2052,7 @@ wb_refresh_temp(struct lm_softc *sc, int n)
*/
sdata = (*sc->lm_readreg)(sc, sc->lm_sensors[n].reg) << 1;
sdata += (*sc->lm_readreg)(sc, sc->lm_sensors[n].reg + 1) >> 7;
+ DPRINTF(("%s: temp[%d] 0x%x\n", __func__, n , sdata));
if (sdata > 0x0fa && sdata < 0x1a6) {
INVALIDATE_SENSOR(n);
} else {
@@ -2097,6 +2102,7 @@ wb_refresh_fanrpm(struct lm_softc *sc, int n)
}
data = (*sc->lm_readreg)(sc, sc->lm_sensors[n].reg);
+ DPRINTF(("%s: fan[%d] 0x%x\n", __func__, n , data));
if (data == 0xff || data == 0x00) {
INVALIDATE_SENSOR(n);
} else {
@@ -2140,6 +2146,7 @@ wb_w83792d_refresh_fanrpm(struct lm_softc *sc, int n)
}
data = (*sc->lm_readreg)(sc, sc->lm_sensors[n].reg);
+ DPRINTF(("%s: fan[%d] 0x%x\n", __func__, n , data));
if (data == 0xff || data == 0x00) {
INVALIDATE_SENSOR(n);
} else {
@@ -2161,6 +2168,7 @@ as_refresh_temp(struct lm_softc *sc, int n)
*/
sdata = (*sc->lm_readreg)(sc, sc->lm_sensors[n].reg) << 1;
sdata += (*sc->lm_readreg)(sc, sc->lm_sensors[n].reg + 1) >> 7;
+ DPRINTF(("%s: temp[%d] 0x%x\n", __func__, n , data));
if (sdata == 0x1ff) {
INVALIDATE_SENSOR(n);
} else {