[PATCH] hwmon: (pmbus/ucd9000) Add monitor types 5, 6, and 7 for UCD90320

From: Jason Luo

Date: Sat Sep 26 2026 - 18:05:36 EST


The TI UCD90320 power sequencer defines additional monitor types:
- 5: Input voltage
- 6: Voltage with AVS
- 7: Input voltage with AVS

Because ucd9000_probe() only checks for monitor types 1-4,
voltage rails configured with types 5-7 are ignored, and thus
are never registered with PMBus.

Add handling for monitor types 5, 6, and 7 to allow these
voltage rails on UCD90320 to be detected and registered.

Refer to section 10.6 in the documentation below.

Link: https://www.ti.com/lit/ug/slvuaw9c/slvuaw9c.pdf
Link: https://www.ti.com/lit/ug/slvu352g/slvu352g.pdf
Signed-off-by: Jason Luo <jasonluomath@xxxxxxxxx>
---
drivers/hwmon/pmbus/ucd9000.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/hwmon/pmbus/ucd9000.c b/drivers/hwmon/pmbus/ucd9000.c
index f76c2913c9ca..96e0c587d52e 100644
--- a/drivers/hwmon/pmbus/ucd9000.c
+++ b/drivers/hwmon/pmbus/ucd9000.c
@@ -44,10 +44,13 @@ enum chips { ucd9000, ucd90120, ucd90124, ucd90160, ucd90320, ucd9090,
#define UCD9000_MON_TYPE(x) (((x) >> 5) & 0x07)
#define UCD9000_MON_PAGE(x) ((x) & 0x1f)

-#define UCD9000_MON_VOLTAGE 1
-#define UCD9000_MON_TEMPERATURE 2
-#define UCD9000_MON_CURRENT 3
-#define UCD9000_MON_VOLTAGE_HW 4
+#define UCD9000_MON_VOLTAGE 1
+#define UCD9000_MON_TEMPERATURE 2
+#define UCD9000_MON_CURRENT 3
+#define UCD9000_MON_VOLTAGE_HW 4
+#define UCD9000_MON_INPUT_VOLTAGE 5
+#define UCD9000_MON_VOLTAGE_AVS 6
+#define UCD9000_MON_INPUT_VOLTAGE_AVS 7

#define UCD9000_NUM_FAN 4

@@ -579,6 +582,9 @@ static int ucd9000_probe(struct i2c_client *client)
switch (UCD9000_MON_TYPE(block_buffer[i])) {
case UCD9000_MON_VOLTAGE:
case UCD9000_MON_VOLTAGE_HW:
+ case UCD9000_MON_INPUT_VOLTAGE:
+ case UCD9000_MON_VOLTAGE_AVS:
+ case UCD9000_MON_INPUT_VOLTAGE_AVS:
info->func[page] |= PMBUS_HAVE_VOUT
| PMBUS_HAVE_STATUS_VOUT;
break;
--
2.25.1