summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2008-01-03 21:22:44 +0100
committerMark M. Hoffman <mhoffman@lightlink.com>2008-02-07 20:39:45 -0500
commitcbe311f2a40b8430d8e01b97c11e9e95d888430b (patch)
tree0a9d1acbe72c5b29fbe6d11b15b84be489a938f9 /drivers/hwmon
parent636866b9f0a72583d2361a897668eb19ff37ded6 (diff)
hwmon: (w83627ehf) The W83627DHG has 8 VID pins
While the W83627EHF/EHG has only 6 VID pins, the W83627DHG has 8 VID pins, to support VRD 11.0. Add support for this. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/w83627ehf.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index 699592855bd8..075164dd65a7 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -1202,8 +1202,7 @@ static void w83627ehf_device_remove_files(struct device *dev)
device_remove_file(dev, &sda_temp[i].dev_attr);
device_remove_file(dev, &dev_attr_name);
- if (data->vid != 0x3f)
- device_remove_file(dev, &dev_attr_cpu0_vid);
+ device_remove_file(dev, &dev_attr_cpu0_vid);
}
/* Get the monitoring functions started */
@@ -1303,11 +1302,16 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev)
}
}
- data->vid = superio_inb(sio_data->sioreg, SIO_REG_VID_DATA) & 0x3f;
+ data->vid = superio_inb(sio_data->sioreg, SIO_REG_VID_DATA);
+ if (sio_data->kind == w83627ehf) /* 6 VID pins only */
+ data->vid &= 0x3f;
+
+ err = device_create_file(dev, &dev_attr_cpu0_vid);
+ if (err)
+ goto exit_release;
} else {
dev_info(dev, "VID pins in output mode, CPU VID not "
"available\n");
- data->vid = 0x3f;
}
/* fan4 and fan5 share some pins with the GPIO and serial flash */
@@ -1390,12 +1394,6 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev)
if (err)
goto exit_remove;
- if (data->vid != 0x3f) {
- err = device_create_file(dev, &dev_attr_cpu0_vid);
- if (err)
- goto exit_remove;
- }
-
data->hwmon_dev = hwmon_device_register(dev);
if (IS_ERR(data->hwmon_dev)) {
err = PTR_ERR(data->hwmon_dev);