usb: gadget: atmel_usba_udc: condition clocks to vbus state
authorSylvain Rochet <sylvain.rochet@finsecur.com>
Thu, 12 Feb 2015 17:54:06 +0000 (18:54 +0100)
committerFelipe Balbi <balbi@ti.com>
Wed, 11 Mar 2015 15:19:37 +0000 (10:19 -0500)
commita64ef71ddc13fc76a6f4af8c61e0106a62004380
treeba03e7ab4154e4a88fd4cd86623e97b05be403f6
parentbb0a203c3a4e37b4bbb1f8ef55a855618dbba265
usb: gadget: atmel_usba_udc: condition clocks to vbus state

If USB PLL is not necessary for other USB drivers (e.g. OHCI and EHCI)
we will reduce power consumption by switching off the USB PLL if no USB
Host is currently connected to this USB Device.

We are using Vbus GPIO signal to detect Host presence. If Vbus signal is
not available then the device stays continuously clocked.

Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.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
drivers/usb/gadget/udc/atmel_usba_udc.h