UPSTREAM: usb: dwc3: implement runtime PM
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 16 May 2016 10:14:48 +0000 (13:14 +0300)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 16 Aug 2016 12:48:19 +0000 (20:48 +0800)
commit99b6a3d0c87e22957f2b287e5a26610f5a679035
tree60dc671639118db590d3001c035a17bbee1abeba
parentad99d0b25174ac2ff5ad55fcddf092fcc8c4b140
UPSTREAM: usb: dwc3: implement runtime PM

this patch implements the most basic pm_runtime
support for dwc3. Whenever USB cable is dettached,
then we will allow core to runtime_suspend.

Runtime suspending will involve completely tearing
down event buffers and require a full soft-reset of
the IP.

Note that a further optimization could be
implemented once we decide to support hibernation,
which is to allow runtime_suspend with cable
connected when bus is in U3. That's subject to a
separate patch, however.

Change-Id: I2ff3ca0424151eb15066ccc3a6d8e46e7dc9ec4e
Tested-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(cherry picked from commit fc8bb91bc83ef82868533e75f5a11abc1158ec81)
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h
drivers/usb/dwc3/gadget.c