Commit ade1271a authored by Mark M. Hoffman's avatar Mark M. Hoffman Committed by Greg Kroah-Hartman

[PATCH] I2C: add alternate VCORE calculations for w83627thf and w83637hf

Pick a VRM (for VID interpretation) based on the VRM & OVT config,
if available.  Props to Jean Delvare <khali@linux-fr.org> for the
idea & code fragment.
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent dece0b32
...@@ -1275,12 +1275,15 @@ static void w83627hf_init_client(struct i2c_client *client) ...@@ -1275,12 +1275,15 @@ static void w83627hf_init_client(struct i2c_client *client)
} }
/* Read VRM & OVT Config only once */ /* Read VRM & OVT Config only once */
if (w83627thf == data->type || w83637hf == data->type) if (w83627thf == data->type || w83637hf == data->type) {
data->vrm_ovt = data->vrm_ovt =
w83627hf_read_value(client, W83627THF_REG_VRM_OVT_CFG); w83627hf_read_value(client, W83627THF_REG_VRM_OVT_CFG);
data->vrm = (data->vrm_ovt & 0x01) ? 90 : 82;
} else {
/* Convert VID to voltage based on default VRM */
data->vrm = DEFAULT_VRM;
}
/* Convert VID to voltage based on default VRM */
data->vrm = DEFAULT_VRM;
if (type != w83697hf) if (type != w83697hf)
vid = vid_from_reg(vid, data->vrm); vid = vid_from_reg(vid, data->vrm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment