aboutsummaryrefslogtreecommitdiff
path: root/qobject
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-11-17 12:56:33 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-11-17 12:56:33 +0000
commitab135622cf478585bdfcb68b85e4a817d74a0c42 (patch)
treed5e124573a0e20f82558f08814f0bdf40c4e2b8d /qobject
parente1919889ef78144811d8520fa25776fa73feee66 (diff)
downloadqemu-ab135622cf478585bdfcb68b85e4a817d74a0c42.zip
qemu-ab135622cf478585bdfcb68b85e4a817d74a0c42.tar.gz
qemu-ab135622cf478585bdfcb68b85e4a817d74a0c42.tar.bz2
tmp105: Correct handling of temperature limit checks
The TMP105 datasheet says that in Interrupt Mode (when TM==1) the device signals an alert when the temperature equals or exceeds the T_high value and then remains high until a device register is read or the device responds to the SMBUS Alert Response address, or the device is put into Shutdown Mode. Thereafter the Alert pin will only be re-signalled when temperature falls below T_low; alert can then be cleared in the same set of ways, and the device returns to its initial "alert when temperature goes above T_high" mode. (If this textual description is confusing, see figure 3 in the TI datasheet at https://www.ti.com/lit/gpn/tmp105 .) We were misimplementing this as a simple "always alert if temperature is above T_high or below T_low" condition, which gives a spurious alert on startup if using the "T_high = 80 degrees C, T_low = 75 degrees C" reset limit values. Implement the correct (hysteresis) behaviour by tracking whether we are currently looking for the temperature to rise over T_high or for it to fall below T_low. Our implementation of the comparator mode (TM==0) wasn't wrong, but rephrase it to match the way that interrupt mode is now handled for clarity. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-id: 20201110150023.25533-3-peter.maydell@linaro.org
Diffstat (limited to 'qobject')
0 files changed, 0 insertions, 0 deletions