- 18 12月, 2013 6 次提交
-
-
由 Jingoo Han 提交于
Make local symbols static in order to fix the following sparse warnings. drivers/usb/gadget/f_loopback.c:123:34: warning: symbol 'ss_loop_source_comp_desc' was not declared. Should it be static? drivers/usb/gadget/f_loopback.c:139:34: warning: symbol 'ss_loop_sink_comp_desc' was not declared. Should it be static? Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Lee Jones 提交于
static checker warning: "drivers/usb/musb/ux500_dma.c:335 ux500_dma_controller_start() error: potential NULL dereference 'param_array'." Acked-by: NLinus Walleij <linus.walleij@linaro.org> Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Jingoo Han 提交于
'usba_gadget_template' is used only in this file. Thus, make 'usba_gadget_template' static, in order to fix the following sparse warning. warning: symbol 'usba_gadget_template' was not declared. Should it be static? Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Jingoo Han 提交于
Use devm_*() functions to make cleanup paths simpler. Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NJingoo Han <jg1.han@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
In the nokia gadget some USB functions (obex 1 and 2, phonet) are optional. If at the start of nokia_bind_config e.g. fi_phonet is an error pointer, which can happen because we don't fail the bind process if usb_get_function_instance() fails for fi_phonet, then f_phonet is NULL, and phonet_stat = usb_add_function(c, f_phonet); is never called and phonet_stat remains 0. If, in these circumstances, we hit the err_conf label then !phonet_stat evaluates to true and we try usb_remove_function() with its second parameter being f_phonet which is NULL and it causes NULL pointer dereference. This patch changes the initial values of (obex1|obex2|phonet)_stat to a nonzero value so that if the err_conf label is hit while the respective functions have not been acquired the usb_remove_function() is not called for those functions. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Robert Baldyga 提交于
This patch adds "maxpacket_limit" to struct usb_ep. This field contains maximum value of maxpacket supported by driver, and is set in driver probe. This value should be used by autoconfig() function, because value of field "maxpacket" is set to value from endpoint descriptor when endpoint becomes enabled. So when autoconfig() function will be called again for this endpoint, "maxpacket" value will contain wMaxPacketSize from descriptior instead of maximum packet size for this endpoint. For this reason this patch adds new field "maxpacket_limit" which contains value of maximum packet size (which defines maximum endpoint capabilities). This value is used in ep_matches() function used by autoconfig(). Value of "maxpacket_limit" should be set in UDC driver probe function, using usb_ep_set_maxpacket_limit() function, defined in gadget.h. This function set choosen value to both "maxpacket_limit" and "maxpacket" fields. This patch modifies UDC drivers by adding support for maxpacket_limit. Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 13 12月, 2013 23 次提交
-
-
由 Felipe Balbi 提交于
use NULL when returning NULL pointers, not 0. Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
Add support for using FunctionFS in configfs-based USB gadgets. [ balbi@ti.com : removed redefinition of VERBOSE_DEBUG and few trailing whitespaces ] Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
There are no old function interface users left, so the old interface can be removed. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
Prepare for configfs integration. Use the new interface so that f_fs can be made a module. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
This is required in order to integrate configfs support. f_fs needs to be a separately compiled module and so it needs to use the new interface. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
This will be required in order to use the new function interface (usb_get_function_instance/usb_put_function_instance) Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyunmgin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
A header file to be used by f_fs.c and g_ffs.c will be required when f_fs.c is converted into a module. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
The use of variable length arrays in structs (VLAIS) in the Linux Kernel code precludes the use of compilers which don't implement VLAIS (for instance the Clang compiler). This alternate patch calculates offsets into the kmalloc-ed memory buffer using macros. The previous patch required multiple kmalloc and kfree calls. This version uses "group" vs "struct" since it really is not a struct and is essentially a group of VLA in a common allocated block. This version also fixes the issues pointed out by Andrzej Pietrasiewicz and Michal Nazarewicz. Signed-off-by: NMark Charlebois <charlebm@gmail.com> Signed-off-by: NBehan Webster <behanw@converseincode.com> [elimination of miexed declaration and code, checkpatch cleanup] [fixes after Michal's review] Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
The rndis function's users use only the new interface, so the two modules can be merged. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
There are no old function interface users left, so the old interface can be removed. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
There is a new interface of f_rndis and g_ffs is the last to use the old one. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
There are no old function interface users left, so the old interface can be removed. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
There is a new function interface of f_subset and g_ffs is the last to use the old one. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
There are no old function interface users left, so the old interface can be removed. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmim Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
There is a new funtion interface and g_ffs is the last gadget to use the old. Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
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: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Andrzej Pietrasiewicz 提交于
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: NAndrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Robert Baldyga 提交于
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: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Robert Baldyga 提交于
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: NMatt Porter <mporter@linaro.org> Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Neil Zhang 提交于
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: NNeil Zhang <zhangwm@marvell.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Kuninori Morimoto 提交于
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: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 WingMan Kwok 提交于
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: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NWingMan Kwok <w-kwok2@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 WingMan Kwok 提交于
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: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NWingMan Kwok <w-kwok2@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 10 12月, 2013 7 次提交
-
-
由 David Cohen 提交于
DWC3 requires epout to have buffer size aligned to MaxPacketSize value. This patch sets necessary quirk for it. Signed-off-by: NDavid Cohen <david.a.cohen@linux.intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Michal Nazarewicz 提交于
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: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NDavid Cohen <david.a.cohen@linux.intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Michal Nazarewicz 提交于
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: NMichal Nazarewicz <mina86@mina86.com> Cc: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 David Cohen 提交于
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: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NDavid Cohen <david.a.cohen@linux.intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 David Cohen 提交于
This patch moves all bitflags to the end of usb_gadget struct in order to improve readability. Signed-off-by: NDavid Cohen <david.a.cohen@linux.intel.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Valentine Barshak 提交于
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: NValentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
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: NSantosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 07 12月, 2013 4 次提交
-
-
由 Aaro Koskinen 提交于
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: NAaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Aaro Koskinen 提交于
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: NAaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Aaro Koskinen 提交于
Add extcon field to platform data. Signed-off-by: NAaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Aaro Koskinen 提交于
Move omap_usb_config to platform data, so that OTG driver can include it. Signed-off-by: NAaro Koskinen <aaro.koskinen@iki.fi> Acked-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-