summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-11-09 10:55:12 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-11-09 10:55:12 +0100
commitb4bea4a52101a01626667a625622e5415b868185 (patch)
tree5f5de0ccca7de6875dd5788ae8b5b316e3927a97 /include
parenta024d889a02a0c7e1e2406ae0be358906150d713 (diff)
parent44add42d43300a330647704141c5a285358361db (diff)
downloadbarebox-b4bea4a52101a01626667a625622e5415b868185.tar.gz
barebox-b4bea4a52101a01626667a625622e5415b868185.tar.xz
Merge branch 'for-next/usb'
Diffstat (limited to 'include')
-rw-r--r--include/usb/ehci.h20
-rw-r--r--include/usb/fsl_usb2.h6
-rw-r--r--include/usb/gadget-multi.h4
-rw-r--r--include/usb/usb.h1
4 files changed, 26 insertions, 5 deletions
diff --git a/include/usb/ehci.h b/include/usb/ehci.h
index 1008e92f02..9ca9252eb1 100644
--- a/include/usb/ehci.h
+++ b/include/usb/ehci.h
@@ -19,12 +19,26 @@ struct ehci_data {
void *drvdata;
};
+struct ehci_host;
+
#ifdef CONFIG_USB_EHCI
-int ehci_register(struct device_d *dev, struct ehci_data *data);
+struct ehci_host *ehci_register(struct device_d *dev, struct ehci_data *data);
+void ehci_unregister(struct ehci_host *);
+int ehci_detect(struct ehci_host *ehci);
#else
-static inline int ehci_register(struct device_d *dev, struct ehci_data *data)
+static inline struct ehci_host *ehci_register(struct device_d *dev,
+ struct ehci_data *data)
+{
+ return ERR_PTR(-ENOSYS);
+}
+
+static inline void ehci_unregister(struct ehci_host *ehci)
+{
+}
+
+static inline int ehci_detect(struct ehci_host *ehci)
{
- return -ENOSYS;
+ return 0;
}
#endif
diff --git a/include/usb/fsl_usb2.h b/include/usb/fsl_usb2.h
index 881a5d4fdf..39757f71ad 100644
--- a/include/usb/fsl_usb2.h
+++ b/include/usb/fsl_usb2.h
@@ -23,7 +23,9 @@ struct fsl_usb2_platform_data {
unsigned int port_enables;
};
-int ci_udc_register(struct device_d *dev, void __iomem *regs);
-void ci_udc_unregister(void);
+struct fsl_udc;
+
+struct fsl_udc *ci_udc_register(struct device_d *dev, void __iomem *regs);
+void ci_udc_unregister(struct fsl_udc *);
#endif /* __USB_FSL_USB2_H */
diff --git a/include/usb/gadget-multi.h b/include/usb/gadget-multi.h
index 81beddc7cf..030e604fe7 100644
--- a/include/usb/gadget-multi.h
+++ b/include/usb/gadget-multi.h
@@ -16,4 +16,8 @@ int usb_multi_register(struct f_multi_opts *opts);
void usb_multi_unregister(void);
void usb_multi_opts_release(struct f_multi_opts *opts);
+int usbgadget_register(bool dfu, const char *dfu_opts,
+ bool fastboot, const char *fastboot_opts,
+ bool acm, bool export_bbu);
+
#endif /* __USB_GADGET_MULTI_H */
diff --git a/include/usb/usb.h b/include/usb/usb.h
index 9aab06c87c..eb2eeb8db3 100644
--- a/include/usb/usb.h
+++ b/include/usb/usb.h
@@ -157,6 +157,7 @@ struct usb_host {
};
int usb_register_host(struct usb_host *);
+void usb_unregister_host(struct usb_host *host);
int usb_host_detect(struct usb_host *host);