Commit 8ca13674 authored by Jim Cromie's avatar Jim Cromie Committed by Linus Torvalds

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: default avatarJim Cromie <jim.cromie@gmail.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2a32ec25
...@@ -1290,10 +1290,11 @@ static void pc87360_init_device(struct platform_device *pdev, ...@@ -1290,10 +1290,11 @@ static void pc87360_init_device(struct platform_device *pdev,
nr = data->innr < 11 ? data->innr : 11; nr = data->innr < 11 ? data->innr : 11;
for (i = 0; i < nr; i++) { for (i = 0; i < nr; i++) {
if (init >= init_in[i]) {
/* Forcibly enable voltage channel */
reg = pc87360_read_value(data, LD_IN, i, reg = pc87360_read_value(data, LD_IN, i,
PC87365_REG_IN_STATUS); PC87365_REG_IN_STATUS);
dev_dbg(&pdev->dev, "bios in%d status:0x%02x\n", i, reg);
if (init >= init_in[i]) {
/* Forcibly enable voltage channel */
if (!(reg & CHAN_ENA)) { if (!(reg & CHAN_ENA)) {
dev_dbg(&pdev->dev, "Forcibly " dev_dbg(&pdev->dev, "Forcibly "
"enabling in%d\n", i); "enabling in%d\n", i);
...@@ -1306,18 +1307,23 @@ static void pc87360_init_device(struct platform_device *pdev, ...@@ -1306,18 +1307,23 @@ static void pc87360_init_device(struct platform_device *pdev,
/* We can't blindly trust the Super-I/O space configuration bit, /* We can't blindly trust the Super-I/O space configuration bit,
most BIOS won't set it properly */ most BIOS won't set it properly */
dev_dbg(&pdev->dev, "bios thermistors:%d\n", use_thermistors);
for (i = 11; i < data->innr; i++) { for (i = 11; i < data->innr; i++) {
reg = pc87360_read_value(data, LD_IN, i, reg = pc87360_read_value(data, LD_IN, i,
PC87365_REG_TEMP_STATUS); PC87365_REG_TEMP_STATUS);
use_thermistors = use_thermistors || (reg & CHAN_ENA); use_thermistors = use_thermistors || (reg & CHAN_ENA);
/* thermistors are temp[4-6], measured on vin[11-14] */
dev_dbg(&pdev->dev, "bios temp%d_status:0x%02x\n", i-7, reg);
} }
dev_dbg(&pdev->dev, "using thermistors:%d\n", use_thermistors);
i = use_thermistors ? 2 : 0; i = use_thermistors ? 2 : 0;
for (; i < data->tempnr; i++) { for (; i < data->tempnr; i++) {
if (init >= init_temp[i]) {
/* Forcibly enable temperature channel */
reg = pc87360_read_value(data, LD_TEMP, i, reg = pc87360_read_value(data, LD_TEMP, i,
PC87365_REG_TEMP_STATUS); PC87365_REG_TEMP_STATUS);
dev_dbg(&pdev->dev, "bios temp%d_status:0x%02x\n", i+1, reg);
if (init >= init_temp[i]) {
/* Forcibly enable temperature channel */
if (!(reg & CHAN_ENA)) { if (!(reg & CHAN_ENA)) {
dev_dbg(&pdev->dev, "Forcibly " dev_dbg(&pdev->dev, "Forcibly "
"enabling temp%d\n", i+1); "enabling temp%d\n", i+1);
...@@ -1359,6 +1365,7 @@ static void pc87360_init_device(struct platform_device *pdev, ...@@ -1359,6 +1365,7 @@ static void pc87360_init_device(struct platform_device *pdev,
if (data->innr) { if (data->innr) {
reg = pc87360_read_value(data, LD_IN, NO_BANK, reg = pc87360_read_value(data, LD_IN, NO_BANK,
PC87365_REG_IN_CONFIG); PC87365_REG_IN_CONFIG);
dev_dbg(&pdev->dev, "bios vin-cfg:0x%02x\n", reg);
if (reg & CHAN_ENA) { if (reg & CHAN_ENA) {
dev_dbg(&pdev->dev, "Forcibly " dev_dbg(&pdev->dev, "Forcibly "
"enabling monitoring (VLM)\n"); "enabling monitoring (VLM)\n");
...@@ -1371,6 +1378,7 @@ static void pc87360_init_device(struct platform_device *pdev, ...@@ -1371,6 +1378,7 @@ static void pc87360_init_device(struct platform_device *pdev,
if (data->tempnr) { if (data->tempnr) {
reg = pc87360_read_value(data, LD_TEMP, NO_BANK, reg = pc87360_read_value(data, LD_TEMP, NO_BANK,
PC87365_REG_TEMP_CONFIG); PC87365_REG_TEMP_CONFIG);
dev_dbg(&pdev->dev, "bios temp-cfg:0x%02x\n", reg);
if (reg & CHAN_ENA) { if (reg & CHAN_ENA) {
dev_dbg(&pdev->dev, "Forcibly enabling " dev_dbg(&pdev->dev, "Forcibly enabling "
"monitoring (TMS)\n"); "monitoring (TMS)\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment