diff options
author | Jean Delvare <khali@linux-fr.org> | 2008-01-03 15:22:44 -0500 |
---|---|---|
committer | Mark M. Hoffman <mhoffman@lightlink.com> | 2008-02-07 20:39:45 -0500 |
commit | cbe311f2a40b8430d8e01b97c11e9e95d888430b (patch) | |
tree | 0a9d1acbe72c5b29fbe6d11b15b84be489a938f9 | |
parent | 636866b9f0a72583d2361a897668eb19ff37ded6 (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>
-rw-r--r-- | Documentation/hwmon/w83627ehf | 5 | ||||
-rw-r--r-- | drivers/hwmon/w83627ehf.c | 18 |
2 files changed, 11 insertions, 12 deletions
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf index ccc2bcb61068..d6e1ae30fa6e 100644 --- a/Documentation/hwmon/w83627ehf +++ b/Documentation/hwmon/w83627ehf | |||
@@ -23,8 +23,9 @@ W83627DHG super I/O chips. We will refer to them collectively as Winbond chips. | |||
23 | 23 | ||
24 | The chips implement three temperature sensors, five fan rotation | 24 | The chips implement three temperature sensors, five fan rotation |
25 | speed sensors, ten analog voltage sensors (only nine for the 627DHG), one | 25 | speed sensors, ten analog voltage sensors (only nine for the 627DHG), one |
26 | VID (6 pins), alarms with beep warnings (control unimplemented), and | 26 | VID (6 pins for the 627EHF/EHG, 8 pins for the 627DHG), alarms with beep |
27 | some automatic fan regulation strategies (plus manual fan control mode). | 27 | warnings (control unimplemented), and some automatic fan regulation |
28 | strategies (plus manual fan control mode). | ||
28 | 29 | ||
29 | Temperatures are measured in degrees Celsius and measurement resolution is 1 | 30 | Temperatures are measured in degrees Celsius and measurement resolution is 1 |
30 | degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when | 31 | degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when |
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) | |||
1202 | device_remove_file(dev, &sda_temp[i].dev_attr); | 1202 | device_remove_file(dev, &sda_temp[i].dev_attr); |
1203 | 1203 | ||
1204 | device_remove_file(dev, &dev_attr_name); | 1204 | device_remove_file(dev, &dev_attr_name); |
1205 | if (data->vid != 0x3f) | 1205 | device_remove_file(dev, &dev_attr_cpu0_vid); |
1206 | device_remove_file(dev, &dev_attr_cpu0_vid); | ||
1207 | } | 1206 | } |
1208 | 1207 | ||
1209 | /* Get the monitoring functions started */ | 1208 | /* Get the monitoring functions started */ |
@@ -1303,11 +1302,16 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev) | |||
1303 | } | 1302 | } |
1304 | } | 1303 | } |
1305 | 1304 | ||
1306 | data->vid = superio_inb(sio_data->sioreg, SIO_REG_VID_DATA) & 0x3f; | 1305 | data->vid = superio_inb(sio_data->sioreg, SIO_REG_VID_DATA); |
1306 | if (sio_data->kind == w83627ehf) /* 6 VID pins only */ | ||
1307 | data->vid &= 0x3f; | ||
1308 | |||
1309 | err = device_create_file(dev, &dev_attr_cpu0_vid); | ||
1310 | if (err) | ||
1311 | goto exit_release; | ||
1307 | } else { | 1312 | } else { |
1308 | dev_info(dev, "VID pins in output mode, CPU VID not " | 1313 | dev_info(dev, "VID pins in output mode, CPU VID not " |
1309 | "available\n"); | 1314 | "available\n"); |
1310 | data->vid = 0x3f; | ||
1311 | } | 1315 | } |
1312 | 1316 | ||
1313 | /* fan4 and fan5 share some pins with the GPIO and serial flash */ | 1317 | /* 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) | |||
1390 | if (err) | 1394 | if (err) |
1391 | goto exit_remove; | 1395 | goto exit_remove; |
1392 | 1396 | ||
1393 | if (data->vid != 0x3f) { | ||
1394 | err = device_create_file(dev, &dev_attr_cpu0_vid); | ||
1395 | if (err) | ||
1396 | goto exit_remove; | ||
1397 | } | ||
1398 | |||
1399 | data->hwmon_dev = hwmon_device_register(dev); | 1397 | data->hwmon_dev = hwmon_device_register(dev); |
1400 | if (IS_ERR(data->hwmon_dev)) { | 1398 | if (IS_ERR(data->hwmon_dev)) { |
1401 | err = PTR_ERR(data->hwmon_dev); | 1399 | err = PTR_ERR(data->hwmon_dev); |