summaryrefslogtreecommitdiff
path: root/patches.tizen/1259-usb-misc-usb3503-Remove-100ms-sleep-on-reset-conform.patch
blob: b0c55eba4925c9a2375cec12995ee343926f6fa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From bf3e9832241d93a60d04fa9e34f8a6604373eddd Mon Sep 17 00:00:00 2001
From: Julius Werner <jwerner@chromium.org>
Date: Fri, 31 May 2013 18:34:52 -0700
Subject: [PATCH 1259/1302] 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@chromium.org>
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[mszyprow: mainline commit 06a962fa7f9bf068eb1238d7aa20453b9e11a9fd]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I06a962fa7f9bf068eb1238d7aa20453b9e11a9fd

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
---
 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 a56299d..c357839 100644
--- a/drivers/usb/misc/usb3503.c
+++ b/drivers/usb/misc/usb3503.c
@@ -105,11 +105,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.8.3.2