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:

committed by
Marek Vasut

parent
57dbc15143
commit
a06955ae1e
@@ -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 */
|
||||
|
Reference in New Issue
Block a user