hw/sensor: Add IC_DEVICE_ID to ISL voltage regulators
authorPeter Delevoryas <pdel@fb.com>
Thu, 14 Jul 2022 14:24:38 +0000 (16:24 +0200)
committerCédric Le Goater <clg@kaod.org>
Thu, 14 Jul 2022 14:24:38 +0000 (16:24 +0200)
commite51ae82571746e40f36aa9bfc5d0924dcf2b0a5d
treecedffb1c5e15c1b9265af6840ac1fe2bb728b868
parentd272d1410c91f399af15ef9ae4b561bc621de115
hw/sensor: Add IC_DEVICE_ID to ISL voltage regulators

This commit adds a passthrough for PMBUS_IC_DEVICE_ID to allow Renesas
voltage regulators to return the integrated circuit device ID if they
would like to.

The behavior is very device specific, so it hasn't been added to the
general PMBUS model. Additionally, if the device ID hasn't been set,
then the voltage regulator will respond with the error byte value.  The
guest error message will change slightly for IC_DEVICE_ID with this
commit.

Signed-off-by: Peter Delevoryas <pdel@fb.com>
Reviewed-by: Titus Rwantare <titusr@google.com>
Message-Id: <20220701000626.77395-3-me@pjd.dev>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
hw/sensor/isl_pmbus_vr.c
include/hw/sensor/isl_pmbus_vr.h