- 25 9月, 2014 1 次提交
-
-
由 Michal Sojka 提交于
All USB peripheral controller drivers call completion routines directly. This patch adds usb_gadget_giveback_request() which will be used instead of direct invocation in the next patch. The goal here is to have a place where common functionality can be added. Signed-off-by: NMichal Sojka <sojka@merica.cz> Acked-by: NFelipe Balbi <balbi@ti.com> Tested-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 23 9月, 2014 1 次提交
-
-
由 Felipe Balbi 提交于
This reverts commit f2267089. That commit causes more problem than fixes. Firstly, kfree() should be called after usb_ep_dequeue() and secondly, the way things are, we will try to dequeue a request that has already completed much more frequently than one which is pending. Cc: Li Jun <b47624@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com> Cc: stable <stable@vger.kernel.org> # 3.17 Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 18 9月, 2014 1 次提交
-
-
由 Felipe Balbi 提交于
This reverts commit be0a8887. The original commit f2267089 (usb: gadget: composite: dequeue cdev->req before free it in composite_dev_cleanup) ended up being reverted because it caused more issues then fixed. We will also revert this counter part commit so we start clean to properly add that idea back. Cc: Li Jun <b47624@freescale.com> Signed-of-by: NFelipe Balbi <balbi@ti.com>
-
- 16 9月, 2014 6 次提交
-
-
由 Andreas Larsson 提交于
This adds a bounce buffer that handles the end of OUT requests where req.length is not divisible by ep->ep.maxpacket. Before this, such requests were rejected as the DMA engine cannot restrict itself to buffers that are smaller than ep->ep.maxpacket. Signed-off-by: NAndreas Larsson <andreas@gaisler.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andreas Larsson 提交于
The state attribute is connected to the kobj of the udc, not the gadget. Signed-off-by: NAndreas Larsson <andreas@gaisler.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Laurent Pinchart 提交于
Use the local queue variable instead of computing it every time. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Laurent Pinchart 提交于
The struct usb_endpoint_descriptor wMaxPacketSize field the struct usb_ss_ep_comp_descriptor wBytesPerInterval field are stored in little-endian format. Convert the values from CPU order to little endian before storing the values. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Fengguang Wu 提交于
The function isn't called from outside of its compilation unit, make it static. Signed-off-by: NFengguang Wu <fengguang.wu@intel.com> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Robert Baldyga 提交于
This patch introduces virtual endpoint address mapping. It separates function logic form physical endpoint addresses making it more hardware independent. Following modifications changes user space API, so to enable them user have to switch on the FUNCTIONFS_VIRTUAL_ADDR flag in descriptors. Endpoints are now refered using virtual endpoint addresses chosen by user in endpoint descpriptors. This applies to each context when endpoint address can be used: - when accessing endpoint files in FunctionFS filesystemi (in file name), - in setup requests directed to specific endpoint (in wIndex field), - in descriptors returned by FUNCTIONFS_ENDPOINT_DESC ioctl. In endpoint file names the endpoint address number is formatted as double-digit hexadecimal value ("ep%02x") which has few advantages - it is easy to parse, allows to easly recognize endpoint direction basing on its name (IN endpoint number starts with digit 8, and OUT with 0) which can be useful for debugging purpose, and it makes easier to introduce further features allowing to use each endpoint number in both directions to have more endpoints available for function if hardware supports this (for example we could have ep01 which is endpoint 1 with OUT direction, and ep81 which is endpoint 1 with IN direction). Physical endpoint address can be still obtained using ioctl named FUNCTIONFS_ENDPOINT_REVMAP, but now it's not neccesary to handle USB transactions properly. Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 12 9月, 2014 3 次提交
-
-
由 Peter Chen 提交于
The udc driver can notify the udc core that bus reset occurs by calling this utility, the core will notify gadget driver this information and update gadget state accordingly. Signed-off-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Subbaraya Sundeep Bhatta 提交于
Xilinx USB2 device is a soft IP which supports both full and high speed USB 2.0 data transfers. This patch adds xilinx usb2 device driver support. Signed-off-by: NSubbaraya Sundeep Bhatta <sbhatta@xilinx.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Michal Nazarewicz 提交于
Even though the BUG() in __ffs_event_add is a dead-code, it is still better to warn rather then crash the system if that code ever gets executed. Reported-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 09 9月, 2014 13 次提交
-
-
由 Robert Baldyga 提交于
This patch introduces ioctl named FUNCTIONFS_ENDPOINT_DESC, which returns endpoint descriptor to userspace. It works only if function is active. Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Peter Chen 提交于
Add reset API at usb_gadget_driver, it calls disconnect handler currently, but may do different things in future. Acked-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Peter Chen 提交于
Add reset API at usb_gadget_driver, it calls disconnect handler currently, but may do different things in future. Acked-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Peter Chen 提交于
Add reset API at usb_gadget_driver, it calls disconnect handler currently, but may do different things in future. Acked-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Peter Chen 提交于
Add reset API at usb_gadget_driver, it calls disconnect handler currently, but may do different things in future. Acked-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Dan Carpenter 提交于
We need "idx" to be signed for the error handling to work. Fixes: 6d5c1c77 ('usb: gadget: f_fs: fix the redundant ep files problem') Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
Attach strings to gadget with usb_strings_attach. It is required for correct instantiation of functions more than once: instead of modifying the local uvc_en_us_strings a function instance specific copy is created with usb_gstrings_attach. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
There are no users of the old interface left. Remove it. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
Use the new function interface of f_uvc. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
Use the new function registration interface. It is required in order to integrate configfs support. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> [Updated copyright years] Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
Compile uvc_queue, uvc_v4l2, uvc_video separately so that later they can be all combined in a separately compiled f_uvc. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> [Make uvc_v4l2_ioctl_ops non-static] [Rename __UVC__V4L2__H__ and __UVC__VIDEO__H__] [Update MAINTAINERS] Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
Prepare for separate compilation of uvc function's components. Some symbols will have to be exported, so rename to avoid conflicts with functions of the same name in host uvc. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> [Rename uvc_video_pump and uvc_queue_head as well] [Rename forgotten uvc_queue_cancel instance in a comment] Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Amit Virdi 提交于
The kbuild test bot generated the warning: drivers/usb/gadget/function/f_sourcesink.c:1498: warning: comparison is always false due to limited range of data type This patch fixes it. Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NAmit Virdi <amit.virdi@st.com> CC: Felipe Balbi <balbi@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 08 9月, 2014 3 次提交
-
-
由 Andrzej Pietrasiewicz 提交于
When configfs support is integrated the future uvc function module must not take any parameters. Move parameters to webcam. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: NMichael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Laurent Pinchart 提交于
Simplify ioctl handling by using video_ioctl2. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Laurent Pinchart 提交于
To handle class requests received on ep0, the driver needs to access the length and direction of the request after the setup stage. It currently stores them in a v4l2 event during the setup stage, and then copies them from the event structure to the driver internal state structure when the event is dequeued. This two-steps approach isn't necessary. Simplify the driver by storing the needed information in the driver internal state structure directly during the setup stage. Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 03 9月, 2014 3 次提交
-
-
由 Robert Baldyga 提交于
Up to now, when endpoint addresses in descriptors were non-consecutive, there were created redundant files, which could cause problems in kernel, when user tried to read/write to them. It was result of fact that maximum endpoint address was taken as total number of endpoints in function. This patch adds endpoint descriptors counting and storing their addresses in eps_addrmap to verify their cohesion in each speed. Endpoint address map would be also useful for further features, just like vitual endpoint address mapping. Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Rasmus Villemoes 提交于
Clearly this was meant to be an include guard, but a trailing underscore was missing. It has been this way since the file was introduced in 0fe6f1d1 ("usb: udc: add Faraday fusb300 driver"). Fixes: 0fe6f1d1 ("usb: udc: add Faraday fusb300 driver") Cc: <stable@vger.kernel.org> Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Ricardo Ribalda Delgado 提交于
Without this patch, some hosts keep restarting indefinitely the target. Fixes: ae8e530a (usb: gadget: net2280: Code Cleanup) Signed-off-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 02 9月, 2014 8 次提交
-
-
由 Daniel Mack 提交于
The UAC2 function driver currently responds to all packets at all times with wMaxPacketSize packets. That results in way too fast audio playback as the function driver (which is in fact supposed to define the audio stream pace) delivers as fast as it can. Fix this by sizing each packet correctly with the following steps: a) Set the packet's size by dividing the nominal data rate by the playback endpoint's interval. b) If there is a residual value from the calculation in a), add it to a accumulator to keep track of it across packets. c) If the accumulator has gathered at least the number of bytes that are needed for one sample frame, increase the packet size. This way, the packet size calculation will get rid of any kind of imprecision that would otherwise occur with a simple division over time. Some of the variables that are needed while processing each packet are pre-computed for performance reasons. Signed-off-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Daniel Mack 提交于
With packet sizes other than 512, payloads in the packets may wrap around the ALSA dma buffer partially, which leads to memory corruption and audible clicks and pops in the audio stream at the moment, because there is no boundary check before the memcpy(). In preparation to an implementation for smaller and dynamically sized packets, we have to address such cases, and copy the payload in two steps conditionally. The 'src' and 'dst' approach doesn't work here anymore, as different behavior is necessary in playback and capture cases. Thus, this patch open-codes the routine now. Signed-off-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Daniel Mack 提交于
Add a simple container_of() wrapper to get a struct f_uac2_opts from a struct struct audio_dev. Use it in two places where it is currently open-coded. Signed-off-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Daniel Mack 提交于
In afunc_bind() and afunc_set_alt(), &uac2->pdev.dev are used multiple times. Adding a short-hand for them makes lines shorter so we can remove some line wraps. No functional change. Signed-off-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Daniel Mack 提交于
Restructure some code to make it easier to read. While at it, return -ENOMEM instead of -EINVAL if usb_ep_alloc_request() fails, and omit the logging in such cases (the mm core will complain loud enough). Signed-off-by: NDaniel Mack <zonque@gmail.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Michal Nazarewicz 提交于
Flatten the start_transfer function by reversing the if condition and returning early out of the function if everything went fine. It makes the function look less complicated, at least to me, and easier to understand. Signed-off-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Li Jun 提交于
commit f2267089(usb: gadget: composite: dequeue cdev->req before free it in composite_dev_cleanup) fixed a bug: free the usb request(i.e. cdev->req) but does not dequeue it beforehand. This fix is not proper enough because it dequeues the request after free its data buffer, considering the hardware can access the buffer's memory anytime before the request's complettion rountine runs, and usb_ep_dequeue always call the complettion rountine before it returns, so the best way is to dequeue the request before free its buffer. Suggested-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NLi Jun <b47624@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Geert Uytterhoeven 提交于
If NO_DMA=y: drivers/built-in.o: In function `usbhsg_dma_map_ctrl': mod_gadget.c:(.text+0x53b226): undefined reference to `usb_gadget_map_request' mod_gadget.c:(.text+0x53b242): undefined reference to `usb_gadget_unmap_request' Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 30 8月, 2014 1 次提交
-
-
由 Yegor Yefremov 提交于
Using $(PWD) breaks builds when make was invoked from outside of the kernel tree. Signed-off-by: NYegor Yefremov <yegorslists@googlemail.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-