- 31 7月, 2015 5 次提交
-
-
由 Robert Baldyga 提交于
Add missing return value check. In case of error print debug message and return error code. Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Dan Carpenter 提交于
There is an "&&" vs "||" typo here so this loops 3000 times or if we get unlucky it could loop forever. Fixes: ceaa0a6e ('usb: gadget: m66592-udc: add support for TEST_MODE') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Dan Carpenter 提交于
We handle the "if (!req->req.length)" condition at the start of the function and return. We can delete this dead code. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Robert Baldyga 提交于
Due to some UDC controllers may not support stalling, usb gadget layer needs to provide a generic way to inform gadget functions about non-standard hardware limitations. This patch adds 'quirk_stall_not_supp' field to struct usb_gadget and helper function gadget_is_stall_supported(). It also sets 'quirk_stall_not_supp' to 1 in at91_udc driver, which has such limitation. Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Robert Baldyga 提交于
Due to some UDC controllers may not support altsettings, usb gadget layer needs to provide a generic way to inform gadget functions about non-standard hardware limitations. This patch adds 'quirk_altset_not_supp' field to struct usb_gadget and helper function gadget_is_altset_supported(). It also sets 'quirk_altset_not_supp' to 1 in pxa25x_udc and pxa27x_udc drivers, which have such limitation. Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 29 7月, 2015 2 次提交
-
-
由 Uwe Kleine-König 提交于
Since 39b2bbe3 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Currently this parameter is made optional with the help of a cpp trick. To allow dropping this hack convert callers to explictly pass a value for flags. Acked-by: NFelipe Balbi <balbi@ti.com> Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Vaishali Thakkar 提交于
In big endian cases, the macro cpu_to_le{16,32} unfolds to __swab{16,32} which provides special case for constants. In little endian cases, __constant_cpu_to_le{16,32} and cpu_to_le{16,32} expand directly to the same expression. So, replace __constant_cpu_to_le{16,32} with cpu_to_le{16,32} with the goal of getting rid of the definition of __constant_cpu_to_le{16,32} completely. The semantic patch that performs this transformation is as follows: @@expression x;@@ ( - __constant_cpu_to_le16(x) + cpu_to_le16(x) | - __constant_cpu_to_le32(x) + cpu_to_le32(x) ) Signed-off-by: NVaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 21 7月, 2015 2 次提交
-
-
由 Yoshihiro Shimoda 提交于
The dma_map_single and dma_unmap_single should set "gadget->dev.parent" instead of "&gadget->dev" in the first argument because the parent has a udc controller's device pointer. Otherwise, iommu functions are not called in ARM environment. Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Alexey Khoroshilov 提交于
There was an omission in transition to devm_xxx resource handling. iounmap(udc->phy_regs) were removed, but ioremap() was left without devm_. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru> Fixes: 3517c31a ("usb: gadget: mv_udc: use devm_xxx for probe") Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 07 7月, 2015 1 次提交
-
-
由 Takeshi Yoshimura 提交于
My static checker detected the mistake. I fix this by changing "goto err_irq" to "goto err_req". The label err_irq is not used now so this patch also removes it. Signed-off-by: NTakeshi Yoshimura <yos@sslab.ics.keio.ac.jp> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 28 5月, 2015 1 次提交
-
-
由 Felipe Balbi 提交于
This patch fixes the following build warnings: drivers/usb/gadget/udc/atmel_usba_udc.c:2207:12: warning: ‘usba_udc_suspend’ defined but not used [-Wunused-function] static int usba_udc_suspend(struct device *dev) drivers/usb/gadget/udc/atmel_usba_udc.c:2236:12: warning: ‘usba_udc_resume’ defined but not used [-Wunused-function] static int usba_udc_resume(struct device *dev) Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 27 5月, 2015 1 次提交
-
-
由 Felipe Balbi 提交于
This patch fixes the following build warning: drivers/usb/gadget/udc/atmel_usba_udc.c:707:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘dma_addr_t’ [-Wformat=] Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 26 5月, 2015 10 次提交
-
-
由 Mian Yousaf Kaukab 提交于
Gadget must be informed about disconnection when pullup is removed. Tested-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
Reset configuration in ep_cfg on disable to physically disable the endpoint. Tested-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
USB3380 enhanced mode allows GPEP to be used in both IN and OUT directions. However, IN and OUT endpoints must use same USB endpoint address (bEndpointAddress). Fix this by setting the ep_cfg.ep_number during initialization and keep it in net2280_enable() Tested-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
USB3380 in enhanced mode has 4 IN and 4 OUT endpoints. Check interrupts for all of them. Tested-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
Default 0 value can result in unintentional zlp for IN endpoints. Tested-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
USB3380 ep_cfg.direction bit is reserved in enhanced mode. Don't set it. Tested-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
If ep->dma is set, abort_dma() takes care of dma clean-up. If ep->dma is not set, unconditionally reset dma channel. Tested-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
Sequence number can be out of sync if endpoint is disabled after some data transfers and enabled again. Reset it to stay in sync with host. Tested-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
ep_cfg.IN_EP_ENABLE is only valid in advance mode. Tested-by: NRicardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Sergiy Kibrik 提交于
For some reason the code has always been disabling pullup when asked to do the opposite. According to surrounding code and gadget API this seems to be a mistake. This fix allows UDC to be detected by host controller on recent kernels. Signed-off-by: NSergiy Kibrik <sakib@meta.ua> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 08 5月, 2015 1 次提交
-
-
由 Joe Perches 提交于
Using unnecessary static char buffers isn't good. Use the %pV extension instead. Miscellanea: o the dprintk return value is unused, make it void o add __printf format and argument verification Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 28 4月, 2015 2 次提交
-
-
由 Arnd Bergmann 提交于
A recent change introduced a link error for the composite printer gadget driver: `printer_unbind' referenced in section `.ref.data' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o Evidently the unbind function should not be marked __exit here, because it is called through a callback pointer that is not necessarily discarded, __composite_unbind() is indeed called from the error path of composite_bind(), which can never work for a built-in driver. Looking at the surrounding code, I found the same problem in all other composite gadget drivers in both the bind and unbind functions, as well as the udc platform driver 'remove' functions. Those will break if anyone uses the 'unbind' sysfs attribute to detach a device from a built-in driver. This patch removes the incorrect annotations from all the gadget drivers. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Vladimir Zapolskiy 提交于
devm_ioremap_resource() returns IOMEM_ERR_PTR() and it never returns NULL, fix the check to prevent access to invalid virtual address. Signed-off-by: NVladimir Zapolskiy <vz@mleia.com> Reviewed-by: NSören Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 04 4月, 2015 1 次提交
-
-
由 Sergei Shtylyov 提交于
Fix using the bare numbers to set the 'bDescriptorType' field of the Hub Descriptors while the values are #define'd in <linux/usb/ch11.h>. Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 20 3月, 2015 5 次提交
-
-
由 Ben Dooks 提交于
Change from using the __raw IO accesors to the endian agnostic versions of readl/writel_relaxed when not on AVR32. This fixes issues with running big endian on ARMv7. Signed-off-by: NBen Dooks <ben.dooks@codethink.co.uk> -- CC: Nicolas Ferre <nicolas.ferre@atmel.com> CC: Felipe Balbi <balbi@ti.com> CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org> CC: linux-usb@vger.kernel.org Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Fabian Frederick 提交于
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: NFabian Frederick <fabf@skynet.be> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Joe Perches 提交于
The seq_printf/seq_puts/seq_putc return values, because they are frequently misused, will eventually be converted to void. See: commit 1f33c41c ("seq_file: Rename seq_overflow() to seq_has_overflowed() and make public") Miscellanea: o Coalesce formats, realign arguments o Create static functions for statement expression macros o Use c90 style comments instead of c99 Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Peter Chen 提交于
This commit updates udc core vbus status, and try to connect or disconnect gadget. Signed-off-by: NPeter Chen <peter.chen@freescale.com> Acked-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Peter Chen 提交于
Instead of iterate to find usb_udc according to usb_gadget, this way is easier. Alan Stern suggests this way too: http://marc.info/?l=linux-usb&m=142168496528894&w=2Acked-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 19 3月, 2015 1 次提交
-
-
由 Fabian Frederick 提交于
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: NFabian Frederick <fabf@skynet.be> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 12 3月, 2015 1 次提交
-
-
由 Peter Chen 提交于
udc is then checked for NULL, if NULL, it is then dereferenced as udc->dev, it is found using Coccinelle. We simplify the code to fix this problem, and we delete some conditions at if {} which will never be met. Reported-by: NTapasweni Pathak <tapaswenipathak@gmail.com> Reported-by : Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: NPeter Chen <peter.chen@freescale.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
- 11 3月, 2015 7 次提交
-
-
由 Rasmus Villemoes 提交于
Not everybody uses a utf8 locale (unfortunately), so let's avoid non-ascii characters in the kernel log. Replace the 3-byte utf8 sequence with a 3-byte ascii equivalent. Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Sylvain Rochet 提交于
This patch add suspend/resume with wakeup support for Atmel USBA. On suspend: We stay continuously clocked if Vbus signal is not available. If Vbus signal is available we set the Vbus signal as a wake up source then we stop the USBA itself and all clocks used by USBA. On resume: We recover clocks and USBA if we stopped them. If a device is currently connected at resume time we enable the controller. Signed-off-by: NSylvain Rochet <sylvain.rochet@finsecur.com> Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Sylvain Rochet 提交于
If USB PLL is not necessary for other USB drivers (e.g. OHCI and EHCI) we will reduce power consumption by switching off the USB PLL if no USB Host is currently connected to this USB Device. We are using Vbus GPIO signal to detect Host presence. If Vbus signal is not available then the device stays continuously clocked. Signed-off-by: NSylvain Rochet <sylvain.rochet@finsecur.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Sylvain Rochet 提交于
Vbus IRQ handler needs a started UDC driver to work because it uses udc->driver, which is set by the UDC start handler. The previous way chosen was to return from interrupt if udc->driver is NULL using a spinlock around the check. We now request an auto disabled (IRQ_NOAUTOEN) Vbus signal IRQ instead of an auto enabled IRQ followed by disable_irq(). This way we remove the very small timeslot of enabled IRQ which existed previously between request() and disable(). We don't need anymore to check if udc->driver is NULL in IRQ handler. Signed-off-by: NSylvain Rochet <sylvain.rochet@finsecur.com> Suggested-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Sylvain Rochet 提交于
If vbus gpio is high at init, we should set vbus_prev to true accordingly to the current vbus state. Without that, we skip the first vbus interrupt because the saved vbus state is not consistent. Signed-off-by: NSylvain Rochet <sylvain.rochet@finsecur.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Felipe Balbi 提交于
Silence the following warning: drivers/usb/gadget/udc/net2280.c:3176:33: warning: context imbalance in 'handle_stat1_irqs' - unexpected unlock Signed-off-by: NFelipe Balbi <balbi@ti.com>
-
由 Mian Yousaf Kaukab 提交于
net2280_start can be called with pullup disabled. Don't set softconnect flag in it. Let net2280_pullup handle the connection part. Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
-