Skip to contentSkip to conversation

hwmon: Add driver for MPS MPQ8785 Synchronous Step-Down Converter

PATCH In review Fred Chen 2 participants 5 messages Aug 7, 2025 – Aug 10, 2025

Subsystems (2)
lore
Share & tools
lore

Fred Chen

author
#0 lore raw

PATCH 1/2 hwmon: Add driver for MPS MPQ8785 Synchronous Step-Down Converter

From: Charles Hsu <[email protected]>

Add support for mpq8785 device from Monolithic Power Systems, Inc. (MPS) vendor. This is synchronous step-down controller.

[groeck: probe_new --> probe; add MODULE_IMPORT_NS(PMBUS)]
(cherry picked from commit f20b4a931130cb574c40563cfda0fc2cb944b4df)
---
 Documentation/hwmon/index.rst   |  1 +
 Documentation/hwmon/mpq8785.rst | 94 +++++++++++++++++++++++++++++++++
 drivers/hwmon/pmbus/Kconfig     |  9 ++++
 drivers/hwmon/pmbus/Makefile    |  1 +
 drivers/hwmon/pmbus/mpq8785.c   | 90 +++++++++++++++++++++++++++++++
 5 files changed, 195 insertions(+)
 create mode 100644 Documentation/hwmon/mpq8785.rst
 create mode 100644 drivers/hwmon/pmbus/mpq8785.c
Documentation/hwmon/index.rst +1 -0
index 88dadea85cfc..1f9dd8786609 100644
@@ -158,6 +158,7 @@ Hardware Monitoring Kernel Drivers
    mp2888
    mp2975
    mp5023
+   mpq8785
    nct6683
    nct6775
    nct7802
Documentation/hwmon/mpq8785.rst new file +94 -0

94 lines not on this page · raw message

drivers/hwmon/pmbus/Kconfig +9 -0
index b4e93bd5835e..705cf1cc07cc 100644
@@ -349,6 +349,15 @@ config SENSORS_MPQ7932
 	  This driver can also be built as a module. If so, the module will
 	  be called mpq7932.
 
+config SENSORS_MPQ8785
+	tristate "MPS MPQ8785"
+	help
+	  If you say yes here you get hardware monitoring functionality support
+	  for power management IC MPS MPQ8785.
+
+	  This driver can also be built as a module. If so, the module will
+	  be called mpq8785.
+
 config SENSORS_PIM4328
 	tristate "Flex PIM4328 and compatibles"
 	help
drivers/hwmon/pmbus/Makefile +1 -0
index 84ee960a6c2d..14f004c26a3f 100644
@@ -36,6 +36,7 @@ obj-$(CONFIG_SENSORS_MP2888)	+= mp2888.o
 obj-$(CONFIG_SENSORS_MP2975)	+= mp2975.o
 obj-$(CONFIG_SENSORS_MP5023)	+= mp5023.o
 obj-$(CONFIG_SENSORS_MPQ7932)	+= mpq7932.o
+obj-$(CONFIG_SENSORS_MPQ8785)	+= mpq8785.o
 obj-$(CONFIG_SENSORS_PLI1209BC)	+= pli1209bc.o
 obj-$(CONFIG_SENSORS_PM6764TR)	+= pm6764tr.o
 obj-$(CONFIG_SENSORS_PXE1610)	+= pxe1610.o
drivers/hwmon/pmbus/mpq8785.c new file +90 -0

90 lines not on this page · raw message

Signature · 1 line
2.49.0
author
#1 lore raw

PATCH 2/2 hwmon: (pmbus/mpq8785) Convert comma to semicolon

From: Shen Lichuan <[email protected]>

To ensure code clarity and prevent potential errors, use ';' instead of ',' as a statement separator in the function mpq8785_identify.

Message-ID: <[email protected]>

(cherry picked from commit ff140456b5fbf03cbd04277c21d4fcdc5974e97b)
---
 drivers/hwmon/pmbus/mpq8785.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/pmbus/mpq8785.c +1 -1
index 4e2549cc8120..3b1d978508f8 100644
@@ -22,7 +22,7 @@ static int mpq8785_identify(struct i2c_client *client,
 		break;
 	case 1:
 	case 2:
-		info->format[PSC_VOLTAGE_OUT] = direct,
+		info->format[PSC_VOLTAGE_OUT] = direct;
 		info->m[PSC_VOLTAGE_OUT] = 64;
 		info->b[PSC_VOLTAGE_OUT] = 0;
 		info->R[PSC_VOLTAGE_OUT] = 1;
Signature · 1 line
2.49.0
#2 lore raw
In reply to Fred Chen
Quoted 10 lines · Fred Chen

From: Charles Hsu <[email protected]>

Add support for mpq8785 device from Monolithic Power Systems, Inc. (MPS) vendor. This is synchronous step-down controller.

[groeck: probe_new --> probe; add MODULE_IMPORT_NS(PMBUS)]
(cherry picked from commit f20b4a931130cb574c40563cfda0fc2cb944b4df)

I'm not sure what you did here with the backported patches, because trying to apply this series from the list lead to conflicts. However, on the basis that there was no discussion of conflicts, I cherry-picked back the changes as indicated by the commit IDs, which applied successfully (though with auto-merge results).

Possibly it's differences in the tooling for patches vs existing commits, but some discussion of your experiences would be helpful.

Did you try to apply your own series before sending it to the list?

Andrew

author
#3 lore raw

Andrew Jeffery <[email protected]> 於 2025年8月8日 週五 上午10:35寫道:

Quoted 19 lines · Fred Chen
Quoted 10 lines

From: Charles Hsu <[email protected]>

Add support for mpq8785 device from Monolithic Power Systems, Inc. (MPS) vendor. This is synchronous step-down controller.

[groeck: probe_new --> probe; add MODULE_IMPORT_NS(PMBUS)]
(cherry picked from commit f20b4a931130cb574c40563cfda0fc2cb944b4df)

I'm not sure what you did here with the backported patches, because trying to apply this series from the list lead to conflicts. However, on the basis that there was no discussion of conflicts, I cherry-picked back the changes as indicated by the commit IDs, which applied successfully (though with auto-merge results).

Quoted 6 lines

Possibly it's differences in the tooling for patches vs existing commits, but some discussion of your experiences would be helpful.

Did you try to apply your own series before sending it to the list?

Andrew

Hi Andrew,

Thanks for pointing this out.

I realized I was using the wrong Linux 6.6 tree when testing — I used
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
(branch: linux-6.6.y) instead of the OpenBMC Linux kernel. That tree’s index.rst doesn’t include mp5990, which caused the conflict. I’ll use the OpenBMC Linux kernel for patch preparation next time to avoid this issue.

Fred

#4 lore raw
Quoted 29 lines · Fred Chen

Andrew Jeffery <[email protected]> 於 2025年8月8日 週五 上午10:35寫道:

Quoted 19 lines · Fred Chen
Quoted 10 lines

From: Charles Hsu <[email protected]>

Add support for mpq8785 device from Monolithic Power Systems, Inc. (MPS) vendor. This is synchronous step-down controller.

[groeck: probe_new --> probe; add MODULE_IMPORT_NS(PMBUS)]
(cherry picked from commit f20b4a931130cb574c40563cfda0fc2cb944b4df)

I'm not sure what you did here with the backported patches, because trying to apply this series from the list lead to conflicts. However, on the basis that there was no discussion of conflicts, I cherry-picked back the changes as indicated by the commit IDs, which applied successfully (though with auto-merge results).

Quoted 6 lines

Possibly it's differences in the tooling for patches vs existing commits, but some discussion of your experiences would be helpful.

Did you try to apply your own series before sending it to the list?

Andrew

Hi Andrew,

Quoted 9 lines

Thanks for pointing this out.

I realized I was using the wrong Linux 6.6 tree when testing — I used
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
(branch: linux-6.6.y) instead of the OpenBMC Linux kernel. That tree’s index.rst doesn’t include mp5990, which caused the conflict. I’ll use the OpenBMC Linux kernel for patch preparation next time to avoid this issue.

Thanks for taking the time to understand what happened.

Andrew