aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_gadget.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-05-22usb: musb: gadget: fix to_musb_ep() to not return NULLBin Liu1-4/+1
UDC core ensures the usb_ep parameter passed in is not NULL, so checking if (ep != NULL) is pointless. Convert to_musb_ep() to a simple macro to not directly return NULL to avoid warnings from code static analysis tools. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-22usb: musb: gadget: fix to_musb_request() to not return NULLBin Liu1-4/+1
The gadget function drivers should ensure the usb_request parameter passed in is not NULL. UDC core doesn't check if it is NULL, so MUSB driver shouldn't have to check it either. Convert to_musb_request() to a simple macro to not directly return NULL to avoid warnings from code static analysis tools. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-07USB: musb: Remove redundant license textGreg Kroah-Hartman1-26/+0
Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Chen-Yu Tsai <wens@csie.org> Acked-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-04USB: add SPDX identifiers to all remaining files in drivers/usb/Greg Kroah-Hartman1-0/+1
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-28usb: musb: add Kconfig options for HOST, GAGDET or DUAL_ROLE modesDaniel Mack1-0/+21
This makes building the actual object files optional to the selected mode, which saves users who know which kind of USB mode support they need some binary size. Unimplemented functions are stubbed out with static inline functions. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-05-28usb: musb: move function declarations to musb_{host,gadget}.hDaniel Mack1-6/+11
Let the function declarations live in the header files they belong to, which makes it easier to stub them out later. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-02-17usb: musb: gadget: do not poke with gadget's list_headFelipe Balbi1-2/+5
struct usb_request's list_head is supposed to be used only by gadget drivers, but musb is abusing that. Give struct musb_request its own list_head and prevent musb from poking into other driver's business. Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-02-01usb: musb: maintain three states for buffer mappings instead of twoMian Yousaf Kaukab1-1/+7
If dma buffers are mapped by a higher layer, with a boolean musb_request.mapped it is still possible to call dma_sync_single_for_device() from musb_g_giveback(), even if txstate()/rxstate() has called unmap_dma_buffer() before falling back to pio mode. Moreover, check for musb_ep->dma is moved within map_dma_buffer() so where applicable checks for it are removed. And where possible, checks for is_dma_capable() are merged with buffer map state check. Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2010-10-22usb: musb: support ISO high bandwidth for gadget modeMing Lei1-0/+2
This patch has been tested OK on beagle B5 board and use usbtest #15 and #16 as testcase. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Reviewed-by: Sergei Shtylyov <sshtylyov@mvista.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Anand Gadiyar <gadiyar@ti.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-24usb: musb: gadget: restart request on clearing endpoint haltSergei Shtylyov1-0/+2
Commit 46034dca515bc4ddca0399ae58106d1f5f0d809f (USB: musb_gadget_ep0: stop abusing musb_gadget_set_halt()) forgot to restart a queued request after clearing the endpoint halt feature. This results in a couple of USB resets while enumerating the file-backed storage gadget due to CSW packet not being sent for the MODE SENSE(10) command. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: stable@kernel.org Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11USB: musb_gadget_ep0: stop abusing musb_gadget_set_halt()Sergei Shtylyov1-2/+0
Stop playing with musb->lock and abusing musb_gadget_set_halt() in the code clearing the endpoint halt feature -- instead, manipulate the registers directly. While at it, get rid uf unneeded line breaks and over-indentation in the code setting the endpoint halt feature. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11USB: musb_gadget: implement set_wedge() methodSergei Shtylyov1-0/+2
Implement the driver's set_wedge() method by adding the 'wedged' flag to the 'struct musb_ep'. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-13USB: Add MUSB and TUSB supportFelipe Balbi1-0/+108
This patch adds support for MUSB and TUSB controllers integrated into omap2430 and davinci. It also adds support for external tusb6010 controller. Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>