Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1469787 > unrolled thread
| Started by | John Youn <johnyoun@synopsys.com> |
|---|---|
| First post | 2016-08-25 01:30 +0200 |
| Last post | 2016-08-25 01:30 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[RFT PATCH v2 1/4] usb: dwc2: gadget: Only initialize device if in device mode John Youn <johnyoun@synopsys.com> - 2016-08-25 01:30 +0200
| From | John Youn <johnyoun@synopsys.com> |
|---|---|
| Date | 2016-08-25 01:30 +0200 |
| Subject | [RFT PATCH v2 1/4] usb: dwc2: gadget: Only initialize device if in device mode |
| Message-ID | <s9PMn-17y-39@gated-at.bofh.it> |
In dwc2_hsotg_udc_start(), don't initialize the controller for device
mode unless we are actually in device mode.
Signed-off-by: John Youn <johnyoun@synopsys.com>
---
drivers/usb/dwc2/gadget.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index af46adf..358ba5a 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -3475,8 +3475,11 @@ static int dwc2_hsotg_udc_start(struct usb_gadget *gadget,
otg_set_peripheral(hsotg->uphy->otg, &hsotg->gadget);
spin_lock_irqsave(&hsotg->lock, flags);
- dwc2_hsotg_init(hsotg);
- dwc2_hsotg_core_init_disconnected(hsotg, false);
+ if (dwc2_hw_is_device(hsotg)) {
+ dwc2_hsotg_init(hsotg);
+ dwc2_hsotg_core_init_disconnected(hsotg, false);
+ }
+
hsotg->enabled = 0;
spin_unlock_irqrestore(&hsotg->lock, flags);
--
2.9.0
Back to top | Article view | linux.kernel
csiph-web