Linux Hardware Monitor development
 help / color / mirror / Atom feed
* [PATCH 0/3] hwmon: (pmbus) Add PMBUS_FORCE_PAGE_CHANGE flag
@ 2026-11-22  7:33 Felix Radensky
  2026-11-22  7:33 ` [PATCH 1/3] hwmon: (pmbus/core) Invalidate cached page and phase on failed change Felix Radensky
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Felix Radensky @ 2026-11-22  7:33 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Vadim Pasternak, Felix Radensky, linux-hwmon, linux-doc

As discussed in [1], this series adds the PMBUS_FORCE_PAGE_CHANGE device
flag, which makes pmbus_set_page() change the page of a chip with a
single page as well, and converts mp2975 to it. The mp2975 driver then
accesses the page 3 voltage reference with pmbus_set_page() also in a
single rail configuration, instead of writing PAGE directly.

Patch 1 makes pmbus_set_page() invalidate the cached page and phase when
changing them fails, so that the next access sends PAGE and PHASE again.
Without it, a PAGE write that succeeds, followed by a failed or
mismatched read-back, leaves the chip on the requested page while the
core caches the previous one, and the same applies to a PAGE or PHASE
write accepted by the chip, but reported as failed. This already applies
to chips with multiple pages or phases, and would apply to chips using
the new flag as well.

Patch 3 depends on commit 00944852275e ("hwmon: (pmbus/mp2975) Get vout
fault limits dynamically"), which is in v7.4-rc3, but not in hwmon-next
yet. The series is based on v7.4-rc3, and applies to hwmon-next with
that commit on top.

Tested on a switch platform carrying twelve MP2975 devices, twenty one
rails in total. On a single rail device, the change to page 3 is now
issued by the core and read back, while reading a sensor of the rail
issues no PAGE command. 400 page 3 excursions on a single rail device,
and 800 on a dual rail device, each followed by a read of the other
rail, showed no page 3 or other rail register value in place of a sensor
value. The limits of all rails matched those reported before the series,
and in2_crit of the rail supplying the CPU core voltage followed the CPU
between 1145mV and 1725mV. Patch 1 only changes the behavior after a
failed transfer, which was not exercised.

[1] https://lore.kernel.org/linux-hwmon/8e4410db-66df-44b8-9617-1013545d7b43@roeck-us.net/

Felix Radensky (3):
  hwmon: (pmbus/core) Invalidate cached page and phase on failed change
  hwmon: (pmbus/core) Add PMBUS_FORCE_PAGE_CHANGE flag
  hwmon: (pmbus/mp2975) Use PMBUS_FORCE_PAGE_CHANGE

 Documentation/hwmon/pmbus-core.rst | 12 +++++++++++-
 drivers/hwmon/pmbus/mp2975.c       | 29 +++++++++--------------------
 drivers/hwmon/pmbus/pmbus_core.c   |  9 ++++++++-
 include/linux/pmbus.h              | 11 +++++++++++
 4 files changed, 39 insertions(+), 22 deletions(-)


base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
-- 
2.34.1


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

end of thread, other threads:[~2026-11-22  7:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22  7:33 [PATCH 0/3] hwmon: (pmbus) Add PMBUS_FORCE_PAGE_CHANGE flag Felix Radensky
2026-11-22  7:33 ` [PATCH 1/3] hwmon: (pmbus/core) Invalidate cached page and phase on failed change Felix Radensky
2026-11-22  7:48   ` sashiko-bot
2026-11-22  7:33 ` [PATCH 2/3] hwmon: (pmbus/core) Add PMBUS_FORCE_PAGE_CHANGE flag Felix Radensky
2026-11-22  7:33 ` [PATCH 3/3] hwmon: (pmbus/mp2975) Use PMBUS_FORCE_PAGE_CHANGE Felix Radensky
2026-11-22  7:48 ` [PATCH 0/3] hwmon: (pmbus) Add PMBUS_FORCE_PAGE_CHANGE flag sashiko-bot

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