- 12 Dec, 2013 10 commits
-
-
Andrzej Pietrasiewicz authored
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmim Park <kyungmin.park@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Andrzej Pietrasiewicz authored
There is a new funtion interface and g_ffs is the last gadget to use the old. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Andrzej Pietrasiewicz authored
Since d6a01439 usb: gadget: move the global the_dev variable to their users "the_dev" variable can be used as a "setup done" flag; non-NULL meaning "setup done", NULL meaning "setup not done". Moreover, gether_cleanup() can be safely called with a NULL argument. Corrected a comment to be consistent with the code. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Andrzej Pietrasiewicz authored
USB function's configfs config group is created in a generic way in usb/gadget/configfs.c:function_make(), which in turn delegates actual allocation and setup of the USB function instance to a particular implementation, e.g. in f_acm.c. The said implementation does its job in a parameter-less function e.g. acm_alloc_instance(), which results in creating an unnamed config group, whose name is set later in function_make(). function_make() creates the name by parsing a string of the form: <function name>.<instance name> which comes from userspace as a parameter to mkdir invocation. Up to now only <function name> has been used, while <instance name> has been ignored. This patch adds a set_inst_name() operation to struct usb_function_instance which allows passing the <instance name> from function_make() so that it is not ignored. It is entirely up to the implementor of set_inst_name() what to do with the <instance name>. In a typical case, the struct usb_function_instance is embedded in a larger struct which is retrieved in set_inst_name() with container_of(), and the larger struct contains a field to store the <instance name>. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Robert Baldyga authored
This patch adds flushing TX FIFO in kill_all_requests() function in dedicated-fifo mode. It's because when requests are killed (when endpoint is disabled or in case of device reset/disconnection) in FIFO can stay some unsent data. In the worst case FIFO can stay full, and then if endpoint will be back enabled, sending new data will be impossible. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Robert Baldyga authored
This patch set maximum possible maxpacket value for each speed. Previous values didn't allow to use maxpacket sizes greater than 64 in full speed and 512 in high speed, although hardware is able to handle up to 1023 in fs and 1024 in hs. Tested-by: Matt Porter <mporter@linaro.org> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Neil Zhang authored
We need to initialize the notifer before use it. So lets initialize it when add a new phy device to reduce the code redundancy. Signed-off-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Kuninori Morimoto authored
DMAEngine uses IRQ if dma_request_channel() was called, and it is using devm_request_irq() today, OTOH, dma_request_channel() will be called when each USB connection happened on this driver. This means same IRQ will be requested many times whenever each USB connected, and this IRQ isn't freed when USB disconnected. Request DMAEngine once. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
WingMan Kwok authored
Add Keystone platform USB PHY driver support. Current main purpose of this driver is to enable the PHY reference clock gate on the Keystone SoC. Otherwise it is a nop PHY. [ balbi@ti.com : add COMPILE_TEST as a possible dependency make sure drvdata is initialized before adding PHY ] Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: WingMan Kwok <w-kwok2@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
WingMan Kwok authored
Add Keystone platform specific glue layer to support USB3 Host mode. [ balbi@ti.com : fix order of clk_disable() and platform_device_unregister() ] Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: WingMan Kwok <w-kwok2@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
- 10 Dec, 2013 5 commits
-
-
David Cohen authored
DWC3 requires epout to have buffer size aligned to MaxPacketSize value. This patch sets necessary quirk for it. Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Michal Nazarewicz authored
Check gadget.quirk_ep_out_aligned_size to decide if buffer size requires to be aligned to maxpacketsize of an out endpoint. ffs_epfile_io() needs to pad epout buffer to match above condition if quirk is found. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Michal Nazarewicz authored
When endpoint changes (due to it being disabled or alt setting changed), mimic the action as if the change happened after the request has been queued, instead of retrying with the new endpoint. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Cc: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
David Cohen authored
Due to USB controllers may have different restrictions, usb gadget layer needs to provide a generic way to inform gadget functions to complain with non-standard requirements. This patch adds 'quirk_ep_out_aligned_size' field to struct usb_gadget to inform when controller's epout requires buffer size to be aligned to MaxPacketSize. A helper is also provided to align buffer size when necessary. Cc: Alan Stern <stern@rowland.harvard.edu> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
David Cohen authored
This patch moves all bitflags to the end of usb_gadget struct in order to improve readability. Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
- 09 Dec, 2013 2 commits
-
-
Valentine Barshak authored
Use usb_add_phy_dev instead of usb_add_phy, so that devices can be bound to the phy. This is needed to set up USB phy for some internal PCI USB host controllers on R-Car Gen2. Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Felipe Balbi authored
the lock was only taken inside the hardirq handler, which runs with IRQs disabled. There's no chance of any race condition happening, even on SMP machines. It's safe to remove that spinlock. Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
- 06 Dec, 2013 8 commits
-
-
Aaro Koskinen authored
Add Tahvo USB transceiver driver. Based on old code from linux-omap tree. The original driver was written by Juha Yrjölä, Tony Lindgren, and Timo Teräs. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Aaro Koskinen authored
Transceivers need to manage OTG controller state on OMAP1 to enable switching between peripheral and host modes. Provide a driver for that. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Aaro Koskinen authored
Add extcon field to platform data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Aaro Koskinen authored
Move omap_usb_config to platform data, so that OTG driver can include it. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Fabio Estevam authored
clk_prepare_enable() may fail, so let's check its return value and propagate it in the case of error. Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Jingoo Han authored
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Jingoo Han authored
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Jingoo Han authored
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
- 26 Nov, 2013 15 commits
-
-
Andrzej Pietrasiewicz authored
Add support for using the sourcesink function in gadgets composed with configfs. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Andrzej Pietrasiewicz authored
Add support for using the loopback USB function in gadgets composed with configfs. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Andrzej Pietrasiewicz authored
alloc_ep_req() is a function repeated in several modules. Make a common implementation and use it. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Andrzej Pietrasiewicz authored
If there are setup requests not directed to an endpont or an interface, current config's setup() has been attempted so far. This patch, in case the above fails, adds code which tries the setup() of configuration's function if there is only one function in the configuration. This behavior is required to provide equivalent of gadget zero with configfs. The gadget zero has a "config driver" for sourcesink, but all it does is delegating the request to the function proper. So when the equivalent gadget is set up with configfs it needs to handle requests directed to "config driver", but with configfs it is not possible to specify "config drivers". Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Bin Liu authored
Only start the otg_timer in dual role mode; otherwise in peripheral mode when musb is disconnected from the host port, otg_timer starts and continuously toggles the session, which causes VBUS pulse. Signed-off-by: Bin Liu <b-liu@ti.com> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Anton Tikhomirov authored
This patch removes dependency on Freescale USB UTG Transceiver driver and makes OTG FSM implementation selectable. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Anton Tikhomirov authored
Other USB drivers may want to use OTG final state machine implementation, so make this header available for them. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Anton Tikhomirov authored
OTG Final State Machine calls functions which may sleep. For example, start_gadget callback implementation can use usb_gadget_vbus_connect(), whose context: can sleep. If so, mutex should be used instead of spinlock. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Anton Tikhomirov authored
if this header is included twice, we would have redefinition build errors. Fix this. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Felipe Balbi authored
this header uses spinlocks and errno values, so we must include <linux/spinlock.h> and <linux/errno.h> to avoid build errors. Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Dan Carpenter authored
These functions used to return negative errror codes but now they return ERR_PTRs. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Geert Uytterhoeven authored
device_driver.name is "const char *" Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-usb@vger.kernel.org Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Michal Nazarewicz authored
The stop_activity function never uses driver argument (even though it modifies it) and thus it is safe to remove it. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Felipe Balbi authored
we have a helper to fetch endpoint type out of a descriptor, let's use it. Signed-off-by: Felipe Balbi <balbi@ti.com>
-
Daniel Mack authored
The dsps platform needs to save save some registers at suspend time and restore them after resume. This patch adds a struct for these registers, and also lets the musb core know that the core registers need to be saved as well. We also have to explicitly de-assert the port reset upon resume on this platform, but musb_port_reset() should not be called from glue layers. Hence, introduce a flag in struct musb_hdrc_config for this. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-