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 v2 2/3] hwmon: (pmbus/max34440): add support for newer version of max34451
Date: Wed, 22 Jul 2026 09:29:30 +0800 [thread overview]
Message-ID: <20260722-max34451_fixes-v2-2-bbddb18ec1d6@analog.com> (raw)
In-Reply-To: <20260722-max34451_fixes-v2-0-bbddb18ec1d6@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..81514727565f29c7251fe93f049cdd6b0f214f81 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-22 1:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 1:29 [PATCH v2 0/3] hwmon: (pmbus/max34440): Bug fixes and supporting new device Alexis Czezar Torreno
2026-07-22 1:29 ` [PATCH v2 1/3] hwmon: (pmbus/max34440): block unsupported VIN and IIN limit registers Alexis Czezar Torreno
2026-07-22 1:29 ` Alexis Czezar Torreno [this message]
2026-07-23 21:35 ` [PATCH v2 2/3] hwmon: (pmbus/max34440): add support for newer version of max34451 Guenter Roeck
2026-07-22 1:29 ` [PATCH v2 3/3] hwmon: (pmbus/max34440): Add support for MAX34452 Alexis Czezar Torreno
2026-07-23 21:36 ` 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=20260722-max34451_fixes-v2-2-bbddb18ec1d6@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
all inboxes | Powered by JetHome®