aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pc87360.c
diff options
context:
space:
mode:
authorJim Cromie <jim.cromie@gmail.com>2008-10-18 23:27:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 11:52:35 -0400
commit8ca136741e15e8546e787ae92a7f4aeca84be494 (patch)
tree4a4ef66ef5ec1eb14ed5181d12bf4ace064e6d19 /drivers/hwmon/pc87360.c
parent2a32ec2500514109754e07721d9d5d431a706a31 (diff)
hwmon/pc87360 separate alarm files: add dev_dbg help
temp and vin status register values may be set by chip specifications, set again by bios, or by this previously loaded driver. Debug output nicely displays modprobe init=\d actions. Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/hwmon/pc87360.c')
-rw-r--r--drivers/hwmon/pc87360.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/hwmon/pc87360.c b/drivers/hwmon/pc87360.c
index 7153b630ad4c..6804a3570f39 100644
--- a/drivers/hwmon/pc87360.c
+++ b/drivers/hwmon/pc87360.c
@@ -1290,10 +1290,11 @@ static void pc87360_init_device(struct platform_device *pdev,
1290 1290
1291 nr = data->innr < 11 ? data->innr : 11; 1291 nr = data->innr < 11 ? data->innr : 11;
1292 for (i = 0; i < nr; i++) { 1292 for (i = 0; i < nr; i++) {
1293 reg = pc87360_read_value(data, LD_IN, i,
1294 PC87365_REG_IN_STATUS);
1295 dev_dbg(&pdev->dev, "bios in%d status:0x%02x\n", i, reg);
1293 if (init >= init_in[i]) { 1296 if (init >= init_in[i]) {
1294 /* Forcibly enable voltage channel */ 1297 /* Forcibly enable voltage channel */
1295 reg = pc87360_read_value(data, LD_IN, i,
1296 PC87365_REG_IN_STATUS);
1297 if (!(reg & CHAN_ENA)) { 1298 if (!(reg & CHAN_ENA)) {
1298 dev_dbg(&pdev->dev, "Forcibly " 1299 dev_dbg(&pdev->dev, "Forcibly "
1299 "enabling in%d\n", i); 1300 "enabling in%d\n", i);
@@ -1306,18 +1307,23 @@ static void pc87360_init_device(struct platform_device *pdev,
1306 1307
1307 /* We can't blindly trust the Super-I/O space configuration bit, 1308 /* We can't blindly trust the Super-I/O space configuration bit,
1308 most BIOS won't set it properly */ 1309 most BIOS won't set it properly */
1310 dev_dbg(&pdev->dev, "bios thermistors:%d\n", use_thermistors);
1309 for (i = 11; i < data->innr; i++) { 1311 for (i = 11; i < data->innr; i++) {
1310 reg = pc87360_read_value(data, LD_IN, i, 1312 reg = pc87360_read_value(data, LD_IN, i,
1311 PC87365_REG_TEMP_STATUS); 1313 PC87365_REG_TEMP_STATUS);
1312 use_thermistors = use_thermistors || (reg & CHAN_ENA); 1314 use_thermistors = use_thermistors || (reg & CHAN_ENA);
1315 /* thermistors are temp[4-6], measured on vin[11-14] */
1316 dev_dbg(&pdev->dev, "bios temp%d_status:0x%02x\n", i-7, reg);
1313 } 1317 }
1318 dev_dbg(&pdev->dev, "using thermistors:%d\n", use_thermistors);
1314 1319
1315 i = use_thermistors ? 2 : 0; 1320 i = use_thermistors ? 2 : 0;
1316 for (; i < data->tempnr; i++) { 1321 for (; i < data->tempnr; i++) {
1322 reg = pc87360_read_value(data, LD_TEMP, i,
1323 PC87365_REG_TEMP_STATUS);
1324 dev_dbg(&pdev->dev, "bios temp%d_status:0x%02x\n", i+1, reg);
1317 if (init >= init_temp[i]) { 1325 if (init >= init_temp[i]) {
1318 /* Forcibly enable temperature channel */ 1326 /* Forcibly enable temperature channel */
1319 reg = pc87360_read_value(data, LD_TEMP, i,
1320 PC87365_REG_TEMP_STATUS);
1321 if (!(reg & CHAN_ENA)) { 1327 if (!(reg & CHAN_ENA)) {
1322 dev_dbg(&pdev->dev, "Forcibly " 1328 dev_dbg(&pdev->dev, "Forcibly "
1323 "enabling temp%d\n", i+1); 1329 "enabling temp%d\n", i+1);
@@ -1359,6 +1365,7 @@ static void pc87360_init_device(struct platform_device *pdev,
1359 if (data->innr) { 1365 if (data->innr) {
1360 reg = pc87360_read_value(data, LD_IN, NO_BANK, 1366 reg = pc87360_read_value(data, LD_IN, NO_BANK,
1361 PC87365_REG_IN_CONFIG); 1367 PC87365_REG_IN_CONFIG);
1368 dev_dbg(&pdev->dev, "bios vin-cfg:0x%02x\n", reg);
1362 if (reg & CHAN_ENA) { 1369 if (reg & CHAN_ENA) {
1363 dev_dbg(&pdev->dev, "Forcibly " 1370 dev_dbg(&pdev->dev, "Forcibly "
1364 "enabling monitoring (VLM)\n"); 1371 "enabling monitoring (VLM)\n");
@@ -1371,6 +1378,7 @@ static void pc87360_init_device(struct platform_device *pdev,
1371 if (data->tempnr) { 1378 if (data->tempnr) {
1372 reg = pc87360_read_value(data, LD_TEMP, NO_BANK, 1379 reg = pc87360_read_value(data, LD_TEMP, NO_BANK,
1373 PC87365_REG_TEMP_CONFIG); 1380 PC87365_REG_TEMP_CONFIG);
1381 dev_dbg(&pdev->dev, "bios temp-cfg:0x%02x\n", reg);
1374 if (reg & CHAN_ENA) { 1382 if (reg & CHAN_ENA) {
1375 dev_dbg(&pdev->dev, "Forcibly enabling " 1383 dev_dbg(&pdev->dev, "Forcibly enabling "
1376 "monitoring (TMS)\n"); 1384 "monitoring (TMS)\n");