aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/lorder/tests
diff options
context:
space:
mode:
authorOlivier Certner <olce@FreeBSD.org>2026-11-24 09:18:14 +0000
committerOlivier Certner <olce@FreeBSD.org>2026-11-25 11:07:41 +0000
commit99cde78e00c2e460d0e10313e14ef6915ff772f0 (patch)
tree29194a27a3d27c97b3cf747947489eb669475f79 /usr.bin/lorder/tests
parent3ab6dae4b469279b7ba5c90b27ba3597e2e8105c (diff)
TMP461 sensor: Fix temperature reading in extended range modeHEADmain
In extended range mode, the temperature's integral part is stored as an unsigned byte offset by 64, not as a signed byte. Stop treating it as a signed value in this case, in particular sign extending it. Doing so would cause temperatures above 128°C (and in particular nearing the maximum operating point of 150°C) to be treated as negative ones, as the sign extension happened after substracting the offset. In the original commit introducing the driver, sign extension was done before, in which case the problem manifested as soon as 64°C. It may have been noticed while introducing support for ADT7461, but was not completely fixed at that time. While here, fix typos in two comments. Reported by: llm-postcr Reviewed by: manu Fixes: f89f6f9581bd ("TMP461: Add thermal sensor driver") Fixes: 6665c7a62839 ("TMP461: Add support for ADT7461 sensor") MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D61976
Diffstat (limited to 'usr.bin/lorder/tests')
0 files changed, 0 insertions, 0 deletions