usb: dwc3: implement runtime PM
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 16 May 2016 10:14:48 +0000 (13:14 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 20 Jun 2016 09:32:38 +0000 (12:32 +0300)
commitfc8bb91bc83ef82868533e75f5a11abc1158ec81
tree77926a39383c848b90336d60328992c67cb1f0d5
parent4cb4221764ef473cd36e1953f1fea11865786d65
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.

Tested-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h
drivers/usb/dwc3/gadget.c