summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-09-29 12:05:02 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-10-04 09:48:21 +0200
commitdce140e7d1bbe1105f2745cc51c229c41d3360be (patch)
tree14f6b40c09d282b2506777c1ccd62b2991207333 /include
parent088cafe05866861f4d5185d8919771e2d7eba763 (diff)
downloadbarebox-dce140e7d1bbe1105f2745cc51c229c41d3360be.tar.gz
barebox-dce140e7d1bbe1105f2745cc51c229c41d3360be.tar.xz
usb: have usb_rescan return count of enumerated devices
Some USB mass storage devices can take a comparatively long time after vbus is applied until they can be enumerated. Board code can reissue usb_rescan() to retry enumeration at a later time. It's useful for board code to check whether any new devices have been detected by a usb_rescan() call. To facilitate this, have usb_rescan() return the number of devices found in addition to printing it to the log. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220929100502.895553-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/usb/usb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/usb/usb.h b/include/usb/usb.h
index 39f4750916..04b433ba73 100644
--- a/include/usb/usb.h
+++ b/include/usb/usb.h
@@ -201,7 +201,7 @@ 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);
-void usb_rescan(void);
+int usb_rescan(void);
/* big endian -> little endian conversion */
/* some CPUs are already little endian e.g. the ARM920T */