mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
usb: gadget: Do not call board_usb_xxx() directly in USB gadget drivers
Add 2 functions to wrap the calls to board_usb_init() and board_usb_cleanup(). This is a preparatory work for DM support for UDC drivers (DM_USB_GADGET). Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
parent
57dbc15143
commit
a06955ae1e
8 changed files with 28 additions and 46 deletions
|
@ -19,6 +19,7 @@
|
|||
#define __LINUX_USB_GADGET_H
|
||||
|
||||
#include <errno.h>
|
||||
#include <usb.h>
|
||||
#include <linux/compat.h>
|
||||
#include <linux/list.h>
|
||||
|
||||
|
@ -926,4 +927,13 @@ extern void usb_ep_autoconfig_reset(struct usb_gadget *);
|
|||
|
||||
extern int usb_gadget_handle_interrupts(int index);
|
||||
|
||||
static inline int usb_gadget_initialize(int index)
|
||||
{
|
||||
return board_usb_init(index, USB_INIT_DEVICE);
|
||||
}
|
||||
|
||||
static inline int usb_gadget_release(int index)
|
||||
{
|
||||
return board_usb_cleanup(index, USB_INIT_DEVICE);
|
||||
}
|
||||
#endif /* __LINUX_USB_GADGET_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue