From: Marek Vasut Date: Fri, 1 Sep 2023 09:49:48 +0000 (+0200) Subject: usb: sandbox: Add DM_USB_GADGET support X-Git-Url: http://git.dujemihanovic.xyz/html/index.html?a=commitdiff_plain;h=7307b121a5e9c83648edecd8b96f7fb763944ef8;p=u-boot.git usb: sandbox: Add DM_USB_GADGET support Remove local usb_gadget_register_driver()/usb_gadget_unregister_driver() implementation which is implemented in udc-core.c instead if DM_USB_GADGET is enabled. Add no-op dm_usb_gadget_handle_interrupts() implementation. Reviewed-by: Mattijs Korpershoek Reviewed-by: Simon Glass Signed-off-by: Marek Vasut --- diff --git a/drivers/usb/host/usb-sandbox.c b/drivers/usb/host/usb-sandbox.c index d1103dcb2e..582f72d00c 100644 --- a/drivers/usb/host/usb-sandbox.c +++ b/drivers/usb/host/usb-sandbox.c @@ -124,6 +124,12 @@ static int sandbox_submit_int(struct udevice *bus, struct usb_device *udev, return ret; } +#if CONFIG_IS_ENABLED(DM_USB_GADGET) +int dm_usb_gadget_handle_interrupts(struct udevice *dev) +{ + return 0; +} +#else int usb_gadget_handle_interrupts(int index) { return 0; @@ -144,6 +150,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) return 0; } +#endif static int sandbox_alloc_device(struct udevice *dev, struct usb_device *udev) {