From: Nikita Shubin <n.shubin@yadro.com>
Set device id for gpios to allow gpiodev binding.
Signed-off-by: Nikita Shubin <n.shubin@yadro.com>
---
hw/arm/aspeed_ast2600.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
index 07210483bb29a50824c8312021bebf1ca32cac95..09ce944d6263d810db650a1e566c3f3b1701702d 100644
--- a/hw/arm/aspeed_ast2600.c
+++ b/hw/arm/aspeed_ast2600.c
@@ -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;
}
--
2.45.2