aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/fotg210-hcd.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-12-25ktime: Cleanup ktime_set() usageThomas Gleixner1-2/+1
ktime_set(S,N) was required for the timespec storage type and is still useful for situations where a Seconds and Nanoseconds part of a time value needs to be converted. For anything where the Seconds argument is 0, this is pointless and can be replaced with a simple assignment. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
2016-12-25ktime: Get rid of the unionThomas Gleixner1-1/+1
ktime is a union because the initial implementation stored the time in scalar nanoseconds on 64 bit machine and in a endianess optimized timespec variant for 32bit machines. The Y2038 cleanup removed the timespec variant and switched everything to scalar nanoseconds. The union remained, but become completely pointless. Get rid of the union and just keep ktime_t as simple typedef of type s64. The conversion was done with coccinelle and some manual mopping up. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
2016-05-09usb/host/fotg210: remove dead code in create_sysfs_filesColin Ian King1-7/+1
The goto in create_sysfs_files is never executed, so remove it and clean up the code. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-24usb: host: fotg210: use list_for_each_entry_safeGeliang Tang1-10/+5
Use list_for_each_entry_safe() instead of list_for_each_safe() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-09dma: remove external references to dma_supportedChristoph Hellwig1-1/+1
Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-10-17usb/host/fotg210: Remove return statement inside ifPeter Senna Tschudin1-7/+5
This patch make changes to an if else statement which simplifies the code allowing to remove a return. CC: Joe Perches <joe@perches.com> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16usb/host/fotg210: Add function scan_frame_queue()Peter Senna Tschudin1-67/+76
checkpatch complains about too many leading tabs because the if statement starts after 6 tabs: scan_iosoc() -> for() -> while() -> switch() -> if() -> for() -> if() There is also a goto statement going backwards in case of failure. This patch creates a new inline function named scan_frame_queue() containing the last 4 nesting levels, and removes the need of backwards goto, making the code easier to read. After the patch it becomes: scan_iosoc() -> for() -> while() -> scan_frame_queue() Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16usb/host/fotg210: Add function: output_buf_tds_dir()Peter Senna Tschudin1-31/+31
checkpatch complains about too many leading tabs because the switch statement starts after 6 tabs. fill_periodic_buffer() -> for() -> do -> switch() -> if() -> list_for_each_entry() and finally the last switch(). This patch moves the list_for_each_entry() and the last switch() to a new function named output_buf_tds_dir(). This change makes the code easier to read and calm down checkpatch. This patch changes it to: fill_periodic_buffer() -> for() -> do -> switch() -> if() -> output_buf_tds_dir() Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16usb/host/fotg210: convert macro to inline functionPeter Senna Tschudin1-11/+16
This patch convert the macro speed_char in an inline function. The goal of this patch is to make the code easier to read. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16usb/host/fotg210: replace msleep by usleep_rangePeter Senna Tschudin1-1/+1
msleep under 20ms can result in sleeping up to 20ms, which may not be intended. Replace msleep(5) by usleep_range(5000, 10000). The range of 5 ms is to reduce the chances of creating an interrupt while reducing the maximum wait time in 50%. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16usb/host/fotg210: change kmalloc by kmalloc_arrayPeter Senna Tschudin1-1/+1
This patch replaces: kmalloc(DBG_SCHED_LIMIT * sizeof(*seen), GFP_ATOMIC) by: kmalloc_array(DBG_SCHED_LIMIT, sizeof(*seen), GFP_ATOMIC) as kmalloc_array() should be used for allocating arrays. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16usb/host/fotg210: Remove useless else statementPeter Senna Tschudin1-3/+2
This patch remove an else statement after a return to make the code easier to understand. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16usb/host/fotg210: remove KERN_WARNING from pr_warnPeter Senna Tschudin1-1/+1
This patch remove KERN_WARNING from a call to pr_warn(). Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16usb/host/fotg210: Fix coding style issuesPeter Senna Tschudin1-962/+748
This patch fix coding style issues reported by checkpatch that do not change semantics of the code. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04usb: host: fotg210: remove unreachable codeLuis de Bethencourt1-1/+0
Before running the platform_driver_unregister() the code will either return retval or jump to clean. Removing this line that is unreachable. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04usb: host: drop null test before destroy functionsJulia Lawall1-8/+4
Remove unneeded NULL test. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x; @@ -if (x != NULL) \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x); @@ expression x; @@ -if (x != NULL) { \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x); x = NULL; -} // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-10Merge tag 'usb-for-v4.1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-testingGreg Kroah-Hartman1-1/+1
Felipe writes: usb: generic resume timeout for v4.1 This part 2 pull request contains only the patches which make sure everybody on linux uses the same resume timeout value. Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-07usb: host: fotg210: use new USB_RESUME_TIMEOUTFelipe Balbi1-1/+1
Make sure we're using the new macro, so our resume signaling will always pass certification. Cc: <stable@vger.kernel.org> # v3.10+ Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-03fotg210-hcd: use USB_DT_HUBSergei Shtylyov1-1/+1
Fix using the bare number to set the 'bDescriptorType' field of the Hub Descriptor while the value is #define'd in <linux/usb/ch11.h>. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25fotg210-hcd: use HUB_CHAR_*Sergei Shtylyov1-2/+2
Fix using the bare numbers to set the 'wHubCharacteristics' field of the Hub Descriptor while the values are #define'd in <linux/usb/ch11.h>. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-20treewide: fix typo in printk and KconfigMasanari Iida1-1/+1
This patch fix spelling typo in printk and Kconfig within various part of kernel sources. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-23usb: hub: rename khubd to hub_wq in documentation and commentsPetr Mladek1-4/+4
USB hub has started to use a workqueue instead of kthread. Let's update the documentation and comments here and there. This patch mostly just replaces "khubd" with "hub_wq". There are only few exceptions where the whole sentence was updated. These more complicated changes can be found in the following files: Documentation/usb/hotplug.txt drivers/net/usb/usbnet.c drivers/usb/core/hcd.c drivers/usb/host/ohci-hcd.c drivers/usb/host/xhci.c Signed-off-by: Petr Mladek <pmladek@suse.cz> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09fotg210: Use managed interfaces for allocation of resourcesHimangi Saraogi1-39/+9
This patch intoduces the use of devm_ioremap_resource instead of request_mem_region and ioremap_nocache and removes the calls to free the allocated memory. Some labels are removes and a new label failed introduced to make it less specific to the context. The call to a platform get resource with IORESOURCE_IO is removed as it allocates memory that is not needed. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08usb: hcd: move controller wakeup setting initialization to individual driverPeter Chen1-0/+1
Individual controller driver has different requirement for wakeup setting, so move it from core to itself. In order to align with current etting the default wakeup setting is enabled (except for chipidea host). Pass compile test with below commands: make O=outout/all allmodconfig make -j$CPU_NUM O=outout/all drivers/usb Signed-off-by: Peter Chen <peter.chen@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03USB: kill #undef VERBOSE_DEBUGOliver Neukum1-1/+0
It is useless now. Straight removal. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fotg210: kill fotg210_vdbg()Oliver Neukum1-11/+5
The decision what is interesting is shifted to user space by dynamic debugging. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fotg210: remove conditional compilationOliver Neukum1-10/+3
The decision what is interesting is made in user space. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fotg210: change dbg_port() to evaluate parameters only if neededOliver Neukum1-5/+5
For dynamic debug the overhead for evaluating parameters must be sacrificed only if the message is actually printed Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fotg210: always compile the support for debugfsOliver Neukum1-47/+0
Simply remove the conditional compilation and remove the empty stubs. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-03fotg210: remove conditional compilationOliver Neukum1-8/+0
Always compile in the debugfs support Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11usb: Remove unnecessary semicolonsJoe Perches1-1/+1
These aren't necessary after switch and if blocks. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29usb: host: Faraday fotg210-hcd driverFeng-Hsin Chiang1-0/+6049
FOTG210 is an OTG controller which can be configured as an USB2.0 host. FOTG210 host is an ehci-like controller with some differences. First, register layout of FOTG210 is incompatible with EHCI. Furthermore, FOTG210 is lack of siTDs which means iTDs are used for both HS and FS ISO transfer. Signed-off-by: Feng-Hsin Chiang <john453@faraday-tech.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-24Revert "usb: host: Faraday fotg210-hcd driver"Greg Kroah-Hartman1-6049/+0
This reverts commit 1dd3d123239179fad5de5dc00a6e0014a1918fde. The email address for the developer now bounces, which means they have moved on, so remove the driver until someone else from the company steps up to maintain it. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-24usb: host: Faraday fotg210-hcd driverYuan-Hsin Chen1-0/+6049
FOTG210 is an OTG controller which can be configured as an USB2.0 host. FOTG210 host is an ehci-like controller with some differences. First, register layout of FOTG210 is incompatible with EHCI. Furthermore, FOTG210 is lack of siTDs which means iTDs are used for both HS and FS ISO transfer. Signed-off-by: Yuan-Hsin Chen <yhchen@faraday-tech.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>