mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
usb: Add a register_companion USB bus op.
This is a preparation patch for adding support for USB companion controllers. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
3631e6c8c2
commit
ae60fea97c
2 changed files with 36 additions and 0 deletions
5
hw/usb.h
5
hw/usb.h
|
@ -344,6 +344,8 @@ struct USBBus {
|
|||
};
|
||||
|
||||
struct USBBusOps {
|
||||
int (*register_companion)(USBBus *bus, USBPort *ports[],
|
||||
uint32_t portcount, uint32_t firstport);
|
||||
void (*device_destroy)(USBBus *bus, USBDevice *dev);
|
||||
};
|
||||
|
||||
|
@ -356,6 +358,9 @@ USBDevice *usb_create_simple(USBBus *bus, const char *name);
|
|||
USBDevice *usbdevice_create(const char *cmdline);
|
||||
void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index,
|
||||
USBPortOps *ops, int speedmask);
|
||||
int usb_register_companion(const char *masterbus, USBPort *ports[],
|
||||
uint32_t portcount, uint32_t firstport,
|
||||
void *opaque, USBPortOps *ops, int speedmask);
|
||||
void usb_port_location(USBPort *downstream, USBPort *upstream, int portnr);
|
||||
void usb_unregister_port(USBBus *bus, USBPort *port);
|
||||
int usb_device_attach(USBDevice *dev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue