From: sashiko-bot@kernel.org
To: "Christopher de Guzman" <christopher.deguzman@analog.com>
Cc: linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 2/4] hwmon: (pmbus/ltc2978) Add support for LT7175 and LT7176P
Date: Tue, 10 Nov 2026 10:14:08 +0000 [thread overview]
Message-ID: <sashiko-outbox-206843@kernel.org> (raw)
In-Reply-To: <20261110-upstream-lt7175-lt7176p-v2-2-dd60d28383bf@analog.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] hwmon: (pmbus/ltc2978) IEEE-754 peaks compared as LINEAR11 in
ltc_get_max()
--
commit 201c09e7f06ead2d62e423cba00a536dde067159
Author: Christopher de Guzman <christopher.deguzman@analog.com>
hwmon: (pmbus/ltc2978) Add support for LT7175 and LT7176P
This commit adds support for the LT7175 and LT7176P PMBus buck regulators
and matches PMBUS_IC_DEVICE_ID strings against ltc2978_id[] for the LT7170
family.
> diff --git a/drivers/hwmon/pmbus/ltc2978.c b/drivers/hwmon/pmbus/ltc2978.c
> index aea7b6c93e74b..888db3213a01e 100644
> --- a/drivers/hwmon/pmbus/ltc2978.c
> +++ b/drivers/hwmon/pmbus/ltc2978.c
[ ... ]
> @@ -762,6 +763,8 @@ static int ltc2978_probe(struct i2c_client *client)
> switch (data->id) {
> case lt7170:
> case lt7171:
> + case lt7175:
> + case lt7176p:
> data->features |= FEAT_CLEAR_PEAKS | FEAT_NEEDS_POLLING;
> info->read_word_data = ltc3883_read_word_data;
> info->pages = LTC3883_NUM_PAGES;
[Severity: Medium]
Does routing lt7175 and lt7176p (along with lt7170 and lt7171) through
ltc3883_read_word_data() corrupt peak readings when the data format is
ieee754?
ltc3883_read_word_data() -> ltc3880_read_word_data() ->
ltc2978_read_word_data_common() reads PMBUS_VIRT_READ_IOUT_MAX,
PMBUS_VIRT_READ_VIN_MAX, and PMBUS_VIRT_READ_TEMP_MAX via ltc_get_max():
drivers/hwmon/pmbus/ltc2978.c:ltc_get_max() {
...
ret = ltc_read_word_data(client, page, 0xff, reg);
if (ret >= 0) {
if (lin11_to_val(ret) > lin11_to_val(*pmax))
*pmax = ret;
ret = *pmax;
}
...
}
lin11_to_val() treats bit 10 as the two's-complement mantissa sign bit.
In IEEE-754 binary16, bit 10 is the least-significant bit of the biased
exponent, so positive values with an odd biased exponent (such as
temperatures in [64, 128) C or voltages in [16, 32) V) decode as negative
and are discarded in favor of smaller readings with an even biased
exponent.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110-upstream-lt7175-lt7176p-v2-0-dd60d28383bf@analog.com?part=2
next prev parent reply other threads:[~2026-11-10 10:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 10:00 [PATCH v2 0/4] hwmon: (pmbus/ltc2978) Add support for LT7175 and LT7176P Christopher de Guzman
2026-11-10 10:00 ` [PATCH v2 1/4] dt-bindings: hwmon: ltc2978: " Christopher de Guzman
2026-11-10 10:03 ` sashiko-bot
2026-11-11 12:05 ` Krzysztof Kozlowski
2026-11-10 10:00 ` [PATCH v2 2/4] hwmon: (pmbus/ltc2978) " Christopher de Guzman
2026-11-10 10:14 ` sashiko-bot [this message]
2026-11-10 10:00 ` [PATCH v2 3/4] hwmon: ltc2978: Document LT7175 and LT7176P support Christopher de Guzman
2026-11-10 10:18 ` sashiko-bot
2026-11-10 10:00 ` [PATCH v2 4/4] hwmon: ltc2978: Remove LT7170 and LT7171 from curr1 iin documentation Christopher de Guzman
2026-11-10 10:18 ` sashiko-bot
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-206843@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=christopher.deguzman@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=robh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.