Re: [PATCH v6 2/3] hwmon: (pmbus/max31785) use access_delay for PMBus-mediated accesses

From: Guenter Roeck

Date: Sat Mar 21 2026 - 20:48:12 EST


On Sat, Mar 21, 2026 at 06:11:47PM +0000, Pradhan, Sanman wrote:
> From: Sanman Pradhan <psanman@xxxxxxxxxxx>
>
> The MAX31785 driver currently uses driver-local wrappers around PMBus
> core accesses to enforce a 250us inter-access delay needed to work
> around occasional NACKs from the device. This duplicates the PMBus
> core delay mechanism already provided by pmbus_driver_info.access_delay
> and adds unnecessary complexity.
>
> Replace the PMBus wrapper approach with access_delay for normal
> PMBus-mediated accesses, while keeping the minimal local delay handling
> needed for raw pre-probe SMBus operations.
>
> For the raw i2c_transfer() long-read path, use pmbus_wait() and
> pmbus_update_ts() to keep the PMBus core timing state consistent with
> the raw transfer.
>
> Also:
> - allow PMBUS_FAN_CONFIG_12 physical-page accesses to fall back to the
> PMBus core, while remapping only virtual pages
> - use pmbus_update_fan() directly for fan configuration updates
> - use the delayed raw read helper for MFR_REVISION during probe
> - add a final max31785_wait() before pmbus_do_probe() to bridge the
> timing gap between pre-probe accesses and PMBus core registration
> - rename 'virtual' to 'vpage', 'driver_data' to 'data', and drop the
> unused to_max31785_data() macro
>
> Signed-off-by: Sanman Pradhan <psanman@xxxxxxxxxxx>

Applied.

Thanks,
Guenter