All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] hw/i2c: PMBus updates
@ 2026-07-06 23:00 Titus Rwantare
  2026-07-06 23:00 ` [PATCH 1/5] osdep: add DIV_ROUND_CLOSEST Titus Rwantare
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Titus Rwantare @ 2026-07-06 23:00 UTC (permalink / raw)
  To: peter.maydell
  Cc: qemu-arm, qemu-devel, kfting, imaginos32, wuhaotsh, philmd,
	Titus Rwantare

This series adds various fixes to PMBus and SMBus support.

The maximum SMBus data length is increased to 257 bytes, (payload is 255 bytes) to support SMBus 3.0 block transfers. SMBus devices don’t have to report their specification version, and this change allows us to enable newer PMBus devices that are based on top of SMBus 3.0.

Additionally, this series:
  - Adds the `DIV_ROUND_CLOSEST` helper macro, lifted from the linux implementation, to match the rounding in linux drivers.
  - Adds PMBus helper functions to convert sensor values in milliunits to/from linear mode format (Linear16).
  - Adds helper functions for converting data to PMBus Linear11 format.
  - Adds a fix that the PMBus output buffer is cleared on new write transactions to prevent stale data reads, this resolves an issue with guests performing incomplete reads.

Changes to the adm1266 are in a separate patch series.

Titus Rwantare (3):
  osdep: add DIV_ROUND_CLOSEST
  hw/i2c: pmbus: add milliunits linear mode functions
  hw/i2c: pmbus: add Linear11 format helpers

titusr (2):
  hw/i2c: pmbus: clear output buffer on write
  hw/i2c: smbus: increase MAX_DATA_LEN

 hw/i2c/pmbus_device.c         | 61 +++++++++++++++++++++++++++++++++
 hw/i2c/smbus_slave.c          |  4 +--
 include/hw/i2c/pmbus_device.h | 64 +++++++++++++++++++++++++++++++++++
 include/hw/i2c/smbus_slave.h  |  2 +-
 include/qemu/osdep.h          | 14 ++++++++
 tests/qtest/adm1266-test.c    | 10 +++---
 6 files changed, 148 insertions(+), 7 deletions(-)

-- 
2.55.0.rc2.803.g1fd1e6609c-goog



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

end of thread, other threads:[~2026-07-09 15:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06 23:00 [PATCH 0/5] hw/i2c: PMBus updates Titus Rwantare
2026-07-06 23:00 ` [PATCH 1/5] osdep: add DIV_ROUND_CLOSEST Titus Rwantare
2026-07-09 11:09   ` Peter Maydell
2026-07-09 11:16     ` Peter Maydell
2026-07-06 23:00 ` [PATCH 2/5] hw/i2c: pmbus: add milliunits linear mode functions Titus Rwantare
2026-07-06 23:00 ` [PATCH 3/5] hw/i2c: pmbus: clear output buffer on write Titus Rwantare
2026-07-07  9:20   ` Philippe Mathieu-Daudé
2026-07-09 15:35   ` Peter Maydell
2026-07-06 23:00 ` [PATCH 4/5] hw/i2c: smbus: increase MAX_DATA_LEN Titus Rwantare
2026-07-07  9:18   ` Philippe Mathieu-Daudé
2026-07-09 11:25   ` Peter Maydell
2026-07-06 23:00 ` [PATCH 5/5] hw/i2c: pmbus: add Linear11 format helpers Titus Rwantare
2026-07-09 11:14   ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.