summaryrefslogtreecommitdiffstats
path: root/include/hw/qdev-core.h
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2014-09-25 22:23:42 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2014-10-23 16:41:26 +0200
commit17a96a146cb5195ab1f6b5cf48645f9f6450539f (patch)
treeef4fe63aa1c1b42712a10137adc4bfd2ec0aa61c /include/hw/qdev-core.h
parentaef0869e8ed83ec201488020a9a1cc44d85d72bf (diff)
downloadhqemu-17a96a146cb5195ab1f6b5cf48645f9f6450539f.zip
hqemu-17a96a146cb5195ab1f6b5cf48645f9f6450539f.tar.gz
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 <agraf@suse.de> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw/qdev-core.h')
-rw-r--r--include/hw/qdev-core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 86d341f..a7327fd 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. ***/
OpenPOWER on IntegriCloud