diff options
author | Guenter Roeck <linux@roeck-us.net> | 2014-05-12 14:25:47 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2014-05-21 19:02:24 -0400 |
commit | a9a74006867e23ad310c6a0dd5cb8fdec5ae3520 (patch) | |
tree | 8d8f3be35e2070b5cc538eb946afe537b221d044 | |
parent | ceeaa70c0fa7fbf30a0c7a2b07dc895de22583c9 (diff) |
hwmon: (emc1403) Add support for max_hyst attributes
The hysteresis value applies to all limits, so add support for
tempX_max_hyst.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r-- | drivers/hwmon/emc1403.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c index c62bc044a660..9ee057776f96 100644 --- a/drivers/hwmon/emc1403.c +++ b/drivers/hwmon/emc1403.c | |||
@@ -173,6 +173,7 @@ static SENSOR_DEVICE_ATTR_2(temp1_max_alarm, S_IRUGO, | |||
173 | show_bit, NULL, 0x35, 0x01); | 173 | show_bit, NULL, 0x35, 0x01); |
174 | static SENSOR_DEVICE_ATTR_2(temp1_crit_alarm, S_IRUGO, | 174 | static SENSOR_DEVICE_ATTR_2(temp1_crit_alarm, S_IRUGO, |
175 | show_bit, NULL, 0x37, 0x01); | 175 | show_bit, NULL, 0x37, 0x01); |
176 | static SENSOR_DEVICE_ATTR(temp1_max_hyst, S_IRUGO, show_hyst, NULL, 0x05); | ||
176 | static SENSOR_DEVICE_ATTR(temp1_crit_hyst, S_IRUGO | S_IWUSR, | 177 | static SENSOR_DEVICE_ATTR(temp1_crit_hyst, S_IRUGO | S_IWUSR, |
177 | show_hyst, store_hyst, 0x20); | 178 | show_hyst, store_hyst, 0x20); |
178 | 179 | ||
@@ -190,6 +191,7 @@ static SENSOR_DEVICE_ATTR_2(temp2_max_alarm, S_IRUGO, | |||
190 | show_bit, NULL, 0x35, 0x02); | 191 | show_bit, NULL, 0x35, 0x02); |
191 | static SENSOR_DEVICE_ATTR_2(temp2_crit_alarm, S_IRUGO, | 192 | static SENSOR_DEVICE_ATTR_2(temp2_crit_alarm, S_IRUGO, |
192 | show_bit, NULL, 0x37, 0x02); | 193 | show_bit, NULL, 0x37, 0x02); |
194 | static SENSOR_DEVICE_ATTR(temp2_max_hyst, S_IRUGO, show_hyst, NULL, 0x07); | ||
193 | static SENSOR_DEVICE_ATTR(temp2_crit_hyst, S_IRUGO, show_hyst, NULL, 0x19); | 195 | static SENSOR_DEVICE_ATTR(temp2_crit_hyst, S_IRUGO, show_hyst, NULL, 0x19); |
194 | 196 | ||
195 | static SENSOR_DEVICE_ATTR(temp3_min, S_IRUGO | S_IWUSR, | 197 | static SENSOR_DEVICE_ATTR(temp3_min, S_IRUGO | S_IWUSR, |
@@ -206,6 +208,7 @@ static SENSOR_DEVICE_ATTR_2(temp3_max_alarm, S_IRUGO, | |||
206 | show_bit, NULL, 0x35, 0x04); | 208 | show_bit, NULL, 0x35, 0x04); |
207 | static SENSOR_DEVICE_ATTR_2(temp3_crit_alarm, S_IRUGO, | 209 | static SENSOR_DEVICE_ATTR_2(temp3_crit_alarm, S_IRUGO, |
208 | show_bit, NULL, 0x37, 0x04); | 210 | show_bit, NULL, 0x37, 0x04); |
211 | static SENSOR_DEVICE_ATTR(temp3_max_hyst, S_IRUGO, show_hyst, NULL, 0x15); | ||
209 | static SENSOR_DEVICE_ATTR(temp3_crit_hyst, S_IRUGO, show_hyst, NULL, 0x1A); | 212 | static SENSOR_DEVICE_ATTR(temp3_crit_hyst, S_IRUGO, show_hyst, NULL, 0x1A); |
210 | 213 | ||
211 | static SENSOR_DEVICE_ATTR(temp4_min, S_IRUGO | S_IWUSR, | 214 | static SENSOR_DEVICE_ATTR(temp4_min, S_IRUGO | S_IWUSR, |
@@ -222,6 +225,7 @@ static SENSOR_DEVICE_ATTR_2(temp4_max_alarm, S_IRUGO, | |||
222 | show_bit, NULL, 0x35, 0x08); | 225 | show_bit, NULL, 0x35, 0x08); |
223 | static SENSOR_DEVICE_ATTR_2(temp4_crit_alarm, S_IRUGO, | 226 | static SENSOR_DEVICE_ATTR_2(temp4_crit_alarm, S_IRUGO, |
224 | show_bit, NULL, 0x37, 0x08); | 227 | show_bit, NULL, 0x37, 0x08); |
228 | static SENSOR_DEVICE_ATTR(temp4_max_hyst, S_IRUGO, show_hyst, NULL, 0x2C); | ||
225 | static SENSOR_DEVICE_ATTR(temp4_crit_hyst, S_IRUGO, show_hyst, NULL, 0x30); | 229 | static SENSOR_DEVICE_ATTR(temp4_crit_hyst, S_IRUGO, show_hyst, NULL, 0x30); |
226 | 230 | ||
227 | static SENSOR_DEVICE_ATTR_2(power_state, S_IRUGO | S_IWUSR, | 231 | static SENSOR_DEVICE_ATTR_2(power_state, S_IRUGO | S_IWUSR, |
@@ -232,12 +236,14 @@ static struct attribute *emc1402_attrs[] = { | |||
232 | &sensor_dev_attr_temp1_max.dev_attr.attr, | 236 | &sensor_dev_attr_temp1_max.dev_attr.attr, |
233 | &sensor_dev_attr_temp1_crit.dev_attr.attr, | 237 | &sensor_dev_attr_temp1_crit.dev_attr.attr, |
234 | &sensor_dev_attr_temp1_input.dev_attr.attr, | 238 | &sensor_dev_attr_temp1_input.dev_attr.attr, |
239 | &sensor_dev_attr_temp1_max_hyst.dev_attr.attr, | ||
235 | &sensor_dev_attr_temp1_crit_hyst.dev_attr.attr, | 240 | &sensor_dev_attr_temp1_crit_hyst.dev_attr.attr, |
236 | 241 | ||
237 | &sensor_dev_attr_temp2_min.dev_attr.attr, | 242 | &sensor_dev_attr_temp2_min.dev_attr.attr, |
238 | &sensor_dev_attr_temp2_max.dev_attr.attr, | 243 | &sensor_dev_attr_temp2_max.dev_attr.attr, |
239 | &sensor_dev_attr_temp2_crit.dev_attr.attr, | 244 | &sensor_dev_attr_temp2_crit.dev_attr.attr, |
240 | &sensor_dev_attr_temp2_input.dev_attr.attr, | 245 | &sensor_dev_attr_temp2_input.dev_attr.attr, |
246 | &sensor_dev_attr_temp2_max_hyst.dev_attr.attr, | ||
241 | &sensor_dev_attr_temp2_crit_hyst.dev_attr.attr, | 247 | &sensor_dev_attr_temp2_crit_hyst.dev_attr.attr, |
242 | 248 | ||
243 | &sensor_dev_attr_power_state.dev_attr.attr, | 249 | &sensor_dev_attr_power_state.dev_attr.attr, |
@@ -266,6 +272,7 @@ static struct attribute *emc1403_attrs[] = { | |||
266 | &sensor_dev_attr_temp3_min_alarm.dev_attr.attr, | 272 | &sensor_dev_attr_temp3_min_alarm.dev_attr.attr, |
267 | &sensor_dev_attr_temp3_max_alarm.dev_attr.attr, | 273 | &sensor_dev_attr_temp3_max_alarm.dev_attr.attr, |
268 | &sensor_dev_attr_temp3_crit_alarm.dev_attr.attr, | 274 | &sensor_dev_attr_temp3_crit_alarm.dev_attr.attr, |
275 | &sensor_dev_attr_temp3_max_hyst.dev_attr.attr, | ||
269 | &sensor_dev_attr_temp3_crit_hyst.dev_attr.attr, | 276 | &sensor_dev_attr_temp3_crit_hyst.dev_attr.attr, |
270 | NULL | 277 | NULL |
271 | }; | 278 | }; |
@@ -283,6 +290,7 @@ static struct attribute *emc1404_attrs[] = { | |||
283 | &sensor_dev_attr_temp4_min_alarm.dev_attr.attr, | 290 | &sensor_dev_attr_temp4_min_alarm.dev_attr.attr, |
284 | &sensor_dev_attr_temp4_max_alarm.dev_attr.attr, | 291 | &sensor_dev_attr_temp4_max_alarm.dev_attr.attr, |
285 | &sensor_dev_attr_temp4_crit_alarm.dev_attr.attr, | 292 | &sensor_dev_attr_temp4_crit_alarm.dev_attr.attr, |
293 | &sensor_dev_attr_temp4_max_hyst.dev_attr.attr, | ||
286 | &sensor_dev_attr_temp4_crit_hyst.dev_attr.attr, | 294 | &sensor_dev_attr_temp4_crit_hyst.dev_attr.attr, |
287 | NULL | 295 | NULL |
288 | }; | 296 | }; |