Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285843
b: refs/heads/master
c: 786375f
h: refs/heads/master
i:
  285841: e33490c
  285839: 086fa00
v: v3
  • Loading branch information
Guenter Roeck authored and Jean Delvare committed Jan 16, 2012
1 parent 2bdd175 commit 4b1739b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 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: 662bda28328b983f842f008a81a5fd4e6de6c5fe
refs/heads/master: 786375f7298dcc78a7cf44be9e15fb79bddc6f25
16 changes: 13 additions & 3 deletions trunk/drivers/hwmon/lm63.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,10 @@ struct lm63_data {
s8 temp8[3]; /* 0: local input
1: local high limit
2: remote critical limit */
s16 temp11[3]; /* 0: remote input
s16 temp11[4]; /* 0: remote input
1: remote low limit
2: remote high limit */
2: remote high limit
3: remote offset */
u8 temp2_crit_hyst;
u8 alarms;
};
Expand Down Expand Up @@ -318,11 +319,13 @@ static ssize_t show_temp11(struct device *dev, struct device_attribute *devattr,
static ssize_t set_temp11(struct device *dev, struct device_attribute *devattr,
const char *buf, size_t count)
{
static const u8 reg[4] = {
static const u8 reg[6] = {
LM63_REG_REMOTE_LOW_MSB,
LM63_REG_REMOTE_LOW_LSB,
LM63_REG_REMOTE_HIGH_MSB,
LM63_REG_REMOTE_HIGH_LSB,
LM63_REG_REMOTE_OFFSET_MSB,
LM63_REG_REMOTE_OFFSET_LSB,
};

struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
Expand Down Expand Up @@ -418,6 +421,8 @@ static SENSOR_DEVICE_ATTR(temp2_min, S_IWUSR | S_IRUGO, show_temp11,
set_temp11, 1);
static SENSOR_DEVICE_ATTR(temp2_max, S_IWUSR | S_IRUGO, show_temp11,
set_temp11, 2);
static SENSOR_DEVICE_ATTR(temp2_offset, S_IWUSR | S_IRUGO, show_temp11,
set_temp11, 3);
/*
* On LM63, temp2_crit can be set only once, which should be job
* of the bootloader.
Expand Down Expand Up @@ -445,6 +450,7 @@ static struct attribute *lm63_attributes[] = {
&sensor_dev_attr_temp2_min.dev_attr.attr,
&sensor_dev_attr_temp1_max.dev_attr.attr,
&sensor_dev_attr_temp2_max.dev_attr.attr,
&sensor_dev_attr_temp2_offset.dev_attr.attr,
&sensor_dev_attr_temp2_crit.dev_attr.attr,
&dev_attr_temp2_crit_hyst.attr,

Expand Down Expand Up @@ -668,6 +674,10 @@ static struct lm63_data *lm63_update_device(struct device *dev)
LM63_REG_REMOTE_HIGH_MSB) << 8)
| i2c_smbus_read_byte_data(client,
LM63_REG_REMOTE_HIGH_LSB);
data->temp11[3] = (i2c_smbus_read_byte_data(client,
LM63_REG_REMOTE_OFFSET_MSB) << 8)
| i2c_smbus_read_byte_data(client,
LM63_REG_REMOTE_OFFSET_LSB);
data->temp8[2] = i2c_smbus_read_byte_data(client,
LM63_REG_REMOTE_TCRIT);
data->temp2_crit_hyst = i2c_smbus_read_byte_data(client,
Expand Down

0 comments on commit 4b1739b

Please sign in to comment.