diff options
-rw-r--r-- | Documentation/hwmon/emc1403 | 7 | ||||
-rw-r--r-- | drivers/hwmon/emc1403.c | 9 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Documentation/hwmon/emc1403 b/Documentation/hwmon/emc1403 index b109e35e2385..a869b0ef6a9d 100644 --- a/Documentation/hwmon/emc1403 +++ b/Documentation/hwmon/emc1403 | |||
@@ -51,6 +51,9 @@ This implementation detail implies the following: | |||
51 | was 80 degrees C, and the hysteresis was 75 degrees C, and you change | 51 | was 80 degrees C, and the hysteresis was 75 degrees C, and you change |
52 | the critical limit to 90 degrees C, then the hysteresis will | 52 | the critical limit to 90 degrees C, then the hysteresis will |
53 | automatically change to 85 degrees C. | 53 | automatically change to 85 degrees C. |
54 | * While hysteresis limits can be set for all critical limits, setting a single | 54 | * The hysteresis values can't be set independently. We decided to make |
55 | hysteresis value affects the hysteresis values for all limits on all sensors. | 55 | only temp1_crit_hyst writable, while all other hysteresis attributes |
56 | are read-only. Setting temp1_crit_hyst writes the difference between | ||
57 | temp1_crit_hyst and temp1_crit into the chip, and the same relative | ||
58 | hysteresis applies automatically to all other limits. | ||
56 | * The limits should be set before the hysteresis. | 59 | * The limits should be set before the hysteresis. |
diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c index f76e5503b89a..46220b131153 100644 --- a/drivers/hwmon/emc1403.c +++ b/drivers/hwmon/emc1403.c | |||
@@ -195,8 +195,7 @@ static SENSOR_DEVICE_ATTR_2(temp2_max_alarm, S_IRUGO, | |||
195 | show_bit, NULL, 0x35, 0x02); | 195 | show_bit, NULL, 0x35, 0x02); |
196 | static SENSOR_DEVICE_ATTR_2(temp2_crit_alarm, S_IRUGO, | 196 | static SENSOR_DEVICE_ATTR_2(temp2_crit_alarm, S_IRUGO, |
197 | show_bit, NULL, 0x37, 0x02); | 197 | show_bit, NULL, 0x37, 0x02); |
198 | static SENSOR_DEVICE_ATTR(temp2_crit_hyst, S_IRUGO | S_IWUSR, | 198 | static SENSOR_DEVICE_ATTR(temp2_crit_hyst, S_IRUGO, show_hyst, NULL, 0x19); |
199 | show_hyst, store_hyst, 0x19); | ||
200 | 199 | ||
201 | static SENSOR_DEVICE_ATTR(temp3_min, S_IRUGO | S_IWUSR, | 200 | static SENSOR_DEVICE_ATTR(temp3_min, S_IRUGO | S_IWUSR, |
202 | show_temp, store_temp, 0x16); | 201 | show_temp, store_temp, 0x16); |
@@ -212,8 +211,7 @@ static SENSOR_DEVICE_ATTR_2(temp3_max_alarm, S_IRUGO, | |||
212 | show_bit, NULL, 0x35, 0x04); | 211 | show_bit, NULL, 0x35, 0x04); |
213 | static SENSOR_DEVICE_ATTR_2(temp3_crit_alarm, S_IRUGO, | 212 | static SENSOR_DEVICE_ATTR_2(temp3_crit_alarm, S_IRUGO, |
214 | show_bit, NULL, 0x37, 0x04); | 213 | show_bit, NULL, 0x37, 0x04); |
215 | static SENSOR_DEVICE_ATTR(temp3_crit_hyst, S_IRUGO | S_IWUSR, | 214 | static SENSOR_DEVICE_ATTR(temp3_crit_hyst, S_IRUGO, show_hyst, NULL, 0x1A); |
216 | show_hyst, store_hyst, 0x1A); | ||
217 | 215 | ||
218 | static SENSOR_DEVICE_ATTR(temp4_min, S_IRUGO | S_IWUSR, | 216 | static SENSOR_DEVICE_ATTR(temp4_min, S_IRUGO | S_IWUSR, |
219 | show_temp, store_temp, 0x2D); | 217 | show_temp, store_temp, 0x2D); |
@@ -229,8 +227,7 @@ static SENSOR_DEVICE_ATTR_2(temp4_max_alarm, S_IRUGO, | |||
229 | show_bit, NULL, 0x35, 0x08); | 227 | show_bit, NULL, 0x35, 0x08); |
230 | static SENSOR_DEVICE_ATTR_2(temp4_crit_alarm, S_IRUGO, | 228 | static SENSOR_DEVICE_ATTR_2(temp4_crit_alarm, S_IRUGO, |
231 | show_bit, NULL, 0x37, 0x08); | 229 | show_bit, NULL, 0x37, 0x08); |
232 | static SENSOR_DEVICE_ATTR(temp4_crit_hyst, S_IRUGO | S_IWUSR, | 230 | static SENSOR_DEVICE_ATTR(temp4_crit_hyst, S_IRUGO, show_hyst, NULL, 0x30); |
233 | show_hyst, store_hyst, 0x30); | ||
234 | 231 | ||
235 | static SENSOR_DEVICE_ATTR_2(power_state, S_IRUGO | S_IWUSR, | 232 | static SENSOR_DEVICE_ATTR_2(power_state, S_IRUGO | S_IWUSR, |
236 | show_bit, store_bit, 0x03, 0x40); | 233 | show_bit, store_bit, 0x03, 0x40); |