From c3147b4d1bd09cc1dd7f2c0d31a5ebb900f22ab4 Mon Sep 17 00:00:00 2001 From: Sanman Pradhan Date: Wed, 16 Sep 2026 23:54:21 +0000 Subject: [PATCH] hwmon: (pmbus/tps53679) Select page 0 for single-page TPS536C7 tps536c7_identify() sets info->pages to 1 for a single-channel part and then accesses page 0 (writing PMBUS_PHASE) without ensuring PAGE is actually 0. pmbus_set_page() does not update the PAGE register when info->pages is 1, so if boot firmware left PAGE set to another value the PHASE writes and subsequent telemetry may target the wrong page. Select page 0 explicitly before configuring PHASE. Signed-off-by: Sanman Pradhan Link: https://patch.msgid.link/20260916235406.681131-3-sanman.pradhan@hpe.com Signed-off-by: Guenter Roeck --- drivers/hwmon/pmbus/tps53679.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/hwmon/pmbus/tps53679.c b/drivers/hwmon/pmbus/tps53679.c index 3a798e89d1e4..a04a632a5091 100644 --- a/drivers/hwmon/pmbus/tps53679.c +++ b/drivers/hwmon/pmbus/tps53679.c @@ -283,6 +283,17 @@ static int tps536c7_identify(struct i2c_client *client, */ info->pages = phases_b ? 2 : 1; + /* + * pmbus_set_page() does not update the PAGE register on single-page + * devices, so select page 0 explicitly in case the boot firmware + * left the device on another page. + */ + if (info->pages == 1) { + ret = i2c_smbus_write_byte_data(client, PMBUS_PAGE, 0); + if (ret < 0) + return ret; + } + /* * With info->phases[] left unset the PMBus core never programs the * PHASE selector, so make sure each page reports the aggregate