From: "William A. Kennington III" <william@wkennington.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "Alexis Czezar Torreno" <alexisczezar.torreno@analog.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Andrew Davis" <afd@ti.com>,
"Carlos Jones Jr" <carlosjr.jones@analog.com>,
"Kees Cook" <kees+treewide@kernel.org>,
linux-hwmon@vger.kernel.org,
"William A. Kennington III" <william@wkennington.com>
Subject: [PATCH] hwmon: (pmbus/max34440): Do not treat ASCII MFR_REVISION as MAX34451ETNA6+
Date: Sat, 28 Nov 2026 02:52:23 +0000 [thread overview]
Message-ID: <20261128025223.2680033-1-william@wkennington.com> (raw)
Per the MAX34451 datasheet, legacy MAX34451 parts return two ISO/IEC
8859-1 characters in MFR_REVISION (0x9b). On an NPCM730 BMC, both
MAX34451 devices (MFR_ID 0x4d, MFR_MODEL 0x59) return 0x3236.
Comparing rv >= MAX34451ETNA6_MFR_REV (0x0012) and rv >=
MAX34451ETNA8_MFR_REV (0x0014) without checking the upper byte
misidentifies these legacy chips as MAX34451ETNA8+. That switches
PSC_VOLTAGE_OUT from 1 mV/LSB to 8 mV/LSB, reporting every voltage
rail 8x too high, and exposes unsupported VIN channels reading -8 mV.
Require rv < 0x0100 before applying the ETNA6+/ETNA8+ quirks. Tested
on that hardware: the voltage rails read 1x again and the bogus VIN
channels disappear.
Fixes: 19932f844f3f ("hwmon: (pmbus/max34440) Fix support for max34451")
Fixes: 596f410c05b1 ("hwmon: (pmbus/max34440): add support for newer version of max34451")
Signed-off-by: William A. Kennington III <william@wkennington.com>
---
drivers/hwmon/pmbus/max34440.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/pmbus/max34440.c b/drivers/hwmon/pmbus/max34440.c
index b59e9fd42401..390dc32f6f41 100644
--- a/drivers/hwmon/pmbus/max34440.c
+++ b/drivers/hwmon/pmbus/max34440.c
@@ -352,7 +352,14 @@ static int max34451_set_supported_funcs(struct i2c_client *client,
if (rv < 0)
return rv;
- if (data->id == max34451 && rv >= MAX34451ETNA6_MFR_REV) {
+ /*
+ * Legacy MAX34451 parts report MFR_REVISION (0x9b) as two ISO/IEC
+ * 8859-1 characters (e.g. 0x3236), whereas MAX34451ETNA6+ / ETNA8+
+ * use single-byte binary revisions 0x0012 / 0x0014. Require a zero
+ * upper byte so legacy parts keep 1 mV/LSB scaling and do not
+ * expose unsupported VIN/IIN channels.
+ */
+ if (data->id == max34451 && rv >= MAX34451ETNA6_MFR_REV && rv < 0x0100) {
max34451_na6 = true;
data->info.format[PSC_VOLTAGE_IN] = direct;
data->info.format[PSC_CURRENT_IN] = direct;
next reply other threads:[~2026-11-28 2:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 2:52 William A. Kennington III [this message]
2026-11-28 2:55 ` [PATCH] hwmon: (pmbus/max34440): Do not treat ASCII MFR_REVISION as MAX34451ETNA6+ sashiko-bot
2026-11-28 10:35 ` Guenter Roeck
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=20261128025223.2680033-1-william@wkennington.com \
--to=william@wkennington.com \
--cc=afd@ti.com \
--cc=alexisczezar.torreno@analog.com \
--cc=carlosjr.jones@analog.com \
--cc=kees+treewide@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=u.kleine-koenig@baylibre.com \
/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.