summaryrefslogtreecommitdiffstats
path: root/include/usb
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-09-25 08:06:22 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-09-25 08:06:22 +0200
commitfaddac631a0e521780854ecf9a53f96481a32716 (patch)
tree292c866315fd161df41d90f4bbde1572b14415d1 /include/usb
parent1ab2e649dc0ccef7ee990b999e1d8f8c32e7cd24 (diff)
parent0d4d157cf0d42206491b7a1b417c9904a9abd553 (diff)
downloadbarebox-faddac631a0e521780854ecf9a53f96481a32716.tar.gz
barebox-faddac631a0e521780854ecf9a53f96481a32716.tar.xz
Merge branch 'for-next/net' into master
Diffstat (limited to 'include/usb')
-rw-r--r--include/usb/usb.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/usb/usb.h b/include/usb/usb.h
index c2085eae87..39f4750916 100644
--- a/include/usb/usb.h
+++ b/include/usb/usb.h
@@ -20,6 +20,7 @@
#define _USB_H_
#include <driver.h>
+#include <slice.h>
#include <usb/ch9.h>
#include <usb/ch11.h>
#include <usb/usb_defs.h>
@@ -163,13 +164,18 @@ struct usb_host {
struct device_d *hw_dev;
int busnum;
struct usb_device *root_dev;
- int sem;
struct usb_phy *usbphy;
+ struct slice slice;
};
int usb_register_host(struct usb_host *);
void usb_unregister_host(struct usb_host *host);
+static inline struct slice *usb_device_slice(struct usb_device *udev)
+{
+ return &udev->host->slice;
+}
+
int usb_host_detect(struct usb_host *host);
int usb_set_protocol(struct usb_device *dev, int ifnum, int protocol);