Commit e51c950cba for qemu.org
commit e51c950cbaf18ffe5c96f47f1d8a1887df556d0d
Author: Markus Armbruster <armbru@redhat.com>
Date: Thu Nov 5 09:03:07 2026 +0100
hw/gpio/pca9552: Fix @type of pca9552 property led<N>
pca955x_initfn() passes @type "bool" to object_property_add(). The
properties are actually string-typed: pca955x_get_led() and
pca955x_set_led() use visit_type_str(). Pass "str" instead.
Fixes: a90d8f84674d ("misc/pca9552: Add qom set and get")
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Glenn Miles <milesg@linux.ibm.com>
Message-ID: <20261105080310.1656968-3-armbru@redhat.com>
diff --git a/hw/gpio/pca9552.c b/hw/gpio/pca9552.c
index 7e5fda4980..07ef0fb20b 100644
--- a/hw/gpio/pca9552.c
+++ b/hw/gpio/pca9552.c
@@ -567,7 +567,7 @@ static void pca955x_initfn(Object *obj)
if (k->has_led_support) {
/* LED variant: expose the LED selector state as led%d. */
name = g_strdup_printf("led%d", ix);
- object_property_add(obj, name, "bool", NULL,
+ object_property_add(obj, name, "str", NULL,
pca955x_get_led, pca955x_set_led, NULL, NULL);
} else {
/* GPIO variant: expose the pin logic level as pin%d. */