projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
usb: dwc2: Defer forcing peripheral mode
[platform/kernel/linux-rpi.git]
/
drivers
/
usb
/
dwc2
/
params.c
diff --git
a/drivers/usb/dwc2/params.c
b/drivers/usb/dwc2/params.c
index
93f52e3
..
5e0f85c
100644
(file)
--- a/
drivers/usb/dwc2/params.c
+++ b/
drivers/usb/dwc2/params.c
@@
-546,6
+546,11
@@
static void dwc2_get_device_properties(struct dwc2_hsotg *hsotg)
&p->g_np_tx_fifo_size);
num = device_property_count_u32(hsotg->dev, "g-tx-fifo-size");
&p->g_np_tx_fifo_size);
num = device_property_count_u32(hsotg->dev, "g-tx-fifo-size");
+#if IS_ENABLED(CONFIG_EXTCON)
+ if (of_find_property(hsotg->dev->of_node,
+ "g-extcon-always-on", NULL))
+ p->g_extcon_always_on = 1;
+#endif
if (num > 0) {
num = min(num, 15);
memset(p->g_tx_fifo_size, 0,
if (num > 0) {
num = min(num, 15);
memset(p->g_tx_fifo_size, 0,
@@
-859,7
+864,8
@@
static void dwc2_get_dev_hwparams(struct dwc2_hsotg *hsotg)
if (hsotg->dr_mode == USB_DR_MODE_HOST)
return;
if (hsotg->dr_mode == USB_DR_MODE_HOST)
return;
- dwc2_force_mode(hsotg, false);
+ if (hsotg->dr_mode != USB_DR_MODE_PERIPHERAL)
+ dwc2_force_mode(hsotg, false);
gnptxfsiz = dwc2_readl(hsotg, GNPTXFSIZ);
gnptxfsiz = dwc2_readl(hsotg, GNPTXFSIZ);