aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorPeter Delevoryas <pdel@fb.com>2022-07-14 16:24:38 +0200
committerCédric Le Goater <clg@kaod.org>2022-07-14 16:24:38 +0200
commite51ae82571746e40f36aa9bfc5d0924dcf2b0a5d (patch)
treecedffb1c5e15c1b9265af6840ac1fe2bb728b868 /include/hw
parentd272d1410c91f399af15ef9ae4b561bc621de115 (diff)
downloadqemu-e51ae82571746e40f36aa9bfc5d0924dcf2b0a5d.zip
qemu-e51ae82571746e40f36aa9bfc5d0924dcf2b0a5d.tar.gz
qemu-e51ae82571746e40f36aa9bfc5d0924dcf2b0a5d.tar.bz2
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>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/sensor/isl_pmbus_vr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/hw/sensor/isl_pmbus_vr.h b/include/hw/sensor/isl_pmbus_vr.h
index 3e47ff7..aa2c276 100644
--- a/include/hw/sensor/isl_pmbus_vr.h
+++ b/include/hw/sensor/isl_pmbus_vr.h
@@ -12,12 +12,17 @@
#include "hw/i2c/pmbus_device.h"
#include "qom/object.h"
+#define TYPE_ISL69259 "isl69259"
#define TYPE_ISL69260 "isl69260"
#define TYPE_RAA228000 "raa228000"
#define TYPE_RAA229004 "raa229004"
+#define ISL_MAX_IC_DEVICE_ID_LEN 16
struct ISLState {
PMBusDevice parent;
+
+ uint8_t ic_device_id[ISL_MAX_IC_DEVICE_ID_LEN];
+ uint8_t ic_device_id_len;
};
OBJECT_DECLARE_SIMPLE_TYPE(ISLState, ISL69260)