mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
636866b9f0
commit
cbe311f2a4
|
@ -23,8 +23,9 @@ W83627DHG super I/O chips. We will refer to them collectively as Winbond chips.
|
||||||
|
|
||||||
The chips implement three temperature sensors, five fan rotation
|
The chips implement three temperature sensors, five fan rotation
|
||||||
speed sensors, ten analog voltage sensors (only nine for the 627DHG), one
|
speed sensors, ten analog voltage sensors (only nine for the 627DHG), one
|
||||||
VID (6 pins), alarms with beep warnings (control unimplemented), and
|
VID (6 pins for the 627EHF/EHG, 8 pins for the 627DHG), alarms with beep
|
||||||
some automatic fan regulation strategies (plus manual fan control mode).
|
warnings (control unimplemented), and some automatic fan regulation
|
||||||
|
strategies (plus manual fan control mode).
|
||||||
|
|
||||||
Temperatures are measured in degrees Celsius and measurement resolution is 1
|
Temperatures are measured in degrees Celsius and measurement resolution is 1
|
||||||
degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
|
degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
|
||||||
|
|
|
@ -1202,7 +1202,6 @@ static void w83627ehf_device_remove_files(struct device *dev)
|
||||||
device_remove_file(dev, &sda_temp[i].dev_attr);
|
device_remove_file(dev, &sda_temp[i].dev_attr);
|
||||||
|
|
||||||
device_remove_file(dev, &dev_attr_name);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 {
|
} else {
|
||||||
dev_info(dev, "VID pins in output mode, CPU VID not "
|
dev_info(dev, "VID pins in output mode, CPU VID not "
|
||||||
"available\n");
|
"available\n");
|
||||||
data->vid = 0x3f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fan4 and fan5 share some pins with the GPIO and serial flash */
|
/* 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)
|
if (err)
|
||||||
goto exit_remove;
|
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);
|
data->hwmon_dev = hwmon_device_register(dev);
|
||||||
if (IS_ERR(data->hwmon_dev)) {
|
if (IS_ERR(data->hwmon_dev)) {
|
||||||
err = PTR_ERR(data->hwmon_dev);
|
err = PTR_ERR(data->hwmon_dev);
|
||||||
|
|
Loading…
Reference in New Issue