From: Alexis Czezar Torreno <alexisczezar.torreno@analog.com>
To: "Guenter Roeck" <linux@roeck-us.net>, "Kun Yi" <kunyi@google.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Shuah Khan" <skhan@linuxfoundation.org>
Cc: <linux-hwmon@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-doc@vger.kernel.org>,
Alexis Czezar Torreno <alexisczezar.torreno@analog.com>
Subject: [PATCH 2/3] hwmon: (pmbus/max34440): add support for newer version of max34451
Date: Thu, 16 Jul 2026 16:25:12 +0800 [thread overview]
Message-ID: <20260716-max34451_fixes-v1-2-a941b27eaecb@analog.com> (raw)
In-Reply-To: <20260716-max34451_fixes-v1-0-a941b27eaecb@analog.com>
The MAX34451 released a newer version called max34451etna8+.
This simply changes the direct format coefficients
Signed-off-by: Alexis Czezar Torreno <alexisczezar.torreno@analog.com>
---
drivers/hwmon/pmbus/max34440.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/drivers/hwmon/pmbus/max34440.c b/drivers/hwmon/pmbus/max34440.c
index e56057e9273c1639bddbaf4e665ea159f1d7c3ed..024109df26db568a4c230c9dbc45d69ba531dd8d 100644
--- a/drivers/hwmon/pmbus/max34440.c
+++ b/drivers/hwmon/pmbus/max34440.c
@@ -59,6 +59,7 @@ enum chips {
#define MAX34440_IOUT_OC_FAULT_LIMIT 0x4A
#define MAX34451ETNA6_MFR_REV 0x0012
+#define MAX34451ETNA8_MFR_REV 0x0014
#define MAX34451_MFR_CHANNEL_CONFIG 0xe4
#define MAX34451_MFR_CHANNEL_CONFIG_SEL_MASK 0x3f
@@ -343,12 +344,24 @@ static int max34451_set_supported_funcs(struct i2c_client *client,
max34451_na6 = true;
data->info.format[PSC_VOLTAGE_IN] = direct;
data->info.format[PSC_CURRENT_IN] = direct;
- data->info.m[PSC_VOLTAGE_IN] = 1;
+
data->info.b[PSC_VOLTAGE_IN] = 0;
- data->info.R[PSC_VOLTAGE_IN] = 3;
- data->info.m[PSC_CURRENT_IN] = 1;
data->info.b[PSC_CURRENT_IN] = 0;
- data->info.R[PSC_CURRENT_IN] = 2;
+ if (rv == MAX34451ETNA8_MFR_REV) {
+ data->info.m[PSC_VOLTAGE_IN] = 125;
+ data->info.R[PSC_VOLTAGE_IN] = 0;
+ data->info.m[PSC_VOLTAGE_OUT] = 125;
+ data->info.R[PSC_VOLTAGE_OUT] = 0;
+ data->info.m[PSC_CURRENT_IN] = 250;
+ data->info.R[PSC_CURRENT_IN] = -1;
+ data->info.m[PSC_CURRENT_OUT] = 250;
+ data->info.R[PSC_CURRENT_OUT] = -1;
+ } else {
+ data->info.m[PSC_VOLTAGE_IN] = 1;
+ data->info.R[PSC_VOLTAGE_IN] = 3;
+ data->info.m[PSC_CURRENT_IN] = 1;
+ data->info.R[PSC_CURRENT_IN] = 2;
+ }
data->iout_oc_fault_limit = PMBUS_IOUT_OC_FAULT_LIMIT;
data->iout_oc_warn_limit = PMBUS_IOUT_OC_WARN_LIMIT;
}
--
2.34.1
next prev parent reply other threads:[~2026-07-16 8:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 8:25 [PATCH 0/3] hwmon: (pmbus/max34440): Bug fixes and supporting new device Alexis Czezar Torreno
2026-07-16 8:25 ` [PATCH 1/3] hwmon: (pmbus/max34440): block unsupported VIN and IIN limit registers Alexis Czezar Torreno
2026-07-19 13:53 ` Guenter Roeck
2026-07-16 8:25 ` Alexis Czezar Torreno [this message]
2026-07-16 8:25 ` [PATCH 3/3] hwmon: (pmbus/max34440): Add support for MAX34452 Alexis Czezar Torreno
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=20260716-max34451_fixes-v1-2-a941b27eaecb@analog.com \
--to=alexisczezar.torreno@analog.com \
--cc=corbet@lwn.net \
--cc=kunyi@google.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=nuno.sa@analog.com \
--cc=skhan@linuxfoundation.org \
/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