diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2015-05-04 11:30:54 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-05-14 18:49:33 -0600 |
commit | 08f3bb0bcd84b57cc627ab0acda8aebacf27544e (patch) | |
tree | bf28622599d080f8c11754a53a6f8387a5529177 /common/usb_hub.c | |
parent | 6a72e804a2b27e95cc7394876cc6a57f29e70817 (diff) | |
download | u-boot-08f3bb0bcd84b57cc627ab0acda8aebacf27544e.tar.gz u-boot-08f3bb0bcd84b57cc627ab0acda8aebacf27544e.tar.bz2 u-boot-08f3bb0bcd84b57cc627ab0acda8aebacf27544e.zip |
usb: add device connection/disconnection detection
Provide a function to detect USB device insertion/removal in order to
avoid having to do USB enumeration in a tight loop when trying to detect
peripheral hotplugging.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/usb_hub.c')
-rw-r--r-- | common/usb_hub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/usb_hub.c b/common/usb_hub.c index af39c76f7f..be01f4f257 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -79,7 +79,7 @@ static int usb_get_hub_status(struct usb_device *dev, void *data) data, sizeof(struct usb_hub_status), USB_CNTL_TIMEOUT); } -static int usb_get_port_status(struct usb_device *dev, int port, void *data) +int usb_get_port_status(struct usb_device *dev, int port, void *data) { return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port, |