Skip to content
Commit bb0a203c authored by Sylvain Rochet's avatar Sylvain Rochet Committed by Felipe Balbi
Browse files

usb: gadget: atmel_usba_udc: Request an auto disabled Vbus signal IRQ



Vbus IRQ handler needs a started UDC driver to work because it uses
udc->driver, which is set by the UDC start handler. The previous way
chosen was to return from interrupt if udc->driver is NULL using a
spinlock around the check.

We now request an auto disabled (IRQ_NOAUTOEN) Vbus signal IRQ instead
of an auto enabled IRQ followed by disable_irq(). This way we remove the
very small timeslot of enabled IRQ which existed previously between
request() and disable(). We don't need anymore to check if udc->driver
is NULL in IRQ handler.

Signed-off-by: default avatarSylvain Rochet <sylvain.rochet@finsecur.com>
Suggested-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 227ab58c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment