usb: gadget: udc: atmel: set vbus irqflags explicitly
authorNicolas Ferre <nicolas.ferre@microchip.com>
Thu, 31 Aug 2017 12:51:40 +0000 (14:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2017 09:27:31 +0000 (11:27 +0200)
commit86377bf330898f0db850b65b371c2e4843cadf3c
tree09e34ae149cf9787cbcfed7f646509903570b5c5
parentf72264e79ae74c845f9af8e2fdda86075afd0331
usb: gadget: udc: atmel: set vbus irqflags explicitly

commit 6baeda120d90aa637b08f7604de104ab00ce9126 upstream.

The driver triggers actions on both edges of the vbus signal.

The former PIO controller was triggering IRQs on both falling and rising edges
by default. Newer PIO controller don't, so it's better to set it explicitly to
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING.

Without this patch we may trigger the connection with host but only on some
bouncing signal conditions and thus lose connecting events.

Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/atmel_usba_udc.c