summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | usb: musb: gadget: add musb_match_ep() functionRobert Baldyga2015-08-062-23/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: goku_udc: add goku_match_ep() functionRobert Baldyga2015-08-062-18/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-062-22/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-063-22/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-063-84/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: add 'ep_match' callback to usb_gadget_opsRobert Baldyga2015-08-062-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add callback that is called by epautoconf to allow UDC driver match the best endpoint for specific descriptor. It's intended to supply mechanism which allows to get rid of chip-specific endpoint matching code from epautoconf. If gadget has set 'ep_match' callback we prefer to call it first, and if it fails to find matching endpoint, then we try to use default matching algorithm. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: epautoconf: rework ep_matches() functionRobert Baldyga2015-08-061-49/+32
| | | | | | | | | | | | | | | | | | | | | Rework ep_matches() function to make it shorter and more readable. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: epautoconf: remove ep and desc configuration from ep_matches()Robert Baldyga2015-08-041-32/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As function ep_matches() is used to match endpoint with usb descriptor it's highly unintuitive that it modifies endpoint and descriptor structures fields. This patch moves code configuring ep and desc from ep_matches() to usb_ep_autoconfig_ss(), so now function ep_matches() does nothing more than its name suggests. [ balbi@ti.com : fix build warning ] 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-042-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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: epautoconf: add endpoint capabilities flags verificationRobert Baldyga2015-08-041-66/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce endpoint matching mechanism basing on endpoint capabilities flags. We check if endpoint supports transfer type and direction requested in ep descriptor. Since we have this new endpoint matching mechanism there is no need to have old code guessing endpoint capabilities basing on its name, so we are getting rid of it. Remove also the obsolete comment. 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-041-0/+11
| | | | | | | | | | | | | | | | | | | | | 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: renesas: gadget: add ep capabilities supportRobert Baldyga2015-08-041-0/+6
| | | | | | | | | | | | | | | | | | | | | 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: musb: gadget: add ep capabilities supportRobert Baldyga2015-08-041-0/+12
| | | | | | | | | | | | | | | | | | | | | 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: isp1760: udc: add ep capabilities supportRobert Baldyga2015-08-041-0/+11
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+9
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+10
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+15
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+10
| | | | | | | | | | | | | | | | | | | | | 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-041-15/+25
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+32
| | | | | | | | | | | | | | | | | | | | | 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-041-2/+12
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+22
| | | | | | | | | | | | | | | | | | | | | 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-041-12/+55
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+11
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+9
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+9
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+11
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+32
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+11
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+8
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+11
| | | | | | | | | | | | | | | | | | | | | 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-041-0/+13
| | | | | | | | | | | | | | | | | | | | | 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_qe_udc: add ep capabilities supportRobert Baldyga2015-08-041-0/+11
| | | | | | | | | | | | | | | | | | | | | 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: fotg210-udc: add ep capabilities supportRobert Baldyga2015-08-041-0/+11
| | | | | | | | | | | | | | | | | | | | | 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: dummy-hcd: add ep capabilities supportRobert Baldyga2015-08-041-15/+80
| | | | | | | | | | | | | | | | | | | | | 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: bdc: add ep capabilities supportRobert Baldyga2015-08-041-0/+9
| | | | | | | | | | | | | | | | | | | | | 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: bcm63xx_udc: add ep capabilities supportRobert Baldyga2015-08-041-4/+25
| | | | | | | | | | | | | | | | | | | | | 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: at91_udc: add ep capabilities supportRobert Baldyga2015-08-041-9/+29
| | | | | | | | | | | | | | | | | | | | | 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: amd5536udc: add ep capabilities supportRobert Baldyga2015-08-041-10/+78
| | | | | | | | | | | | | | | | | | | | | 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: dwc3: gadget: add ep capabilities supportRobert Baldyga2015-08-041-0/+11
| | | | | | | | | | | | | | | | | | | | | 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: dwc2: gadget: add ep capabilities supportRobert Baldyga2015-08-041-0/+13
| | | | | | | | | | | | | | | | | | | | | 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: chipidea: udc: add ep capabilities supportRobert Baldyga2015-08-041-0/+14
| | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | staging: emxx_udc: add ep capabilities supportRobert Baldyga2015-08-041-31/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | Convert endpoint configuration to new capabilities model. Fixed typo in "epc-nulk" to "epc-bulk". Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: add endpoint capabilities helper macrosRobert Baldyga2015-08-041-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add macros useful while initializing array of endpoint capabilities structures. These macros makes structure initialization more compact to decrease number of code lines and increase readability of code. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: add endpoint capabilities flagsRobert Baldyga2015-08-041-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce struct usb_ep_caps which contains information about capabilities of usb endpoints - supported transfer types and directions. This structure should be filled by UDC driver for each of its endpoints, and will be used in epautoconf in new ep matching mechanism which will replace ugly guessing of endpoint capabilities basing on its name. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: encapsulate endpoint claiming mechanismRobert Baldyga2015-08-042-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far it was necessary for usb functions to set ep->driver_data in endpoint obtained from autoconfig to non-null value, to indicate that endpoint is claimed by function (in autoconfig it was checked if endpoint has set this field to non-null value, and if it has, it was assumed that it is claimed). It could cause bugs because if some function doesn't set this field autoconfig could return the same endpoint more than one time. To help to avoid such bugs this patch adds claimed flag to struct usb_ep, and encapsulates endpoint claiming mechanism inside usb_ep_autoconfig_ss() and usb_ep_autoconfig_reset(), so now usb functions don't need to perform any additional actions to mark endpoint obtained from autoconfig as claimed. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: gadget: f_uac2: fix build warningFelipe Balbi2015-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 913e4a90b6f9 ("usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth") added a possible build warning when calling min(). In order to fix the warning, we just make sure to call min_t() and tell that its arguments should be u16. Cc: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: musb: musb_dsps: Simplify return statementSaurabh Karajgaonkar2015-08-041-5/+1
| | | | | | | | | | | | | | | | | | | | | Replace redundant variable use in return statement. Signed-off-by: Saurabh Karajgaonkar <skarajga@visteon.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: phy: phy-keystone: Simplify return statementSaurabh Karajgaonkar2015-08-041-5/+1
| | | | | | | | | | | | | | | | | | | | | Replace redundant variable use in return statement. Signed-off-by: Saurabh Karajgaonkar <skarajga@visteon.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | usb: phy: phy-mxs-usb: Simplify return statementSaurabh Karajgaonkar2015-08-041-5/+1
| | | | | | | | | | | | | | | | | | | | | Replace redundant variable use in return statement. Signed-off-by: Saurabh Karajgaonkar <skarajga@visteon.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
OpenPOWER on IntegriCloud