From: John Youn <johnyoun@synopsys.com>
To: linux-usb@vger.kernel.org
Cc: johnyoun@synopsys.com
Cc: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Michael Niewoehner <linux@mniewoehner.de>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Tao Huang <huangtao@rock-chips.com>
Cc: Julius Werner <jwerner@chromium.org>
Cc: linux-kernel@vger.kernel.org
Cc: Caesar Wang <caesar.upstream@gmail.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Remi Pommarel <repk@triplefau.lt>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Subject: [RFT PATCH v2 1/4] usb: dwc2: gadget: Only initialize device if in device mode
Date: Wed, 24 Aug 2016 16:19:54 -0700 [thread overview]
Message-ID: <bf1fc5cb1a534a0d3e64694e0e8382a337b147f0.1471991702.git.johnyoun@synopsys.com> (raw)
In-Reply-To: <cover.1471991702.git.johnyoun@synopsys.com>
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
next prev parent reply other threads:[~2016-08-24 23:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-24 23:19 [RFT PATCH v2 0/4] usb: dwc2: Fix core reset and force mode delays John Youn
2016-08-24 23:19 ` John Youn [this message]
2016-08-24 23:19 ` [RFT PATCH v2 2/4] usb: dwc2: Add delay to core soft reset John Youn
2016-08-24 23:20 ` [RFT PATCH v2 3/4] usb: dwc2: Properly account for the force mode delays John Youn
2016-08-24 23:20 ` [RFT PATCH v2 4/4] usb: dwc2: Force mode optimizations John Youn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bf1fc5cb1a534a0d3e64694e0e8382a337b147f0.1471991702.git.johnyoun@synopsys.com \
--to=johnyoun@synopsys.com \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®