aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2014-04-20 11:07:42 -0400
committerGuenter Roeck <linux@roeck-us.net>2014-05-21 19:02:20 -0400
commit50bf46509f24c914562b4d818a155d8dc8f45e10 (patch)
tree5e1e777ca2f6b49361a3dbd3b080bb1ef9131606 /Documentation/hwmon
parent9f9edcd4c32bf33255f8db7329c78a99baa94585 (diff)
hwmon: (lm77) Do not preserve hysteresis when updating critical temp limit
Updating the hysteresis value when updating the critical temperature limit was following the rule of 'least surprise'. However, it had the undesirable side effect of changing the hysteresis for all other attributes, which defeats the purpose of least surprise. In addition, it could result in invalid hysteresis values if the resulting hysteresis was too large. In such cases the resulting hysteresis ended up changed anyway, which again defeats the purpose. So drop that code and document the new behavior. Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'Documentation/hwmon')
-rw-r--r--Documentation/hwmon/lm7720
1 files changed, 18 insertions, 2 deletions
diff --git a/Documentation/hwmon/lm77 b/Documentation/hwmon/lm77
index 57c3a46d6370..bfc915fe3639 100644
--- a/Documentation/hwmon/lm77
+++ b/Documentation/hwmon/lm77
@@ -18,5 +18,21 @@ sensor incorporates a band-gap type temperature sensor,
1810-bit ADC, and a digital comparator with user-programmable upper 1810-bit ADC, and a digital comparator with user-programmable upper
19and lower limit values. 19and lower limit values.
20 20
21Limits can be set through the Overtemperature Shutdown register and 21The LM77 implements 3 limits: low (temp1_min), high (temp1_max) and
22Hysteresis register. 22critical (temp1_crit.) It also implements an hysteresis mechanism which
23applies to all 3 limits. The relative difference is stored in a single
24register on the chip, which means that the relative difference between
25the limit and its hysteresis is always the same for all 3 limits.
26
27This implementation detail implies the following:
28* When setting a limit, its hysteresis will automatically follow, the
29 difference staying unchanged. For example, if the old critical limit
30 was 80 degrees C, and the hysteresis was 75 degrees C, and you change
31 the critical limit to 90 degrees C, then the hysteresis will
32 automatically change to 85 degrees C.
33* All 3 hysteresis can't be set independently. We decided to make
34 temp1_crit_hyst writable, while temp1_min_hyst and temp1_max_hyst are
35 read-only. Setting temp1_crit_hyst writes the difference between
36 temp1_crit_hyst and temp1_crit into the chip, and the same relative
37 hysteresis applies automatically to the low and high limits.
38* The limits should be set before the hysteresis.