summaryrefslogtreecommitdiffstats
path: root/drivers/usb
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | usb: gadget: configfs: add reset API at usb_gadget_driverPeter Chen2014-09-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add reset API at usb_gadget_driver, it calls disconnect handler currently, but may do different things in future. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: composite: add reset API at usb_gadget_driverPeter Chen2014-09-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add reset API at usb_gadget_driver, it calls disconnect handler currently, but may do different things in future. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_fs: signedness bug in __ffs_func_bind_do_descs()Dan Carpenter2014-09-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need "idx" to be signed for the error handling to work. Fixes: 6d5c1c77bbf9 ('usb: gadget: f_fs: fix the redundant ep files problem') Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uvc: use usb_gstrings_attachAndrzej Pietrasiewicz2014-09-091-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uvc: remove compatibility layerAndrzej Pietrasiewicz2014-09-092-177/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no users of the old interface left. Remove it. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: webcam: convert webcam to new interface of f_uvcAndrzej Pietrasiewicz2014-09-093-16/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new function interface of f_uvc. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uvc: convert f_uvc to new function interfaceAndrzej Pietrasiewicz2014-09-095-30/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new function registration interface. It is required in order to integrate configfs support. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: Michael Grzeschik <m.grzeschik@pengutronix.de> [Updated copyright years] Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: uvc: separately compile some components of f_uvcAndrzej Pietrasiewicz2014-09-0911-36/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: Michael 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: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: uvc: rename functions to avoid conflicts with host uvcAndrzej Pietrasiewicz2014-09-094-55/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: Michael 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: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: zero: Fix warning generated by kbuildAmit Virdi2014-09-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Amit Virdi <amit.virdi@st.com> CC: Felipe Balbi <balbi@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | Merge tag 'v3.17-rc4' into nextFelipe Balbi2014-09-0850-127/+5831
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge Linux 3.17-rc4 here so we have all the latest fixes on next too. This also cleans up a few conflicts when applying patches. Signed-off-by: Felipe Balbi <balbi@ti.com> Conflicts: drivers/usb/gadget/Makefile drivers/usb/gadget/function/Makefile drivers/usb/gadget/legacy/Makefile drivers/usb/phy/phy-samsung-usb.h
| * | | usb: gadget: uvc: move module parameters from f_uvcAndrzej Pietrasiewicz2014-09-083-21/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When configfs support is integrated the future uvc function module must not take any parameters. Move parameters to webcam. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Tested-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uvc: Move to video_ioctl2Laurent Pinchart2014-09-082-141/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify ioctl handling by using video_ioctl2. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uvc: Store EP0 control request state during setup stageLaurent Pinchart2014-09-082-18/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: renesas_usbhs: Add device tree support for R-Car H2 and M2Yoshihiro Shimoda2014-09-051-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver supports other SoCs, but they need boards/Soc depend code. So, this patch adds device tree support for R-Car H2 and M2 initially. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: musb: cppi41: tweak hrtimer valuesDaniel Mack2014-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intensive tests with USB audio devices connected to a musb host port have shown reproducible pops and clicks in both the playback and the capture stream. These are related to how the early_tx hrtimer is set up, and it turns out they can be fixed by reducing the timer's slack value from 40 to 25 us. Also, when the callback is ran without taking action, it should be rescheduled 20 us later instead of 50 us. Reported-and-tested-by: Sven Neumann <neumann@teufel.de> Signed-off-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: dwc3: add ST dwc3 glue layer to manage dwc3 HCPeter Griffin2014-09-053-0/+377
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the ST glue logic to manage the DWC3 HC on STiH407 SoC family. It manages the powerdown signal, and configures the internal glue logic and syscfg registers. [ balbi@ti.com : actually switch over to of_platform_depopulate() ] Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: dwc3: add tracepoints to aid debuggingFelipe Balbi2014-09-059-53/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we're debugging hard-to-reproduce and time-sensitive use cases, printk() poses too much overhead. That's when the kernel's tracing infrastructure comes into play. This patch implements a few initial tracepoints for the dwc3 driver. More traces can be added as necessary in order to ease the task of debugging dwc3. Reviewed-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: dwc3: gadget: cmd argument should always be unsignedFelipe Balbi2014-09-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | No functional changes, just making sure we're dealing with unsigned ints. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: dwc3: debug: add dwc3_gadget_event_type_stringFelipe Balbi2014-09-051-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | this new helper will return a pretty string for DWC3 Gadget Events. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: dwc3: move all string helper functions to debug.hFelipe Balbi2014-09-054-145/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those functions are only using within debugging messages, grouping them into debug.h makes sense. While at that, also add missing multiple inclusion guard. Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uac2: send reasonably sized packetsDaniel Mack2014-09-021-4/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Daniel Mack <zonque@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uac2: handle partial dma area wrapDaniel Mack2014-09-021-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Daniel Mack <zonque@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uac2: introduce agdev_to_uac2_optsDaniel Mack2014-09-021-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Daniel Mack <zonque@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uac2: add short-hand for 'dev'Daniel Mack2014-09-021-18/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Daniel Mack <zonque@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uac2: restructure some code in afunc_set_alt()Daniel Mack2014-09-021-23/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Daniel Mack <zonque@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_mass_storage: simplify start_transfer slightlyMichal Nazarewicz2014-09-021-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: composite: dequeue cdev->req before free its bufferLi Jun2014-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit f226708(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: Felipe Balbi <balbi@ti.com> Signed-off-by: Li Jun <b47624@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: phy: twl6030-usb: Remove unused irq_enabledTony Lindgren2014-09-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not being used any longer. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: USB_RENESAS_USBHS_UDC should depend on HAS_DMAGeert Uytterhoeven2014-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: phy: samsung: remove old common USB PHY codeBartlomiej Zolnierkiewicz2014-09-022-558/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/usb/phy/phy-samsung-usb[2,3] drivers got replaced by drivers/phy/phy-samsung-usb[2,3] ones and the old common Samsung USB PHY code is no longer used. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Vivek Gautam <gautam.vivek@samsung.com> Reviewed-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Cc: Kamil Debski <k.debski@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: phy: samsung: remove old USB 3.0 PHY driverBartlomiej Zolnierkiewicz2014-09-023-359/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/usb/phy/phy-samsung-usb3 driver got replaced by drivers/phy/phy-samsung-usb3 one and is no longer used. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Vivek Gautam <gautam.vivek@samsung.com> Reviewed-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Cc: Kamil Debski <k.debski@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: phy: samsung: remove old USB 2.0 PHY driverBartlomiej Zolnierkiewicz2014-09-023-550/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/usb/phy/phy-samsung-usb2 driver got replaced by drivers/phy/phy-samsung-usb2 one and is no longer used. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Vivek Gautam <gautam.vivek@samsung.com> Reviewed-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Cc: Kamil Debski <k.debski@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: use $(srctree) instead of $(PWD) for includesYegor Yefremov2014-08-293-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using $(PWD) breaks builds when make was invoked from outside of the kernel tree. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: udc: use USB API functions rather than constantsHimangi Saraogi2014-08-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the use of the functions usb_endpoint_type and usb_endpoint_num. The Coccinelle semantic patch that makes these changes is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bEndpointAddress & \(USB_ENDPOINT_NUMBER_MASK\|0x0f\)) + usb_endpoint_num(epd) @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usbtest: Add interrupt EP testcasesAmit Virdi2014-08-291-15/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two simple test cases for interrupt endpoints are added to the usbtest.c file. These are simple non-queued interrupt IN and interrupt OUT transfers. Currently, only gadget zero is capable of executing the interrupt EP test cases. However, extending the same to other gadgets is extremely simple and can be done on-demand. The two new tests added are - Test 25: To verify Interrupt OUT transfer - Test 26: To verify Interrupt IN transfer Since the default value of wMaxPacketSize is set as 1024, so interrupt IN transfers must be specified with the size parameter = multiple of 1024. Otherwise the default value (512) in the usbtest application fails the transfer. See [RUN 4] for sample logs The application logs (usbtest) and corresponding kernel logs are as following: [Run 1] ./testusb -a -c 10 -s 2048 -t 26 -v 511 usbtest 7-1:3.0: TEST 26: read 2048 bytes 10 times [Run 2] ./testusb -a -c 10 -s 1024 -t 25 -v 511 usbtest 7-1:3.0: TEST 25: write 1024 bytes 10 times [Run 3] ./testusb -a -c 10 -s 1098 -t 25 -v 511 usbtest 7-1:3.0: TEST 25: write 1098 bytes 10 times [Run 4 - Failure case scenario] ./testusb -a -t 26 unknown speed /dev/bus/usb/007/004 0 /dev/bus/usb/007/004 test 26 --> 75 (Value too large for defined data type) usbtest 7-1:3.0: TEST 26: read 512 bytes 1000 times usb 7-1: test26 failed, iterations left 999, status -75 (not 0) Signed-off-by: Amit Virdi <amit.virdi@st.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: zero: Add support for interrupt EPAmit Virdi2014-08-274-22/+526
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interrupt endpoints behave quite similar to the bulk endpoints with the difference that the endpoints expect data sending/reception request at particular intervals till the whole data has not been transmitted. The interrupt EP support is added to gadget zero. A new alternate setting (=2) has been added. It has 2 interrupt endpoints. The default parameters are set as: bInterval: 1 ms for FS and 8 uFrames (implying 1 ms) for HS/SS wMaxPacketSize: 64 bytes for FS and 1024 bytes for HS/SS However, the same can be overridden through the module parameter interface. The code is tested for HS and SS on a platform having DWC3 controller. Signed-off-by: Amit Virdi <amit.virdi@st.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: serial: remove PREFIX macroRichard Leitner2014-08-271-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the ttyGS PREFIX macro from u_serial.c and replace all occurences with the hardcoded ttyGS string. This macro was mostly used in a few debug/warning messages and a lot of hardcoded ttyGS existed beneath. It may have been used for renaming the tty, but if done so most debug messages would have ignored this. Due to the fact the usage of this PREFIX in all debug calls would have resulted in a hard to read/grep code it is removed completely. Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: serial: replace {V,}DBG macro with dev_{v,}dbgRichard Leitner2014-08-273-40/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the VDBG and DBG macro with the kernels "proper" debug macros (dev_vdbg and dev_dbg) in f_acm.c, f_obex.c & f_serial.c Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: phy: msm: Make phy_reset clk and reset line optional.Srinivas Kandagatla2014-08-271-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the phy reset clk and reset line optional as this clk is not available on boards like IFC6410 with APQ8064. phy-reset clk is only used as argument to the mach level callbacks, so this patch adds condition before clk_get calls so that the driver wouldn't fail on SOCs which do not have this support. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: phy: mxs: Add VF610 USB PHY supportStefan Agner2014-08-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the USB PHY in Vybrid VF610. We assume that the disconnection without VBUS is also needed for Vybrid. Tests showed, without MXS_PHY_NEED_IP_FIX, enumeration of devices behind a USB Hub fails with errors: [ 215.163507] usb usb1-port1: cannot reset (err = -32) [ 215.170498] usb usb1-port1: cannot reset (err = -32) [ 215.185120] usb usb1-port1: cannot reset (err = -32) [ 215.191345] usb usb1-port1: cannot reset (err = -32) [ 215.202487] usb usb1-port1: cannot reset (err = -32) [ 215.207718] usb usb1-port1: Cannot enable. Maybe the USB cable is bad? [ 215.219317] usb usb1-port1: unable to enumerate USB device Hence we also enable the MXS_PHY_NEED_IP_FIX flag. Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: uvc: remove DRIVER_VERSION{,_NUMBER}Michael Grzeschik2014-08-212-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the driver is in mainline we can remove the version numbers. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uvc: fix potential memory leakAndrzej Pietrasiewicz2014-08-211-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If uvc->control_buf is successfuly allocated but uvc->control_req is not, uvc->control_buf is not freed in the error recovery path. With this patch applied uvc->control_buf is freed unconditionally; if it happens to be NULL kfree on it is safe anyway. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: uvc: Add support for DMABUF importingPhilipp Zabel2014-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Activate the videobuf2 DMABUF support. As vb2-vmalloc supports the importer role only, exporting buffers isn't supported yet. When the exporter role will be implemented in vb2-vmalloc the UVC gadget driver will automatically gain support for it. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: uvc: Change KERN_INFO to KERN_DEBUG on request shutdownMichael Grzeschik2014-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The disconnect of the USB Device is a common pattern for an UVC Camera. In many cases this will give us an meaningless information for all buffers that couldn't be enqueued. That patch changes this to KERN_DEBUG. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uac1: add configfs supportAndrzej Pietrasiewicz2014-08-202-1/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for using f_uac1 function as a component of a gadget composed with configfs. Tested-by: Sebastian Reimers <sebastian.reimers@googlemail.com> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uac1: use defined constants as defaultsAndrzej Pietrasiewicz2014-08-203-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When configfs support is added the values in question will have to be used in two different places. Substitute them with defined constants to avoid duplicating magic numbers. Tested-by: Sebastian Reimers <sebastian.reimers@googlemail.com> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uac1: use usb_gstrings_attachAndrzej Pietrasiewicz2014-08-201-18/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new usb_gstring_attach interface. Tested-by: Sebastian Reimers <sebastian.reimers@googlemail.com> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: f_uac1: remove compatibility layerAndrzej Pietrasiewicz2014-08-203-138/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no users of the old interface left, so it can be removed. Tested-by: Sebastian Reimers <sebastian.reimers@googlemail.com> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | | usb: gadget: audio: convert to new interface of f_uac1Andrzej Pietrasiewicz2014-08-202-6/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new interface so that the old one can be removed. Tested-by: Sebastian Reimers <sebastian.reimers@googlemail.com> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
OpenPOWER on IntegriCloud