[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1370050492-6046-4-git-send-email-jwerner@chromium.org>
Date: Fri, 31 May 2013 18:34:52 -0700
From: Julius Werner <jwerner@...omium.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Dongjin Kim <tobetter@...il.com>,
Fengguang Wu <fengguang.wu@...el.com>,
Wei Yongjun <yongjun_wei@...ndmicro.com.cn>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Simon Glass <sjg@...omium.org>,
Doug Anderson <dianders@...omium.org>,
Olof Johansson <olofj@...omium.org>,
Vivek Gautam <gautam.vivek@...sung.com>,
Julius Werner <jwerner@...omium.org>
Subject: [PATCH 3/3] usb: misc: usb3503: Remove 100ms sleep on reset, conform to data sheet
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@...omium.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists