[PATCH] USB: gadget: atmel_usba_udc: Enable/disable USB PLL on Vbus change

Sylvain Rochet sylvain.rochet at finsecur.com
Sat Jan 17 03:07:10 PST 2015


Hello Boris,

On Sat, Jan 17, 2015 at 10:43:58AM +0100, Boris Brezillon wrote:
> 
> You're right, except that calling enable/disable on the PLL clk in irq
> context is pretty much useless since the activation/deactivation code
> of the PLL is in prepare/unprepare, so you won't save much power by
> doing that (gating the peripheral clk should save a bit though). 
> 
> To solve that issue I thought we could move to a threaded_irq (where we
> can safely sleep), but you'll also have to take of not calling
> prepare/unprepare in sections where at least one spinlock is taken (for
> the same reason => you cannot sleep with while you hold spinlocks).

Hummm, I must admit I waited for such a useful tip, adding the 
prepare/unprepare in interrupt context looked dirty at first sight, 
thank you very much :)

I will try with a threaded_irq.

Sylvain



More information about the linux-arm-kernel mailing list