mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-03 13:38:25 +00:00
Make sure that temp2 and temp3 are not disabled. Let's just hope
it won't cause trouble if these channels are actually not connected. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2872 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
a0a471c8c5
commit
d3fa22cae3
1 file changed
+22
@@ -924,6 +924,28 @@ static void w83627hf_init_client(struct i2c_client *client)
|
||||
data->pwmenable[2] = 1;
|
||||
|
||||
if(init) {
|
||||
/* Enable temp2 */
|
||||
tmp = w83627hf_read_value(client, W83781D_REG_TEMP2_CONFIG);
|
||||
if (tmp & 0x01) {
|
||||
printk(KERN_WARNING "w83627hf: temp2 was disabled, "
|
||||
"readings might not make sense\n");
|
||||
w83627hf_write_value(client, W83781D_REG_TEMP2_CONFIG,
|
||||
tmp & 0xfe);
|
||||
}
|
||||
|
||||
/* Enable temp3 */
|
||||
if (type != w83697hf) {
|
||||
tmp = w83627hf_read_value(client,
|
||||
W83781D_REG_TEMP3_CONFIG);
|
||||
if (tmp & 0x01) {
|
||||
printk(KERN_WARNING "w83627hf: temp3 was "
|
||||
"disabled, readings might not make "
|
||||
"sense\n");
|
||||
w83627hf_write_value(client,
|
||||
W83781D_REG_TEMP3_CONFIG, tmp & 0xfe);
|
||||
}
|
||||
}
|
||||
|
||||
if (type == w83627hf) {
|
||||
/* enable PWM2 control (can't hurt since PWM reg
|
||||
should have been reset to 0xff) */
|
||||
|
||||
Reference in new issue
Block a user