From: Debjit Ghosh <dghosh@juniper.net>
To: <linux@roeck-us.net>, <linux-hwmon@vger.kernel.org>
Cc: <corbet@lwn.net>, <skhan@linuxfoundation.org>,
<rdunlap@infradead.org>, <robh@kernel.org>, <krzk+dt@kernel.org>,
<conor+dt@kernel.org>, <linux-doc@vger.kernel.org>,
<devicetree@vger.kernel.org>, <debjit.ghosh@hpe.com>
Subject: [PATCH v3 1/3] hwmon: (max20751): Add support for MAX20754
Date: Tue, 1 Dec 2026 17:27:42 -0800 [thread overview]
Message-ID: <20261202012744.2802478-2-dghosh@juniper.net> (raw)
In-Reply-To: <20261202012744.2802478-1-dghosh@juniper.net>
From: Georgi Vlaev <gvlaev@juniper.net>
MAX20754 is a dual output, configurable multiphase power controller with
internal buck converter with PMBus(1.3).
Signed-off-by: Georgi Vlaev <gvlaev@juniper.net>
Signed-off-by: Debjit Ghosh <debjit.ghosh@hpe.com>
---
Changes in v3:
- drop max20754 Documentation/hwmon/index.rst as it would prompt a
warning when doing 'make htmldocs'
Changes in v2:
- add documenting the max20754 in the Kconfig help text
- add documentation of sysfs entries specific to max20754 in
Documentation/hwmon/max20751.rst
Documentation/hwmon/max20751.rst | 24 ++++++++++++++-
drivers/hwmon/pmbus/Kconfig | 2 +-
drivers/hwmon/pmbus/max20751.c | 50 ++++++++++++++++++++++----------
3 files changed, 59 insertions(+), 17 deletions(-)
diff --git a/Documentation/hwmon/max20751.rst b/Documentation/hwmon/max20751.rst
index f9febefce02d..9ae457355f0e 100644
--- a/Documentation/hwmon/max20751.rst
+++ b/Documentation/hwmon/max20751.rst
@@ -13,13 +13,21 @@ Supported chips:
Application note: https://pdfserv.maximintegrated.com/en/an/AN5941.pdf
+ * maxim MAX20754
+
+ Prefix: 'max20754'
+
+ Addresses scanned: -
+
+ Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/MAX20754.pdf
+
Author: Guenter Roeck <linux@roeck-us.net>
Description
-----------
-This driver supports MAX20751 Multiphase Master with PMBus Interface
+This driver supports MAX20751 and MAX20754 Multiphase Master with PMBus Interface
and Internal Buck Converter.
The driver is a client driver to the core PMBus driver.
@@ -78,7 +86,21 @@ temp1_max Maximum temperature.
temp1_crit Critical high temperature.
temp1_max_alarm Chip temperature high alarm.
temp1_crit_alarm Chip temperature critical high alarm.
+======================= =======================================================
+- MAX20754 only:
+
+======================= =======================================================
+temp2_input Measured temperature at TSx input.
+temp2_max Maximum temperature.
+temp2_crit Critical temp2 high temperature.
+temp2_max_alarm Chip temp2 temperature high alarm.
+temp2_crit_alarm Chip temp2 temperature critical high alarm.
+======================= =======================================================
+
+- MAX20751 only:
+
+======================= =======================================================
power1_input Output power.
power1_label "pout1"
======================= =======================================================
diff --git a/drivers/hwmon/pmbus/Kconfig b/drivers/hwmon/pmbus/Kconfig
index 391d49ecfe4e..edeea6cc2f16 100644
--- a/drivers/hwmon/pmbus/Kconfig
+++ b/drivers/hwmon/pmbus/Kconfig
@@ -397,7 +397,7 @@ config SENSORS_MAX20751
tristate "Maxim MAX20751"
help
If you say yes here you get hardware monitoring support for Maxim
- MAX20751.
+ MAX20751 and MAX20754.
This driver can also be built as a module. If so, the module will
be called max20751.
diff --git a/drivers/hwmon/pmbus/max20751.c b/drivers/hwmon/pmbus/max20751.c
index e85676433dca..92103ca5b575 100644
--- a/drivers/hwmon/pmbus/max20751.c
+++ b/drivers/hwmon/pmbus/max20751.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
- * Hardware monitoring driver for Maxim MAX20751
+ * Hardware monitoring driver for Maxim MAX20751, MAX20754
*
* Copyright (c) 2015 Guenter Roeck
*/
@@ -12,27 +12,47 @@
#include <linux/i2c.h>
#include "pmbus.h"
-static struct pmbus_driver_info max20751_info = {
- .pages = 1,
- .format[PSC_VOLTAGE_IN] = linear,
- .format[PSC_VOLTAGE_OUT] = vid,
- .vrm_version[0] = vr12,
- .format[PSC_TEMPERATURE] = linear,
- .format[PSC_CURRENT_OUT] = linear,
- .format[PSC_POWER] = linear,
- .func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT |
- PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
- PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP |
- PMBUS_HAVE_POUT,
+enum chips { max20751, max20754 };
+
+static struct pmbus_driver_info max20751_info[] = {
+ [max20751] = {
+ .pages = 1,
+ .format[PSC_VOLTAGE_IN] = linear,
+ .format[PSC_VOLTAGE_OUT] = vid,
+ .vrm_version[0] = vr12,
+ .format[PSC_TEMPERATURE] = linear,
+ .format[PSC_CURRENT_OUT] = linear,
+ .format[PSC_POWER] = linear,
+ .func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_VOUT |
+ PMBUS_HAVE_STATUS_VOUT |
+ PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
+ PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP |
+ PMBUS_HAVE_POUT,
+ },
+ [max20754] = {
+ .pages = 1,
+ .format[PSC_VOLTAGE_IN] = linear,
+ .format[PSC_VOLTAGE_OUT] = linear,
+ .format[PSC_TEMPERATURE] = linear,
+ .format[PSC_CURRENT_OUT] = linear,
+ .func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_STATUS_INPUT |
+ PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT |
+ PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
+ PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP |
+ PMBUS_HAVE_TEMP2,
+ },
};
static int max20751_probe(struct i2c_client *client)
{
- return pmbus_do_probe(client, &max20751_info);
+ enum chips chip_id = (uintptr_t)i2c_get_match_data(client);
+
+ return pmbus_do_probe(client, &max20751_info[chip_id]);
}
static const struct i2c_device_id max20751_id[] = {
- { .name = "max20751" },
+ { .name = "max20751", .driver_data = max20751 },
+ { .name = "max20754", .driver_data = max20754 },
{ }
};
--
2.25.4
next prev parent reply other threads:[~2026-12-02 1:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 1:27 [PATCH v3 0/3] hwmon: Add support for pmbus max20754 device Debjit Ghosh
2026-12-02 1:27 ` Debjit Ghosh [this message]
2026-12-02 1:27 ` [PATCH v3 2/3] hwmon: (max20751): Add OF device ID table Debjit Ghosh
2026-12-02 1:27 ` [PATCH v3 3/3] dt-bindings: trivial-devices: add maxim,max20754 compatible Debjit Ghosh
2026-12-02 1:34 ` [PATCH v3 0/3] hwmon: Add support for pmbus max20754 device 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=20261202012744.2802478-2-dghosh@juniper.net \
--to=dghosh@juniper.net \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=debjit.ghosh@hpe.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=rdunlap@infradead.org \
--cc=robh@kernel.org \
--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 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.