diff options
author | Patrick Delaunay <patrick.delaunay@foss.st.com> | 2022-09-09 11:45:23 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2023-01-14 14:10:30 +0100 |
commit | 5454dea3137da465549cb08d668936552f28d0aa (patch) | |
tree | 08f07b2ea80ba5610b4462a5a26b50aaa978c45f /common/usb_hub.c | |
parent | fe4c21de4fbf5756d354d2473ffc675e7596ccfb (diff) |
usb: hub: allow to increase HUB_DEBOUNCE_TIMEOUT
Add a new CONFIG_USB_HUB_DEBOUNCE_TIMEOUT to increase the
HUB_DEBOUNCE_TIMEOUT value, for example to 2s because some usb device
needs around 1.5s or more to make the hub port status to be
connected steadily after being powered off and powered on.
This 2s value is aligned with Linux driver and avoids to configure
"usb_pgood_delay" as a workaround for connection timeout on
some USB device; normally the env variable "usb_pgood_delay" is used
to delay the first query after power ON and thus the device answer,
but this variable not used to increase the connection timeout delay.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
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 95f1449b5c..f7fd12c045 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -47,7 +47,7 @@ #define HUB_SHORT_RESET_TIME 20 #define HUB_LONG_RESET_TIME 200 -#define HUB_DEBOUNCE_TIMEOUT 1000 +#define HUB_DEBOUNCE_TIMEOUT CONFIG_USB_HUB_DEBOUNCE_TIMEOUT #define PORT_OVERCURRENT_MAX_SCAN_COUNT 3 |