Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115503
b: refs/heads/master
c: 5f502a8
h: refs/heads/master
i:
  115501: 880a54c
  115499: e9f37a6
  115495: 7cfaeb1
  115487: 40e6642
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Oct 17, 2008
1 parent 6eb6746 commit 35f86ff
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 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: f65e17086fc141bee1592bbf6e709e9c7a43541b
refs/heads/master: 5f502a834a6471dc3cc456ccef66292e9e3a152e
29 changes: 21 additions & 8 deletions trunk/drivers/hwmon/lm90.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,16 @@ static ssize_t set_temp11(struct device *dev, struct device_attribute *devattr,
mutex_lock(&data->update_lock);
if (data->kind == adt7461)
data->temp11[nr] = TEMP2_TO_REG_ADT7461(val);
else if (data->kind == max6657 || data->kind == max6680)
data->temp11[nr] = TEMP1_TO_REG(val) << 8;
else
data->temp11[nr] = TEMP2_TO_REG(val);

i2c_smbus_write_byte_data(client, reg[(nr - 1) * 2],
data->temp11[nr] >> 8);
i2c_smbus_write_byte_data(client, reg[(nr - 1) * 2 + 1],
data->temp11[nr] & 0xff);
if (data->kind != max6657 && data->kind != max6680)
i2c_smbus_write_byte_data(client, reg[(nr - 1) * 2 + 1],
data->temp11[nr] & 0xff);
mutex_unlock(&data->update_lock);
return count;
}
Expand Down Expand Up @@ -801,12 +805,21 @@ static struct lm90_data *lm90_update_device(struct device *dev)
lm90_read16(client, LM90_REG_R_REMOTE_TEMPH,
LM90_REG_R_REMOTE_TEMPL, &data->temp11[0]);

if (lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH, &h) == 0
&& lm90_read_reg(client, LM90_REG_R_REMOTE_LOWL, &l) == 0)
data->temp11[1] = (h << 8) | l;
if (lm90_read_reg(client, LM90_REG_R_REMOTE_HIGHH, &h) == 0
&& lm90_read_reg(client, LM90_REG_R_REMOTE_HIGHL, &l) == 0)
data->temp11[2] = (h << 8) | l;
if (lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH, &h) == 0) {
data->temp11[1] = h << 8;
if (data->kind != max6657 && data->kind != max6680
&& lm90_read_reg(client, LM90_REG_R_REMOTE_LOWL,
&l) == 0)
data->temp11[1] |= l;
}
if (lm90_read_reg(client, LM90_REG_R_REMOTE_HIGHH, &h) == 0) {
data->temp11[2] = h << 8;
if (data->kind != max6657 && data->kind != max6680
&& lm90_read_reg(client, LM90_REG_R_REMOTE_HIGHL,
&l) == 0)
data->temp11[2] |= l;
}

if (data->kind != max6657) {
if (lm90_read_reg(client, LM90_REG_R_REMOTE_OFFSH,
&h) == 0
Expand Down

0 comments on commit 35f86ff

Please sign in to comment.