hw/gpio: pca9554: expose pin%d as a string property
The pinN properties are accessed with visit_type_str() (values "low" and "high"), but were registered as type "bool", so introspection advertised a boolean while the accessors require a string. Register them as "str", matching the PCA9555 GPIO variant. Fixes: de0c7d543bca ("misc: Add a pca9554 GPIO device model") Signed-off-by: Emmanuel Blot <emmanuel.blot@free.fr> Reviewed-by: Glenn Miles <milesg@linux.ibm.com> Link: https://lore.kernel.org/qemu-devel/20260709-catalina-upgrade-v1-18-82a63fead90c@free.fr Signed-off-by: Cédric Le Goater <clg@redhat.com>
Emmanuel Blot committed
Jul 9, 2026 at 17:23 UTC
a52cf5a1826535f838d30be835613bf16f60fff5
1 file changed
+1
-1
hw/gpio/pca9554.c
+1
-1
@@ -280,7 +280,7 @@ static void pca9554_initfn(Object *obj)
280
char *name;
281
282
name = g_strdup_printf("pin%d", pin);
283
- object_property_add(obj, name, "bool", pca9554_get_pin, pca9554_set_pin,
283
+ object_property_add(obj, name, "str", pca9554_get_pin, pca9554_set_pin,
284
NULL, NULL);
285
g_free(name);
286
}