[PATCH 02/17] usb: sandbox: Add DM_USB_GADGET support
Marek Vasut
marex at denx.de
Sat Aug 19 16:23:52 CEST 2023
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.
Signed-off-by: Marek Vasut <marex at denx.de>
---
Cc: Angus Ainslie <angus at akkea.ca>
Cc: Dmitrii Merkurev <dimorinny at google.com>
Cc: Eddie Cai <eddie.cai.linux at gmail.com>
Cc: Kever Yang <kever.yang at rock-chips.com>
Cc: Lukasz Majewski <lukma at denx.de>
Cc: Miquel Raynal <miquel.raynal at bootlin.com>
Cc: Mattijs Korpershoek <mkorpershoek at baylibre.com>
Cc: Nishanth Menon <nm at ti.com>
Cc: Patrice Chotard <patrice.chotard at foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay at foss.st.com>
Cc: Philipp Tomsich <philipp.tomsich at vrull.eu>
Cc: Simon Glass <sjg at chromium.org>
Cc: Stefan Roese <sr at denx.de>
Cc: kernel at puri.sm
---
drivers/usb/host/usb-sandbox.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/usb/host/usb-sandbox.c b/drivers/usb/host/usb-sandbox.c
index d1103dcb2e9..582f72d00c1 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)
{
--
2.40.1
More information about the U-Boot
mailing list