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 /include/usb.h | |
parent | 6a72e804a2b27e95cc7394876cc6a57f29e70817 (diff) |
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 'include/usb.h')
-rw-r--r-- | include/usb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/usb.h b/include/usb.h index 5043bc3984..c709ce2cf6 100644 --- a/include/usb.h +++ b/include/usb.h @@ -265,6 +265,7 @@ int usb_kbd_deregister(int force); /* routines */ int usb_init(void); /* initialize the USB Controller */ int usb_stop(void); /* stop the USB Controller */ +int usb_detect_change(void); /* detect if a USB device has been (un)plugged */ int usb_set_protocol(struct usb_device *dev, int ifnum, int protocol); @@ -290,6 +291,7 @@ int usb_get_class_descriptor(struct usb_device *dev, int ifnum, int usb_clear_halt(struct usb_device *dev, int pipe); int usb_string(struct usb_device *dev, int index, char *buf, size_t size); int usb_set_interface(struct usb_device *dev, int interface, int alternate); +int usb_get_port_status(struct usb_device *dev, int port, void *data); /* big endian -> little endian conversion */ /* some CPUs are already little endian e.g. the ARM920T */ |