mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
usb: udc: implement DM versions of usb_gadget_initialize()/_release()/_handle_interrupt()
When DM_USB_GADGET the platform code for the USB device must be replaced by calls to a USB device driver. usb_gadget_initialize() probes the USB device driver. usb_gadget_release() removes the USB device driver. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
committed by
Marek Vasut
parent
687ab54560
commit
ff8d755834
@@ -927,6 +927,12 @@ extern void usb_ep_autoconfig_reset(struct usb_gadget *);
|
||||
|
||||
extern int usb_gadget_handle_interrupts(int index);
|
||||
|
||||
#if CONFIG_IS_ENABLED(DM_USB_GADGET)
|
||||
int usb_gadget_initialize(int index);
|
||||
int usb_gadget_release(int index);
|
||||
int dm_usb_gadget_handle_interrupts(struct udevice *dev);
|
||||
#else
|
||||
#include <usb.h>
|
||||
static inline int usb_gadget_initialize(int index)
|
||||
{
|
||||
return board_usb_init(index, USB_INIT_DEVICE);
|
||||
@@ -936,4 +942,6 @@ static inline int usb_gadget_release(int index)
|
||||
{
|
||||
return board_usb_cleanup(index, USB_INIT_DEVICE);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_USB_GADGET_H */
|
||||
|
Reference in New Issue
Block a user