[PATCH v3 0/2] hwmon: (pmbus/max31785) refactor inter-access delay handling

From: Sanman Pradhan

Date: Wed Mar 18 2026 - 15:07:17 EST


This v3 series addresses the feedback regarding the timing handover
between driver-local pre-probe accesses and the PMBus core's timing
management.

By exporting the PMBus core timing helpers and integrating them into
the MAX31785 driver, we can eliminate over 100 lines of local wrapper
boilerplate while ensuring that both standard and raw I2C transfers
respect the device's 250us inter-access delay requirement.

Changes in v3:
- Dropped the u16 -> u8 wrapper type fix in max31785.c as it was
already applied upstream.
- Fixed a comment style nit in max31785_read_long_data().
- Added an explicit max31785_wait() before pmbus_do_probe() to ensure
the 250us delay is respected during the handover from driver-local
timing to PMBus core timing.

Changes in v2:
- Dropped the i2c_smbus_write_byte_data() wrapper cleanup (applied upstream).
- Patch 1 (New): Export pmbus_wait() and pmbus_update_ts() from the PMBus
core, and move PMBUS_OP_* macros to drivers/hwmon/pmbus/pmbus.h.
- Patch 2: Replaced the usleep_range() sandwich around the raw long-read
path with the newly exported core timing functions. Placed
pmbus_update_ts() before the error check to ensure the core accurately
tracks the bus transaction even on failure.

Sanman Pradhan (2):
hwmon: (pmbus) export pmbus_wait and pmbus_update_ts
hwmon: (pmbus/max31785) use access_delay for PMBus-mediated accesses

drivers/hwmon/pmbus/max31785.c | 182 ++++++++++---------------------
drivers/hwmon/pmbus/pmbus.h | 9 ++
drivers/hwmon/pmbus/pmbus_core.c | 13 +--
3 files changed, 68 insertions(+), 136 deletions(-)

--
2.34.1