usb: gadget: atmel_usba_udc: Add suspend/resume with wakeup support
authorSylvain Rochet <sylvain.rochet@finsecur.com>
Thu, 12 Feb 2015 17:54:07 +0000 (18:54 +0100)
committerFelipe Balbi <balbi@ti.com>
Wed, 11 Mar 2015 15:19:37 +0000 (10:19 -0500)
commit112bf24471b50f806cbcbead7bd485da70401b83
tree2ecf7803a92a71d37a91d4ddc6f3802287b39281
parenta64ef71ddc13fc76a6f4af8c61e0106a62004380
usb: gadget: atmel_usba_udc: Add suspend/resume with wakeup support

This patch add suspend/resume with wakeup support for Atmel USBA.

On suspend: We stay continuously clocked if Vbus signal is not
available. If Vbus signal is available we set the Vbus signal as a wake
up source then we stop the USBA itself and all clocks used by USBA.

On resume: We recover clocks and USBA if we stopped them. If a device is
currently connected at resume time we enable the controller.

Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/udc/atmel_usba_udc.c