From 2192aaae1c36b00a4a97b7d25220a62c245f89b7 Mon Sep 17 00:00:00 2001 From: Titus Rwantare Date: Mon, 7 Mar 2022 12:05:59 -0800 Subject: [PATCH] hw/i2c: pmbus: add PEC unsupported warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Titus Rwantare Acked-by: Corey Minyard Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220307200605.4001451-4-titusr@google.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i2c/pmbus_device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index c7ec8e5499..ff644c1d4a 100644 --- a/hw/i2c/pmbus_device.c +++ b/hw/i2c/pmbus_device.c @@ -307,6 +307,11 @@ static uint8_t pmbus_receive_byte(SMBusDevice *smd) case PMBUS_CAPABILITY: pmbus_send8(pmdev, pmdev->capability); + if (pmdev->capability & BIT(7)) { + qemu_log_mask(LOG_UNIMP, + "%s: PEC is enabled but not yet supported.\n", + __func__); + } break; case PMBUS_VOUT_MODE: /* R/W byte */ -- 2.30.2