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>

authored by Jean Delvare and committed by Mark M. Hoffman cbe311f2 636866b9

+11 -12
+3 -2
Documentation/hwmon/w83627ehf
··· 23 24 The chips implement three temperature sensors, five fan rotation 25 speed sensors, ten analog voltage sensors (only nine for the 627DHG), one 26 - VID (6 pins), alarms with beep warnings (control unimplemented), and 27 - some automatic fan regulation strategies (plus manual fan control mode). 28 29 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
··· 23 24 The chips implement three temperature sensors, five fan rotation 25 speed sensors, ten analog voltage sensors (only nine for the 627DHG), one 26 + VID (6 pins for the 627EHF/EHG, 8 pins for the 627DHG), alarms with beep 27 + warnings (control unimplemented), and some automatic fan regulation 28 + strategies (plus manual fan control mode). 29 30 Temperatures are measured in degrees Celsius and measurement resolution is 1 31 degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
+8 -10
drivers/hwmon/w83627ehf.c
··· 1202 device_remove_file(dev, &sda_temp[i].dev_attr); 1203 1204 device_remove_file(dev, &dev_attr_name); 1205 - if (data->vid != 0x3f) 1206 - device_remove_file(dev, &dev_attr_cpu0_vid); 1207 } 1208 1209 /* Get the monitoring functions started */ ··· 1302 } 1303 } 1304 1305 - data->vid = superio_inb(sio_data->sioreg, SIO_REG_VID_DATA) & 0x3f; 1306 } else { 1307 dev_info(dev, "VID pins in output mode, CPU VID not " 1308 "available\n"); 1309 - data->vid = 0x3f; 1310 } 1311 1312 /* fan4 and fan5 share some pins with the GPIO and serial flash */ ··· 1393 err = device_create_file(dev, &dev_attr_name); 1394 if (err) 1395 goto exit_remove; 1396 - 1397 - if (data->vid != 0x3f) { 1398 - err = device_create_file(dev, &dev_attr_cpu0_vid); 1399 - if (err) 1400 - goto exit_remove; 1401 - } 1402 1403 data->hwmon_dev = hwmon_device_register(dev); 1404 if (IS_ERR(data->hwmon_dev)) {
··· 1202 device_remove_file(dev, &sda_temp[i].dev_attr); 1203 1204 device_remove_file(dev, &dev_attr_name); 1205 + device_remove_file(dev, &dev_attr_cpu0_vid); 1206 } 1207 1208 /* Get the monitoring functions started */ ··· 1303 } 1304 } 1305 1306 + data->vid = superio_inb(sio_data->sioreg, SIO_REG_VID_DATA); 1307 + if (sio_data->kind == w83627ehf) /* 6 VID pins only */ 1308 + data->vid &= 0x3f; 1309 + 1310 + err = device_create_file(dev, &dev_attr_cpu0_vid); 1311 + if (err) 1312 + goto exit_release; 1313 } else { 1314 dev_info(dev, "VID pins in output mode, CPU VID not " 1315 "available\n"); 1316 } 1317 1318 /* fan4 and fan5 share some pins with the GPIO and serial flash */ ··· 1389 err = device_create_file(dev, &dev_attr_name); 1390 if (err) 1391 goto exit_remove; 1392 1393 data->hwmon_dev = hwmon_device_register(dev); 1394 if (IS_ERR(data->hwmon_dev)) {