UPSTREAM: usb: dwc2: Add functions to set and clear force mode
authorJohn Youn <John.Youn@synopsys.com>
Thu, 17 Dec 2015 19:17:12 +0000 (11:17 -0800)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 3 Jan 2017 10:47:50 +0000 (18:47 +0800)
commitcdef4b1644cda6807c24a26dd0c10e59f1045815
tree02a4ff312e89a20f1870b4e862d02de064fbd119
parent0aae8351de84666ccaf5f1a163e54b9caa2ccaa9
UPSTREAM: usb: dwc2: Add functions to set and clear force mode

Added functions to set force mode for host and device. These functions
will check the current mode and only force if needed thus avoiding
unnecessary force mode delays. However clearing the mode is currently
done unconditionally and with the delay in place. This is needed during
the connector ID status change interrupt in order to ensure that the
mode has changed properly. This preserves the old behavior only for this
case. The warning comment about this is moved into the clear mode
condition.

Change-Id: I9f7f1056071e2bb4ac1f6482d355241f1c827469
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 09c96980dc723462ed2eeacc945fed5bcb278f85)
drivers/usb/dwc2/core.c
drivers/usb/dwc2/core.h