Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16675
b: refs/heads/master
c: dd149c5
h: refs/heads/master
i:
  16673: 9f6d3c0
  16671: 8b1aac2
v: v3
  • Loading branch information
Yuan Mu authored and Greg Kroah-Hartman committed Jan 6, 2006
1 parent 3be33da commit 015c751
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9c516ef496c857aa4b1b41dc313010f11d39c496
refs/heads/master: dd149c52223cfb05cdefb0755d3c2793e8d33ede
16 changes: 7 additions & 9 deletions trunk/drivers/hwmon/w83627hf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,11 +1122,10 @@ static int w83627hf_detect(struct i2c_adapter *adapter)
if (kind != w83697hf)
device_create_file_temp(new_client, 3);

if (kind != w83697hf)
if (kind != w83697hf && data->vid != 0xff) {
device_create_file_vid(new_client);

if (kind != w83697hf)
device_create_file_vrm(new_client);
}

device_create_file_fan_div(new_client, 1);
device_create_file_fan_div(new_client, 2);
Expand Down Expand Up @@ -1232,7 +1231,7 @@ static int w83627thf_read_gpio5(struct i2c_client *client)

/* Make sure the pins are configured for input
There must be at least five (VRM 9), and possibly 6 (VRM 10) */
sel = superio_inb(W83627THF_GPIO5_IOSR);
sel = superio_inb(W83627THF_GPIO5_IOSR) & 0x3f;
if ((sel & 0x1f) != 0x1f) {
dev_dbg(&client->dev, "GPIO5 not configured for VID "
"function\n");
Expand Down Expand Up @@ -1323,19 +1322,18 @@ static void w83627hf_init_client(struct i2c_client *client)
int hi = w83627hf_read_value(client, W83781D_REG_CHIPID);
data->vid = (lo & 0x0f) | ((hi & 0x01) << 4);
} else if (w83627thf == data->type) {
data->vid = w83627thf_read_gpio5(client) & 0x3f;
data->vid = w83627thf_read_gpio5(client);
}

/* Read VRM & OVT Config only once */
if (w83627thf == data->type || w83637hf == data->type) {
data->vrm_ovt =
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 = vid_which_vrm();
}

/* Convert VID to voltage based on VRM */
data->vrm = vid_which_vrm();

tmp = w83627hf_read_value(client, W83781D_REG_SCFG1);
for (i = 1; i <= 3; i++) {
if (!(tmp & BIT_SCFG1[i - 1])) {
Expand Down

0 comments on commit 015c751

Please sign in to comment.