]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: sandbox: Add DM_USB_GADGET support
authorMarek Vasut <marex@denx.de>
Fri, 1 Sep 2023 09:49:48 +0000 (11:49 +0200)
committerMarek Vasut <marex@denx.de>
Fri, 15 Sep 2023 21:38:01 +0000 (23:38 +0200)
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 <mkorpershoek@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
drivers/usb/host/usb-sandbox.c

index d1103dcb2e9fddfa26f897e335bb74469421762c..582f72d00c156152b13d9219687232934dbbaa81 100644 (file)
@@ -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)
 {