summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_debugfs.c
Commit message (Collapse)AuthorAgeFilesLines
* usb: musb: debugfs: allow forcing host mode together with speed in testmodePali Rohár2017-02-031-17/+29
| | | | | | | | | | | Based on the musb ug, force_host bit is allowed to be set along with force_hs or force_fs bit. It could help to implement forced host mode via testmode on Nokia N900. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: musb: fix runtime PM in debugfsBin Liu2017-01-101-1/+19
| | | | | | | | | | | MUSB driver now has runtime PM support, but the debugfs driver misses the PM _get/_put() calls, which could cause MUSB register access failure. Cc: stable@vger.kernel.org # 4.9+ Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds2016-12-241-1/+1
| | | | | | | | | | | | | This was entirely automated, using the script by Al: PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>' sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \ $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h) to do the replacement at the end of the merge window. Requested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* usb: musb: add softconnect for host modeBin Liu2015-05-071-0/+91
| | | | | | | | | | | | | Add a debugfs interface - softconnect - for host mode to connect/disconnect the devices without physically remove the them. This adds the capability to re-enumerate the devices which are permanently mounted on the board with the MUSB controller together. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: musb: only set test mode onceBin Liu2015-04-271-1/+8
| | | | | | | | | | | The MUSB test mode register can only be set once, otherwise the result is undefined. This prevents the debugfs testmode entry to set the register more than once which causes test failure. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* Merge tag 'v3.19-rc5' into nextFelipe Balbi2015-01-191-16/+18
|\ | | | | | | | | | | | | | | Linux 3.19-rc5 Conflicts: drivers/usb/dwc2/gadget.c drivers/usb/gadget/udc/bdc/bdc_ep.c
| * usb: musb: Fix a few off-by-one lengthsRasmus Villemoes2014-12-221-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | !strncmp(buf, "force host", 9) is true if and only if buf starts with "force hos". This was obviously not what was intended. The same error exists for "force full-speed", "force high-speed" and "test packet". Using strstarts avoids the error-prone hardcoding of the prefix length. For consistency, also change the other occurences of the !strncmp idiom. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: musb: debugfs: cope with blackfin's odditiesFelipe Balbi2014-12-221-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | Blackfin's MUSB implementation lacks a bunch of registers which they end up not defining a macro for. In order to avoid build breaks, let's ifdef out some of the registers from our regdump debugfs utility so that we don't try to use those on Blackfin builds. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: musb: debugfs: improve copy_from_user() argumentMarkus Pargmann2015-01-151-1/+1
|/ | | | | | | | | | | | While the code is correct and functions well, it's still a bit misleading to add the reference operator in from of the buf argument. This patch simply removes that operator in order to make use of buf slightly better to the eyes. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: musb: replace hard coded registers with definesRoman Byshko2014-11-181-27/+30
| | | | | | | | | | | | musb registers can be dumped using the file regdump which is created in debugfs. Up to now hard coded register addresses are used for that. Different glue layers however have different register addresses. The patch addresses this issue by substituting bare register addresses with defines. Signed-off-by: Roman Byshko <rbyshko@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: remove use of __devinitBill Pemberton2012-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Acked-by: Felipe Balbi <balbi@ti.com> Cc: Li Yang <leoli@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Geoff Levand <geoff@infradead.org> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Olav Kongas <ok@artecdesign.ee> Cc: Lennert Buytenhek <kernel@wantstofly.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: musb: kill global and static for multi instanceAjay Kumar Gupta2012-09-111-5/+3
| | | | | | | | | | | | | | Moved global variable "musb_debugfs_root" and static variable "old_state" to 'struct musb' to help support multi instance of musb controller as present on AM335x platform. Also removed the global variable "orig_dma_mask" and filled the dev->dma_mask with parent device's dma_mask. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Santhapuri, Damodar <damodar.santhapuri@ti.com> Signed-off-by: Ravi Babu <ravibabu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: musb: debugfs: fix error checkFelipe Balbi2012-02-011-6/+6
| | | | | | | debugfs will return NULL on failure, so we must check for !ptr instead of IS_ERR(ptr). Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: musb: make modules behave betterFelipe Balbi2012-01-311-1/+1
| | | | | | | | | | | | | | | There's really no point in doing all that initcall trickery when we can safely let udev handle module probing for us. Remove all of that trickery, by moving everybody to module_init() and making proper use of platform_device_register() rather than platform_device_probe(). Tested-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com> Tested-by: Tasslehoff Kjappfot <tasskjapp@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: musb: headers cleanupFelipe Balbi2011-12-121-8/+0
| | | | | | | Remove a few unnecessary headers from a few files. Signed-off-by: Felipe Balbi <balbi@ti.com>
* musb_debugfs.c: remove unneeded includes on ARMNicolas Pitre2011-09-261-6/+0
| | | | | | | | Nothing actually requires that <mach/hardware.h>, <mach/memory.h> nor <asm/mach-types.h> be included here. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Acked-by: Felipe Balbi <balbi@ti.com>
* headers: kobject.h reduxAlexey Dobriyan2011-01-101-1/+0
| | | | | | | | Remove kobject.h from files which don't need it, notably, sched.h and fs.h. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* usb: musb_debugfs: don't use the struct file private_data field with seq_filesMathias Nyman2010-09-201-3/+2
| | | | | | | | | | | seq_files use the private_data field of a file struct for storing a seq_file structure, data should be stored in seq_file's own private field (e.g. file->private_data->private) Otherwise seq_release() will free the private data when the file is closed. Signed-off-by: Mathias Nyman <mathias.nyman@nokia.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: musb: use correct register widths in register dumpsAnand Gadiyar2010-08-101-16/+16
| | | | | | | | | | | | | | DMA_ADDR and DMA_COUNT are 32-bit registers, not 16-bit. Marking them as 16-bit in the table causes only the lower 16-bits to be dumped and this is misleading. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: musb: update gfp/slab.h includesTejun Heo2010-05-201-1/+0
| | | | | | | | | | Implicit slab.h inclusion via percpu.h is about to go away. Make sure gfp.h or slab.h is included as necessary. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: musb: debugfs: musb_exit_debugfs() can be called on probeFelipe Balbi2010-05-201-1/+1
| | | | | | | | | when we fail to probe(), we can call musb_exit_debugfs(). Allow that by removing section annotations. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: musb: add debugfs supportFelipe Balbi2010-05-201-0/+295
for now only a simple register dump entry (which can be rather useful on debugging) and a way to start test modes. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud