diff options
author | Peter Delevoryas <pdel@fb.com> | 2022-07-14 16:24:38 +0200 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2022-07-14 16:24:38 +0200 |
commit | d272d1410c91f399af15ef9ae4b561bc621de115 (patch) | |
tree | ea7b0428cf5854428ab2cde849dbe3bb97d409f3 /hw | |
parent | 54ee564132bdbd1346a241dde5d51f0a1d1a1c7b (diff) | |
download | qemu-d272d1410c91f399af15ef9ae4b561bc621de115.zip qemu-d272d1410c91f399af15ef9ae4b561bc621de115.tar.gz qemu-d272d1410c91f399af15ef9ae4b561bc621de115.tar.bz2 |
hw/i2c/pmbus: Add idle state to return 0xff's
Signed-off-by: Peter Delevoryas <pdel@fb.com>
Reviewed-by: Titus Rwantare <titusr@google.com>
Message-Id: <20220701000626.77395-2-me@pjd.dev>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/i2c/pmbus_device.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index 749a33a..4071a88 100644 --- a/hw/i2c/pmbus_device.c +++ b/hw/i2c/pmbus_device.c @@ -261,6 +261,11 @@ void pmbus_check_limits(PMBusDevice *pmdev) } } +void pmbus_idle(PMBusDevice *pmdev) +{ + pmdev->code = PMBUS_IDLE_STATE; +} + /* assert the status_cml error upon receipt of malformed command */ static void pmbus_cml_error(PMBusDevice *pmdev) { @@ -980,6 +985,10 @@ static uint8_t pmbus_receive_byte(SMBusDevice *smd) } break; + case PMBUS_IDLE_STATE: + pmbus_send8(pmdev, PMBUS_ERR_BYTE); + break; + case PMBUS_CLEAR_FAULTS: /* Send Byte */ case PMBUS_PAGE_PLUS_WRITE: /* Block Write-only */ case PMBUS_STORE_DEFAULT_ALL: /* Send Byte */ |