From: Titus Rwantare <titusr@google.com>
To: peter.maydell@linaro.org
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, kfting@nuvoton.com,
imaginos32@gmail.com, wuhaotsh@google.com, philmd@mailo.com,
fanjason@google.com, Titus Rwantare <titusr@google.com>
Subject: [PATCH 0/8] hw/i2c: PMBus updates and adm1266 fixes
Date: Wed, 29 Jul 2026 23:13:15 +0000 [thread overview]
Message-ID: <20260729231325.3808993-1-titusr@google.com> (raw)
This series adds various fixes to PMBus and SMBus support.
Since v1:
- Added the adm1266 patches that fix accessing the MFR_* registers
- Fixed vout_mode handling to avoid values overflowing/being truncated
by the adm1266 implementation.
- Added fix for PMBus vout_mode bug where guests accesses would break
due to the bitfields being packed in the wrong order.
- Updated VMState to work around breaking migration while still storing
the increased SMBus data.
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).
Jason Fan (1):
hw/i2c: fix VOUT_MODE representation on little-endian machines
Titus Rwantare (7):
osdep: add DIV_ROUND_CLOSEST
hw/i2c: pmbus: add milliunits linear mode functions
hw/i2c: smbus: increase MAX_DATA_LEN
hw/sensor: update adm1266 block transfers
hw/sensor: switch adm1266 to millivolts vout
hw/sensor: adm1266: expose vout_mode over QMP
hw/sensor: adm1266: set default VOUT mode
hw/i2c/pmbus_device.c | 39 +++++++
hw/i2c/smbus_slave.c | 27 ++++-
hw/sensor/adm1266.c | 176 +++++++++++++++++++++++-----
include/hw/i2c/pmbus_device.h | 25 ++++
include/hw/i2c/smbus_slave.h | 2 +-
include/qemu/osdep.h | 13 +++
tests/qtest/adm1266-test.c | 210 ++++++++++++++++++++++++++++++++--
7 files changed, 452 insertions(+), 40 deletions(-)
--
2.55.0.508.g3f0d502094-goog
next reply other threads:[~2026-07-29 23:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 23:13 Titus Rwantare [this message]
2026-07-29 23:13 ` [PATCH 1/8] osdep: add DIV_ROUND_CLOSEST Titus Rwantare
2026-07-29 23:13 ` [PATCH 2/8] hw/i2c: pmbus: add milliunits linear mode functions Titus Rwantare
2026-07-29 23:13 ` [PATCH 3/8] hw/i2c: smbus: increase MAX_DATA_LEN Titus Rwantare
2026-07-29 23:13 ` [PATCH 4/8] hw/sensor: update adm1266 block transfers Titus Rwantare
2026-07-29 23:13 ` [PATCH 5/8] hw/sensor: switch adm1266 to millivolts vout Titus Rwantare
2026-07-29 23:13 ` [PATCH 6/8] hw/i2c: fix VOUT_MODE representation on little-endian machines Titus Rwantare
2026-07-29 23:13 ` [PATCH 7/8] hw/sensor: adm1266: expose vout_mode over QMP Titus Rwantare
2026-07-29 23:13 ` [PATCH 8/8] hw/sensor: adm1266: set default VOUT mode Titus Rwantare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260729231325.3808993-1-titusr@google.com \
--to=titusr@google.com \
--cc=fanjason@google.com \
--cc=imaginos32@gmail.com \
--cc=kfting@nuvoton.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@mailo.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=wuhaotsh@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.