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 (00:55 +0100)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:46:24 +0000 (11:46 +0900)
commitd732752854f4cc2dd2d9baa43140c6f56e23e4b6
treef0c8b27e759dd1ed5287a32cc0f6945e27cf06c1
parent05a494dd2cc9e1bd367d9273eb4a2eb2dfb73473
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>
[backport from mainline]
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
include/linux/usb/gadget.h