]> git.karo-electronics.de Git - linux-beck.git/commit
usb: dwc2: gadget: powerup controller if needed
authorGregory Herrero <gregory.herrero@intel.com>
Wed, 29 Apr 2015 20:09:09 +0000 (22:09 +0200)
committerFelipe Balbi <balbi@ti.com>
Wed, 29 Apr 2015 20:19:24 +0000 (15:19 -0500)
commit18b2b37c59e1bcd5a61716731ec5549fb5bb0203
tree0a907368686b22003e1fec466398dc110ff4fa8b
parent7ababa926c66c5c5a862489b475ff5d96a7dd03a
usb: dwc2: gadget: powerup controller if needed

During vbus session, usb controller needs to exit hibernation if it was
previously in suspend state.
Since controller will be resetted and configured, there is no need
to restore registers.

Moreover, set lx_state to L0 on B session. vbus_session callback may
not be used by all platforms. Thus, controller software state needs
to be set to L0 if the controller detects a valid B session.
Otherwise, lx_state will remain L2 and prevent any request submission.

Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Gregory Herrero <gregory.herrero@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc2/gadget.c