aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/udc
Commit message (Collapse)AuthorAge
...
| * usb: gadget: amd5536udc: remove forward declaration of udc_pci_*Sudip Mukherjee2015-10-01
| | | | | | | | | | | | | | Remove the forward declarations of udc_pci_probe and udc_pci_remove. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: amd5536udc: remove forward declaration of udc_free_dma_chainSudip Mukherjee2015-10-01
| | | | | | | | | | | | | | | | Rearrange udc_free_dma_chain to remove the forward declaration. While at it fixed all the relevant checkpatch warnings. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: amd5536udc: remove forward declaration of udc_create_dma_chainSudip Mukherjee2015-10-01
| | | | | | | | | | | | | | | | Rearrange udc_create_dma_chain to remove the forward declaration. While rearranging fixed the relevant checkpatch warnings. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: amd5536udc: remove forward declaration of udc_remote_wakeupSudip Mukherjee2015-10-01
| | | | | | | | | | | | | | | | Rearrange the udc_remote_wakeup function to remove the forward declaration. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: amd5536udc: remove forward declaration of udc_probeSudip Mukherjee2015-10-01
| | | | | | | | | | | | | | | | Rearrange the udc_probe function to remove the forward declarations. While rearranging also fixed the relevant checkpatch warnings. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: amd5536udc: remove unnecessary conditionsSudip Mukherjee2015-10-01
| | | | | | | | | | | | | | | | | | | | | | | | The condition checking for irq_registered, regs, mem_region and active are not required as this is the remove function. And we are in the remove means that probe was successful and they can never be NULL at this point of code. It was required in the original code as the remove function was part of the error handler of probe function. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: amd5536udc: use free_dma_poolsSudip Mukherjee2015-10-01
| | | | | | | | | | | | | | | | | | | | | | We have the function free_dma_pools() which frees all the dma pools. Use it instead of calling all the functions separately. The if conditions for data_requests and stp_requests are also not required here as this is the remove function and we are here means probe has succeeded and dma has been successfully allocated, so they cannot be NULL here. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: amd5536udc: use WARN_ONSudip Mukherjee2015-10-01
| | | | | | | | | | | | | | | | Use WARN_ON() instead of halting the kernel with BUG_ON() and also fix the checkpatch warning. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: amd5536udc: fix error pathSudip Mukherjee2015-10-01
| | | | | | | | | | | | | | Handle the error properly instead of calling the pci remove function. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: amd5536udc: rewrite init_dma_poolsSudip Mukherjee2015-10-01
| | | | | | | | | | | | | | A rewrite of init_dma_pools() with proper error handling. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: pch-udc: fix lockFelipe Balbi2015-09-28
| | | | | | | | | | | | | | | | gadget methods should be called without spinlocks held. Reported-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: dummy_hcd: replace timeval with timespec64WEN Pingbo2015-09-27
| | | | | | | | | | | | | | | | | | | | | | The millisecond of the last second will be normal if tv_sec is overflowed. But for y2038 consistency and demonstration purpose, and avoiding further risks, we need to remove 'timeval' in this driver, to avoid similair problems. Signed-off-by: Pingbo Wen <pingbo.wen@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: at91_udc: move at91_udc_data in at91_udc.hAlexandre Belloni2015-09-27
| | | | | | | | | | | | | | | | | | struct at91_udc_data is now only used inside the driver, move it to its include. Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: gadget: bdc: fix memory leakSudip Mukherjee2015-09-30
|/ | | | | | | | | | If dma_pool_alloc() fails we are jumping to fail and releasing all the bd_tables which have been added to the chain but we missed freeing this bd_table which was just allocated and still not added to the chain of bd_table. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: drop null test before destroy functionsJulia Lawall2015-09-21
| | | | | | | | | | | | | | | | Remove unneeded NULL test. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x; @@ -if (x != NULL) \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: dummy_hcd: in transfer(), return data sent, not limitIgor Kotrasinski2015-09-21
| | | | | | | | | | | | | | | dummy_timer uses transfer() to update transfer limit. However, limit passed to dummy_timer changes depending on transfer type, so the actual limit is overwritten. This can cause unpredictably slow / fast bulk transfers when coupled with control / interrupt transfers. Fix by returning actual amount of data sent in transfer() and substracting from total. Signed-off-by: Igor Kotrasinski <i.kotrasinsk@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: dummy_hcd: fix rescan logic for transferIgor Kotrasinski2015-09-21
| | | | | | | | | | | | transfer() schedules a rescan for transfers larger than maxpacket, which is wrong for transfers that are multiples of maxpacket. Rewrite to fix and clarify packet multiple / remainder transfer logic. Signed-off-by: Igor Kotrasinski <i.kotrasinsk@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: dummy_hcd: fix unneeded else-if conditionIgor Kotrasinski2015-09-21
| | | | | | | We already know at this point that to_host is false. Signed-off-by: Igor Kotrasinski <i.kotrasinsk@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: dummy_hcd: emulate sending zlp in packet logicIgor Kotrasinski2015-09-21
| | | | | | | | | | | | | | | | | | currently, when a zlp flag is set and an urb/usb_request buffer is filled without a short packet, transfer() leaves its status at -EINPROGRESS and does not rescan for short packet. In a scenario where ep.maxpacket bytes are copied, URB_ZERO_PACKET is set, urb buffer is filled and usb_request buffer is not, transfer() returns with an urb with -EINPROGRESS status, which dummy_hcd treats as incomplete transfer. Check for zlp and rescan appropriately. Signed-off-by: Igor Kotrasinski <i.kotrasinsk@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: atmel_usba_udc: add ep capabilities support on device tree bindingSylvain Rochet2015-09-21
| | | | | | | | | | | | | | The recently added endpoint capabilities flags verification breaks Atmel USBA because the endpoint configuration was only added when the driver is bound using the legacy pdata interface. Convert endpoint configuration to new capabilities model when driver is bound to a device tree as well. Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Fixes: 47bef3865115 ("usb: gadget: atmel_usba_udc: add ep capabilities support") Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: gadget: amd5536udc: fix error handling in udc_pci_probe()Alexey Khoroshilov2015-09-14
| | | | | | | | | | | | | | | | If a failure happens early in udc_pci_probe(), error handling code just kfree(dev) and returns. The patch adds proper resource deallocations in udc_pci_probe() itself, since udc_pci_remove() is not suitabe to be called so early in initialization process. By the way, iounmap(dev->regs) is replaced by iounmap(dev->virt_addr) in udc_pci_remove() for clarity. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Felipe Balbi <balbi@ti.com>
* Merge branch 'for-next' of ↵Linus Torvalds2015-09-01
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "The usual stuff from trivial tree for 4.3 (kerneldoc updates, printk() fixes, Documentation and MAINTAINERS updates)" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (28 commits) MAINTAINERS: update my e-mail address mod_devicetable: add space before */ scsi: a100u2w: trivial typo in printk i2c: Fix typo in i2c-bfin-twi.c treewide: fix typos in comment blocks Doc: fix trivial typo in SubmittingPatches proportions: Spelling s/consitent/consistent/ dm: Spelling s/consitent/consistent/ aic7xxx: Fix typo in error message pcmcia: Fix typo in locking documentation scsi/arcmsr: Fix typos in error log drm/nouveau/gr: Fix typo in nv10.c [SCSI] Fix printk typos in drivers/scsi staging: comedi: Grammar s/Enable support a/Enable support for a/ Btrfs: Spelling s/consitent/consistent/ README: GTK+ is a acronym ASoC: omap: Fix typo in config option description mm: tlb.c: Fix error message ntfs: super.c: Fix error log fix typo in Documentation/SubmittingPatches ...
| * treewide: fix typos in comment blocksMasahiro Yamada2015-08-07
| | | | | | | | | | | | | | Looks like the word "contiguous" is often mistyped. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
* | usb: gadget: atmel: remove useless includeAlexandre Belloni2015-08-14
| | | | | | | | | | | | | | | | Definitions from linux/platform_data/atmel.h are not used, remove the include. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge tag 'usb-for-v4.3' of ↵Greg Kroah-Hartman2015-08-14
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: patches for v4.3 merge window New support for Allwinne SoC on the MUSB driver has been added to the list of glue layers. MUSB also got support for building all DMA engines in one binary; this will be great for distros. DWC3 now has no trace of dev_dbg()/dev_vdbg() usage. We will rely solely on tracing to debug DWC3. There was also a fix for memory corruption with EP0 when maxpacket size transfers are > 512 bytes. Robert's EP capabilities flags is making EP selection a lot simpler. UDCs are now required to set these flags up when adding endpoints to the framework. Other than these, we have the usual set of miscelaneous cleanups and minor fixes. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: remove gadget_chips.hRobert Baldyga2015-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This header file contains helpers for quirks based on UDC controller name. Since we have generic quirk bitfields in usb_gadget structure for all of these quirks we don't need to have this header any longer. This patch removes gadget_chips.h file and makes sure that it's no longer included anywhere in kernel sources. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: goku_udc: add goku_match_ep() functionRobert Baldyga2015-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 'match_ep' callback to utilize chip-specific knowledge in endpoint matching process. Function does the same that was done by chip-specific code inside of epautoconf. Now this code can be removed from there to separate generic code from platform specific logic. [ balbi@ti.com : fix build breakage ] Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: net2280: add net2280_match_ep() functionRobert Baldyga2015-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 'match_ep' callback to utilize chip-specific knowledge in endpoint matching process. Function does the same that was done by chip-specific code inside of epautoconf. Now this code can be removed from there to separate generic code from platform specific logic. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: move find_ep() from epautoconf to udc-coreRobert Baldyga2015-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move find_ep() to udc-core and rename it to gadget_find_ep_by_name(). It can be used in UDC drivers, especially in 'match_ep' callback after moving chip-specific endpoint matching logic from epautoconf to UDC drivers. Replace all calls of find_ep() function with gadget_find_ep_by_name(). Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: move ep_matches() from epautoconf to udc-coreRobert Baldyga2015-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move ep_matches() function to udc-core and rename it to usb_gadget_ep_match_desc(). This function can be used by UDC drivers in 'match_ep' callback to avoid writing lots of repetitive code. Replace all calls of ep_matches() with usb_gadget_ep_match_desc(). Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: epautoconf: remove pxa quirk from ep_matches()Robert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | | | | The same effect can be achieved by using capabilities flags, so now we can get rid of handling of hardware specific limitations in generic code. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: atmel_usba_udc: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: udc-xilinx: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: s3c2410_udc: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: s3c-hsudc: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: r8a66597-udc: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: pxa27x_udc: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: pxa25x_udc: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: pch_udc: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: omap_udc: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: net2280: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: net2272: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: mv_udc_core: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: mv_u3d_core: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: m66592-udc: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: lpc32xx_udc: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: gr_udc: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: goku_udc: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: fusb300_udc: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: fsl_udc_core: add ep capabilities supportRobert Baldyga2015-08-04
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>