usb: dwc2: gadget: parity fix in isochronous mode
authorRoman Bacik <rbacik@broadcom.com>
Fri, 11 Sep 2015 01:13:43 +0000 (18:13 -0700)
committerFelipe Balbi <balbi@ti.com>
Fri, 2 Oct 2015 18:10:57 +0000 (13:10 -0500)
commitec1f9d9f01384fe656a6f92b90de274146fe35a1
tree887910b527a8d43e756a8a2a1e623a332e4ab172
parent5ee2a003e8622d51e865ffa5547a5708e592a1a5
usb: dwc2: gadget: parity fix in isochronous mode

USB OTG driver in isochronous mode has to set the parity of the receiving
microframe. The parity is set to even by default. This causes problems for
an audio gadget, if the host starts transmitting on odd microframes.

This fix uses Incomplete Periodic Transfer interrupt to toggle between
even and odd parity until the Transfer Complete interrupt is received.

Signed-off-by: Roman Bacik <rbacik@broadcom.com>
Reviewed-by: Abhinav Ratna <aratna@broadcom.com>
Reviewed-by: Srinath Mannam <srinath.mannam@broadcom.com>
Signed-off-by: Scott Branden <sbranden@broadcom.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc2/core.h
drivers/usb/dwc2/gadget.c
drivers/usb/dwc2/hw.h