hw/arm: ast2600: set id for gpio
authorNikita Shubin <n.shubin@yadro.com>
Fri, 7 Mar 2025 10:22:29 +0000 (13:22 +0300)
committerNikita Shubin <n.shubin@yadro.com>
Wed, 12 Mar 2025 09:21:05 +0000 (12:21 +0300)
Set device id for gpios to allow gpiodev binding.

Signed-off-by: Nikita Shubin <n.shubin@yadro.com>
hw/arm/aspeed_ast2600.c

index 07210483bb29a50824c8312021bebf1ca32cac95..09ce944d6263d810db650a1e566c3f3b1701702d 100644 (file)
@@ -537,6 +537,7 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
                        aspeed_soc_get_irq(s, ASPEED_DEV_XDMA));
 
     /* GPIO */
+    DEVICE(&s->gpio)->id = g_strdup("aspeed-gpio0");
     if (!sysbus_realize(SYS_BUS_DEVICE(&s->gpio), errp)) {
         return;
     }
@@ -545,6 +546,7 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
     sysbus_connect_irq(SYS_BUS_DEVICE(&s->gpio), 0,
                        aspeed_soc_get_irq(s, ASPEED_DEV_GPIO));
 
+    DEVICE(&s->gpio_1_8v)->id = g_strdup("aspeed-gpio1");
     if (!sysbus_realize(SYS_BUS_DEVICE(&s->gpio_1_8v), errp)) {
         return;
     }