public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] hwmon: (pmbus/max31785) refactor inter-access delay handling
@ 2026-03-18 19:06 Sanman Pradhan
  2026-03-18 19:06 ` [PATCH v3 1/2] hwmon: (pmbus) export pmbus_wait and pmbus_update_ts Sanman Pradhan
  2026-03-18 19:06 ` [PATCH v3 2/2] hwmon: (pmbus/max31785) use access_delay for PMBus-mediated accesses Sanman Pradhan
  0 siblings, 2 replies; 4+ messages in thread
From: Sanman Pradhan @ 2026-03-18 19:06 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-hwmon, linux-kernel, Sanman Pradhan

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


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

end of thread, other threads:[~2026-03-18 20:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 19:06 [PATCH v3 0/2] hwmon: (pmbus/max31785) refactor inter-access delay handling Sanman Pradhan
2026-03-18 19:06 ` [PATCH v3 1/2] hwmon: (pmbus) export pmbus_wait and pmbus_update_ts Sanman Pradhan
2026-03-18 20:49   ` Guenter Roeck
2026-03-18 19:06 ` [PATCH v3 2/2] hwmon: (pmbus/max31785) use access_delay for PMBus-mediated accesses Sanman Pradhan

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