hw/i2c: pmbus add support for block receive
authorTitus Rwantare <titusr@google.com>
Mon, 23 Oct 2023 23:46:40 +0000 (23:46 +0000)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 7 Nov 2023 12:08:48 +0000 (13:08 +0100)
commitcfb0884c6f941977db1e0ce53ac659a8428e4e48
tree53e15756068a300146595076aed41c37c7d5cd1c
parentcc610857bbd3551f4b86ae2299336b5d9aa0db2b
hw/i2c: pmbus add support for block receive

PMBus devices can send and receive variable length data using the
block read and write format, with the first byte in the payload
denoting the length.

This is mostly used for strings and on-device logs. Devices can
respond to a block read with an empty string.

Reviewed-by: Hao Wu <wuhaotsh@google.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Titus Rwantare <titusr@google.com>
Message-ID: <20231023-staging-pmbus-v3-v4-1-07a8cb7cd20a@google.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/i2c/pmbus_device.c
include/hw/i2c/pmbus_device.h