From: sashiko-bot@kernel.org
To: "Christopher de Guzman" <christopher.deguzman@analog.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH] hwmon: (pmbus/ltc2978) Fix peak comparison for IEEE-754 chips
Date: Mon, 23 Nov 2026 07:01:33 +0000 [thread overview]
Message-ID: <sashiko-outbox-228790@kernel.org> (raw)
In-Reply-To: <20261123-ltc2978-ieee754-peak-fix-v1-1-96cbe686ab67@analog.com>
> The LT7170, LT7171, LT7175 and LT7176P report their sensor values in
> IEEE-754 half-precision format, but ltc_get_max() and ltc_get_min()
> compare peak values with lin11_to_val(), which decodes LINEAR11. Bit 10
> is the lowest exponent bit in binary16, while LINEAR11 treats it as the
> mantissa sign bit. Positive values with an odd biased exponent, such as
> temperatures from 16 to 31 C or input voltages from 4 to 8 V, are
> therefore decoded as negative, and the reported peak stops following
> the real one.
>
> The peak start values have the same problem: 0x7c00 is the lowest
> LINEAR11 value, but it is +infinity in binary16.
>
> Add a FEAT_IEEE754 flag for these chips. Compare binary16 values as
> sign-magnitude integers, and start peak maximums at -infinity (0xfc00)
> and peak minimums at +infinity (0x7c00). The min attributes are not
> exposed for these chips, but the min path is fixed as well for
> consistency.
>
> Tested on an LT7171-1: after stepping VIN from 3.3 V to 5 V and back,
> in1_highest now reports 4992 mV instead of staying at 3294 mV.
>
> Fixes: c1d6afdbb8ed ("hwmon: (pmbus/ltc2978) add support for lt717x")
> Reported-by: sashiko-bot <sashiko-bot@kernel.org>
> Closes: https://lore.kernel.org/all/sashiko-outbox-206843@kernel.org/
> Signed-off-by: Christopher de Guzman <christopher.deguzman@analog.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123-ltc2978-ieee754-peak-fix-v1-1-96cbe686ab67@analog.com?part=1
prev parent reply other threads:[~2026-11-23 7:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 6:52 [PATCH] hwmon: (pmbus/ltc2978) Fix peak comparison for IEEE-754 chips Christopher de Guzman
2026-11-23 7:01 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-228790@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=christopher.deguzman@analog.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox