From 17a96a146cb5195ab1f6b5cf48645f9f6450539f Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Thu, 25 Sep 2014 22:23:42 -0700 Subject: qdev: gpio: Define qdev_pass_gpios() Allows a container to take ownership of GPIOs in a contained device and automatically connect them as GPIOs to the container. This prepares for deprecation of the SYSBUS IRQ functionality, which has this feature. We push it up to the device level instead of sysbus level. There's nothing sysbus specific about passing GPIOs to containers so its a legitimate device-level generic feature. Reviewed-by: Alexander Graf Signed-off-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- include/hw/qdev-core.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 86d341f083..a7327fd122 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -288,6 +288,9 @@ void qdev_init_gpio_in_named(DeviceState *dev, qemu_irq_handler handler, void qdev_init_gpio_out_named(DeviceState *dev, qemu_irq *pins, const char *name, int n); +void qdev_pass_gpios(DeviceState *dev, DeviceState *container, + const char *name); + BusState *qdev_get_parent_bus(DeviceState *dev); /*** BUS API. ***/ -- cgit v1.2.3-55-g7522