Linux Hardware Monitor development
 help / color / mirror / Atom feed
* [PATCH] hwmon: (pmbus/ucd9000) Add monitor types 5, 6, and 7 for UCD90320
@ 2026-09-26 22:05 Jason Luo
  2026-09-26 22:10 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Luo @ 2026-09-26 22:05 UTC (permalink / raw)
  To: linux; +Cc: linux-hwmon, linux-kernel

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@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-26 22:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-26 22:05 [PATCH] hwmon: (pmbus/ucd9000) Add monitor types 5, 6, and 7 for UCD90320 Jason Luo
2026-09-26 22:10 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox