]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - drivers/usb/dwc2/gadget.c
usb: dwc2: gadget: ensure lx_state corresponds to current state
authorGregory Herrero <gregory.herrero@intel.com>
Tue, 22 Sep 2015 13:16:54 +0000 (15:16 +0200)
committerFelipe Balbi <balbi@ti.com>
Thu, 1 Oct 2015 17:40:19 +0000 (12:40 -0500)
commit065d393124f06ef1f5a20a6f5f262fee2cfa873d
tree30b810f4932f8d7cba24fff2abd6adad16826ffc
parent2e84da6e340a652e942c3513703020976b28190b
usb: dwc2: gadget: ensure lx_state corresponds to current state

Correctly update lx_state on gadget connection and disconnection.
When usb cable is disconnected, lx_state must be updated to L3 as
controller could be in power off state.
When usb cable is connected, lx_state must be updated to L0 as
controller is powered.

Signed-off-by: Gregory Herrero <gregory.herrero@intel.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Tested-by: John Youn <johnyoun@synopsys.com>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc2/gadget.c