usb: gadget: add quirk_ep_out_aligned_size field to struct usb_gadget
authorDavid Cohen <david.a.cohen@linux.intel.com>
Mon, 9 Dec 2013 23:55:35 +0000 (15:55 -0800)
committerDanny Wood <danwood76@gmail.com>
Tue, 12 Feb 2019 13:38:25 +0000 (13:38 +0000)
commit70873bf42cfab3fc5e69cded13642a103cee0a56
tree6af36e2f9d1dde8d3eac0593c812dfe10f4e44d1
parent7f85a869832ed616169e5d8a26d554b2aeeebadc
usb: gadget: add quirk_ep_out_aligned_size field to struct usb_gadget

Due to USB controllers may have different restrictions, usb gadget layer
needs to provide a generic way to inform gadget functions to complain
with non-standard requirements.

This patch adds 'quirk_ep_out_aligned_size' field to struct usb_gadget
to inform when controller's epout requires buffer size to be aligned to
MaxPacketSize. A helper is also provided to align buffer size when
necessary.

Cc: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
include/linux/usb/gadget.h