diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2024-02-28 17:05:18 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-02-29 09:10:38 +0100 |
commit | 0b90c781d183b230375b4c9b5755849b2eb45a8d (patch) | |
tree | 9f5e9331292c25abea3a0a7f392d0fcc6d532e5e /include/linux | |
parent | eb633952b0be040c0b9f5a42b07bc678429dcec2 (diff) | |
download | barebox-0b90c781d183b230375b4c9b5755849b2eb45a8d.tar.gz barebox-0b90c781d183b230375b4c9b5755849b2eb45a8d.tar.xz |
usb: print number of skipped OTG controllers when scanning
I often get confused by running usb and wondering why devices behind
unconfigured OTG controllers are not enumerated. Improve the user
experience by printing a message when doing a USB scan while some OTG
controllers are not yet configured (i.e. the otg.mode device parameter
hasn't been set to "peripheral" or "host").
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240228160518.1589193-6-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/usb/usb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/usb/usb.h b/include/linux/usb/usb.h index a611d19b4a..4ad2fd32d2 100644 --- a/include/linux/usb/usb.h +++ b/include/linux/usb/usb.h @@ -480,6 +480,8 @@ enum usb_device_speed of_usb_get_maximum_speed(struct device_node *np, int usb_register_otg_device(struct device *parent, int (*set_mode)(void *ctx, enum usb_dr_mode mode), void *ctx); +int otg_device_get_mode(struct device *dev); + extern struct bus_type otg_bus_type; extern struct list_head usb_device_list; |