From: Julius Werner <jwerner@chromium.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dongjin Kim <tobetter@gmail.com>,
Fengguang Wu <fengguang.wu@intel.com>,
Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Simon Glass <sjg@chromium.org>,
Doug Anderson <dianders@chromium.org>,
Olof Johansson <olofj@chromium.org>,
Vivek Gautam <gautam.vivek@samsung.com>,
Julius Werner <jwerner@chromium.org>
Subject: [PATCH 3/3] usb: misc: usb3503: Remove 100ms sleep on reset, conform to data sheet
Date: Fri, 31 May 2013 18:34:52 -0700 [thread overview]
Message-ID: <1370050492-6046-4-git-send-email-jwerner@chromium.org> (raw)
In-Reply-To: <1370050492-6046-1-git-send-email-jwerner@chromium.org>
The usb3503 driver sleeps a flat 100ms when resetting the chip, with a
comment about waiting for the reference clock. This seems to be a
board-specific detail that should not hold up boot across all platforms.
This patch reduces the sleep to the 4ms initialization delay that the
chip itself actually requires (as per its data sheet). If certain boards
require more time to set up the reference clock, they should change this
through local patches or add a proper, configurable synchronization
mechanism.
Signed-off-by: Julius Werner <jwerner@chromium.org>
---
drivers/usb/misc/usb3503.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c
index a647a2e..a1d509f 100644
--- a/drivers/usb/misc/usb3503.c
+++ b/drivers/usb/misc/usb3503.c
@@ -107,11 +107,9 @@ static int usb3503_reset(int gpio_reset, int state)
if (gpio_is_valid(gpio_reset))
gpio_set_value(gpio_reset, state);
- /* Wait RefClk when RESET_N is released, otherwise Hub will
- * not transition to Hub Communication Stage.
- */
+ /* Wait T_HUBINIT == 4ms for hub logic to stabilize */
if (state)
- msleep(100);
+ usleep_range(4000, 10000);
return 0;
}
--
1.7.12.4
next prev parent reply other threads:[~2013-06-01 1:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-01 1:34 [PATCH 0/3] usb: misc: usb3503: Fix up usb3503 driver Julius Werner
2013-06-01 1:34 ` [PATCH 1/3] usb: misc: usb3503: Fix up whitespace Julius Werner
2013-06-01 3:08 ` Dongjin Kim
2013-06-01 1:34 ` [PATCH 2/3] usb: misc: usb3503: Remove hardcoded disabling of ports 2 and 3 Julius Werner
2013-06-01 3:01 ` Dongjin Kim
2013-06-01 1:34 ` Julius Werner [this message]
2013-06-01 3:08 ` [PATCH 3/3] usb: misc: usb3503: Remove 100ms sleep on reset, conform to data sheet Dongjin Kim
2013-06-01 2:55 ` [PATCH 0/3] usb: misc: usb3503: Fix up usb3503 driver Olof Johansson
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=1370050492-6046-4-git-send-email-jwerner@chromium.org \
--to=jwerner@chromium.org \
--cc=dianders@chromium.org \
--cc=fengguang.wu@intel.com \
--cc=gautam.vivek@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=olofj@chromium.org \
--cc=sjg@chromium.org \
--cc=tobetter@gmail.com \
--cc=yongjun_wei@trendmicro.com.cn \
/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®