aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorTitus Rwantare <titusr@google.com>2022-03-07 12:06:04 -0800
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2022-03-08 18:46:48 +0100
commit1c0c52f76208c648a70b115fc99ab558008466da (patch)
treeb82113f845f273e895cb7c1281b04f1c109b58f7 /hw
parentffcdae677ebb6fab328f6ab913ed7929a3ffa8a8 (diff)
hw/sensor: add Renesas raa229004 PMBus device
The Renesas RAA229004 is a PMBus Multiphase Voltage Regulator Signed-off-by: Titus Rwantare <titusr@google.com> Reviewed-by: Hao Wu <wuhaotsh@google.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by: Corey Minyard <cminyard@mvista.com> Message-Id: <20220307200605.4001451-9-titusr@google.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/sensor/isl_pmbus_vr.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/hw/sensor/isl_pmbus_vr.c b/hw/sensor/isl_pmbus_vr.c
index f8cc75fc31..53187d619a 100644
--- a/hw/sensor/isl_pmbus_vr.c
+++ b/hw/sensor/isl_pmbus_vr.c
@@ -195,6 +195,15 @@ static void isl69260_class_init(ObjectClass *klass, void *data)
isl_pmbus_vr_class_init(klass, data, 2);
}
+static void raa229004_class_init(ObjectClass *klass, void *data)
+{
+ ResettableClass *rc = RESETTABLE_CLASS(klass);
+ DeviceClass *dc = DEVICE_CLASS(klass);
+ dc->desc = "Renesas 229004 Digital Multiphase Voltage Regulator";
+ rc->phases.exit = isl_pmbus_vr_exit_reset;
+ isl_pmbus_vr_class_init(klass, data, 2);
+}
+
static const TypeInfo isl69260_info = {
.name = TYPE_ISL69260,
.parent = TYPE_PMBUS_DEVICE,
@@ -203,9 +212,18 @@ static const TypeInfo isl69260_info = {
.class_init = isl69260_class_init,
};
+static const TypeInfo raa229004_info = {
+ .name = TYPE_RAA229004,
+ .parent = TYPE_PMBUS_DEVICE,
+ .instance_size = sizeof(ISLState),
+ .instance_init = raa22xx_init,
+ .class_init = raa229004_class_init,
+};
+
static void isl_pmbus_vr_register_types(void)
{
type_register_static(&isl69260_info);
+ type_register_static(&raa229004_info);
}
type_init(isl_pmbus_vr_register_types)