Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220493
b: refs/heads/master
c: c1a792a
h: refs/heads/master
i:
  220491: 478ffa6
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Oct 28, 2010
1 parent 20ba37f commit f5ac851
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 02728ffef9c2cf067e654e832b8c282a8a4d0b16
refs/heads/master: c1a792a6eea42d88a99e6ace215b22fbdb76c7b6
11 changes: 9 additions & 2 deletions trunk/drivers/hwmon/w83795.c
Original file line number Diff line number Diff line change
Expand Up @@ -1986,6 +1986,9 @@ static int w83795_probe(struct i2c_client *client,
data->in[i][IN_READ] = tmp;
}
for (i = 0; i < IN_LSB_REG_NUM; i++) {
if ((i == 2 && data->chip_type == w83795adg) ||
(i >= 4 && !(data->has_in & (1 << (i + 11)))))
continue;
data->in_lsb[i][IN_MAX] =
w83795_read(client, IN_LSB_REG(i, IN_MAX));
data->in_lsb[i][IN_LOW] =
Expand All @@ -1995,13 +1998,17 @@ static int w83795_probe(struct i2c_client *client,

/* First update fan and limits */
for (i = 0; i < ARRAY_SIZE(data->fan); i++) {
/* Each register contains LSB for 2 fans, but we want to
* read it only once to save time */
if ((i & 1) == 0 && (data->has_fan & (3 << i)))
tmp = w83795_read(client, W83795_REG_FAN_MIN_LSB(i));

if (!(data->has_fan & (1 << i)))
continue;
data->fan_min[i] =
w83795_read(client, W83795_REG_FAN_MIN_HL(i)) << 4;
data->fan_min[i] |=
(w83795_read(client, W83795_REG_FAN_MIN_LSB(i)) >>
W83795_REG_FAN_MIN_LSB_SHIFT(i)) & 0x0F;
(tmp >> W83795_REG_FAN_MIN_LSB_SHIFT(i)) & 0x0F;
data->fan[i] = w83795_read(client, W83795_REG_FAN(i)) << 4;
data->fan[i] |=
(w83795_read(client, W83795_REG_VRLSB) >> 4) & 0x0F;
Expand Down

0 comments on commit f5ac851

Please sign in to comment.