Re: Downloading tracks from gps via usb

2016-05-13 Thread Stephen Furner
There seems to be something in addition to just the usb file access priverlages. When I changed them it changed the error message it did not resolve the problem as was expected. I used the following CHMOD command to change the access priverlages for the usb files chmod 666 /dev/bus/usb -R This

Re: [PATCH v4] usb: dwc2: fix regression on big-endian PowerPC/ARM systems

2016-05-13 Thread John Youn
On 5/13/2016 6:53 AM, Arnd Bergmann wrote: > A patch that went into Linux-4.4 to fix big-endian mode on a Lantiq > MIPS system unfortunately broke big-endian operation on PowerPC > APM82181 as reported by Christian Lamparter, and likely other > systems. > > It actually introduced multiple issues:

Re: [PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-13 Thread Tony Lindgren
* Tony Lindgren [160513 14:19]: > * Bin Liu [160513 14:05]: > > In stead of removing it, session bit should only be set when musb_mode > > == MUSB_HOST, will this fix the D+ pullup problem? > > Good point, I forgot about it being specific to host mode. I'll

Re: [PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-13 Thread Tony Lindgren
* Bin Liu [160513 15:04]: > > But what would be in musb_default_set_mode()? Currently only am35x, > da8xx, dsps, and omap2430 glues implement _set_mode(), but they don't > have any in common. Only omap2430 sets session bit in _set_mode(), no > one else does so. Well how about the

Re: [PATCH 1/3] properly report a single frame rate of 60 FPS

2016-05-13 Thread Florian Echtler
Fixed, sorry for the noise. One more question: Martin and I would also like to see these patches in the 4.4 longterm kernel; do we have to submit them separately, or will Greg KH pick them up eventually? Thanks & best regards, Florian On 13.05.2016 11:53, Hans Verkuil wrote: > On 05/13/2016

Re: [PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-13 Thread Bin Liu
Hi, On Fri, May 13, 2016 at 02:39:01PM -0700, Tony Lindgren wrote: > * Bin Liu [160513 14:24]: > > Hi, > > > > On Fri, May 13, 2016 at 02:17:39PM -0700, Tony Lindgren wrote: > > > * Bin Liu [160513 14:05]: > > > > Hi, > > > > > > > > On Wed, May 11, 2016 at

Re: [PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-13 Thread Tony Lindgren
* Bin Liu [160513 14:24]: > Hi, > > On Fri, May 13, 2016 at 02:17:39PM -0700, Tony Lindgren wrote: > > * Bin Liu [160513 14:05]: > > > Hi, > > > > > > On Wed, May 11, 2016 at 05:53:11PM -0700, Tony Lindgren wrote: > > > > At least 2430 glue layer pulls d+ high on

Re: [PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-13 Thread Bin Liu
Hi, On Fri, May 13, 2016 at 02:17:39PM -0700, Tony Lindgren wrote: > * Bin Liu [160513 14:05]: > > Hi, > > > > On Wed, May 11, 2016 at 05:53:11PM -0700, Tony Lindgren wrote: > > > At least 2430 glue layer pulls d+ high on start up even if there are > > > no gadgets configured.

Re: [PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-13 Thread Tony Lindgren
* Bin Liu [160513 14:05]: > Hi, > > On Wed, May 11, 2016 at 05:53:11PM -0700, Tony Lindgren wrote: > > At least 2430 glue layer pulls d+ high on start up even if there are > > no gadgets configured. This is bad at least for anything using a separate > > battery charger chip as it

Re: [PATCH 10/15] usb: musb: Don't set d+ high before enable for 2430 glue layer

2016-05-13 Thread Bin Liu
Hi, On Wed, May 11, 2016 at 05:53:11PM -0700, Tony Lindgren wrote: > At least 2430 glue layer pulls d+ high on start up even if there are > no gadgets configured. This is bad at least for anything using a separate > battery charger chip as it can confuse the charger detection. > > Let's fix the

Re: [PATCH 07/15] usb: musb: Handle cable status better for 2430 glue layer

2016-05-13 Thread Tony Lindgren
* Bin Liu [160513 13:43]: > Hi, > > On Fri, May 13, 2016 at 01:33:30PM -0700, Tony Lindgren wrote: > > * Bin Liu [160513 13:26]: > > > On Fri, May 13, 2016 at 03:21:55PM -0500, Bin Liu wrote: > > > > On Fri, May 13, 2016 at 01:09:02PM -0700, Tony Lindgren wrote: > >

Re: [PATCH 07/15] usb: musb: Handle cable status better for 2430 glue layer

2016-05-13 Thread Bin Liu
Hi, On Fri, May 13, 2016 at 01:33:30PM -0700, Tony Lindgren wrote: > * Bin Liu [160513 13:26]: > > On Fri, May 13, 2016 at 03:21:55PM -0500, Bin Liu wrote: > > > On Fri, May 13, 2016 at 01:09:02PM -0700, Tony Lindgren wrote: > > > > * Bin Liu [160513 12:58]: > > > >

Re: [PATCH 07/15] usb: musb: Handle cable status better for 2430 glue layer

2016-05-13 Thread Tony Lindgren
* Bin Liu [160513 13:26]: > On Fri, May 13, 2016 at 03:21:55PM -0500, Bin Liu wrote: > > On Fri, May 13, 2016 at 01:09:02PM -0700, Tony Lindgren wrote: > > > * Bin Liu [160513 12:58]: > > > > On Wed, May 11, 2016 at 06:33:04PM -0700, Tony Lindgren wrote: > > > > > ---

Re: [PATCH 07/15] usb: musb: Handle cable status better for 2430 glue layer

2016-05-13 Thread Bin Liu
On Fri, May 13, 2016 at 03:21:55PM -0500, Bin Liu wrote: > Hi, > > On Fri, May 13, 2016 at 01:09:02PM -0700, Tony Lindgren wrote: > > * Bin Liu [160513 12:58]: > > > On Wed, May 11, 2016 at 06:33:04PM -0700, Tony Lindgren wrote: > > > > --- a/drivers/usb/musb/omap2430.c > > > > +++

Re: [PATCH 07/15] usb: musb: Handle cable status better for 2430 glue layer

2016-05-13 Thread Bin Liu
Hi, On Fri, May 13, 2016 at 01:09:02PM -0700, Tony Lindgren wrote: > * Bin Liu [160513 12:58]: > > On Wed, May 11, 2016 at 06:33:04PM -0700, Tony Lindgren wrote: > > > --- a/drivers/usb/musb/omap2430.c > > > +++ b/drivers/usb/musb/omap2430.c > > > @@ -49,6 +49,9 @@ struct

Re: [PATCH 07/15] usb: musb: Handle cable status better for 2430 glue layer

2016-05-13 Thread Tony Lindgren
* Bin Liu [160513 12:58]: > On Wed, May 11, 2016 at 06:33:04PM -0700, Tony Lindgren wrote: > > --- a/drivers/usb/musb/omap2430.c > > +++ b/drivers/usb/musb/omap2430.c > > @@ -49,6 +49,9 @@ struct omap2430_glue { > > enum musb_vbus_id_status status; > > struct work_struct

Re: [PATCH 07/15] usb: musb: Handle cable status better for 2430 glue layer

2016-05-13 Thread Bin Liu
Hi, On Wed, May 11, 2016 at 06:33:04PM -0700, Tony Lindgren wrote: > * Tony Lindgren [160511 17:56]: > > We may have drivers loaded but no configured gadgets and MUSB may be in > > host mode. If gadgets are configured during host mode, PM runtime will > > get confused. > ... >

Re: [PATCH 1/3] properly report a single frame rate of 60 FPS

2016-05-13 Thread Hans Verkuil
On 05/13/2016 08:41 PM, Florian Echtler wrote: > The device hardware is always running at 60 FPS, so report this both via > PARM_IOCTL and ENUM_FRAMEINTERVALS. Florian, can you post these three patches to linux-media as well? These are all V4L2 related so they should be reviewed there. By

[PATCH 1/3] properly report a single frame rate of 60 FPS

2016-05-13 Thread Florian Echtler
The device hardware is always running at 60 FPS, so report this both via PARM_IOCTL and ENUM_FRAMEINTERVALS. Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 17 +++-- 1 file changed, 15

[PATCH 2/3] lower poll interval to fix occasional FPS drops to ~56 FPS

2016-05-13 Thread Florian Echtler
The framerate sometimes drops below 60 Hz if the poll interval is too high. Lowering it to the minimum of 1 ms fixes this. Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 2 +- 1 file changed, 1

Re: Downloading tracks from gps via usb

2016-05-13 Thread Alan Stern
On Fri, 13 May 2016, Stephen Furner wrote: > This is the permissions on the files for the USB being used by the Garmin > > stephen@stephen-N150P:/$ lsusb > Bus 001 Device 004: ID 0ac8:c33f Z-Star Microelectronics Corp. Webcam > Bus 001 Device 003: ID 0781:5567 SanDisk Corp. Cruzer Blade > Bus

Re: [PATCH 2/2] musb: sunxi: Set state to A_WAIT_VRISE when enabling VBus

2016-05-13 Thread Bin Liu
Hi, On Thu, May 12, 2016 at 08:31:09PM +0200, Hans de Goede wrote: > When the board is powering attached usb devices via the otg port > sometimes / on some devices it takes slightly too long for the VBus > detection code in phy-sun4i-usb.c to signal that VBus is high after > enabling VBus and the

Re: Downloading tracks from gps via usb

2016-05-13 Thread Stephen Furner
This is the permissions on the files for the USB being used by the Garmin stephen@stephen-N150P:/$ lsusb Bus 001 Device 004: ID 0ac8:c33f Z-Star Microelectronics Corp. Webcam Bus 001 Device 003: ID 0781:5567 SanDisk Corp. Cruzer Blade Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Re: [PATCH v8 10/14] usb: otg: add hcd companion support

2016-05-13 Thread Rob Herring
On Fri, May 13, 2016 at 5:03 AM, Roger Quadros wrote: > From: Yoshihiro Shimoda > > Since some host controller (e.g. EHCI) needs a companion host controller > (e.g. OHCI), this patch adds such a configuration to use it in the OTG > core. > >

[GIT PULL] USB-serial updates for v4.7-rc1

2016-05-13 Thread Johan Hovold
Hi Greg, Here are my updates for 4.7-rc1. All have been in linux-next without any reported issues. Thanks, Johan The following changes since commit 02da2d72174c61988eb4456b53f405e3ebdebce4: Linux 4.6-rc5 (2016-04-24 16:17:05 -0700) are available in the git repository at:

Re: Fwd: Downloading tracks from gps via usb

2016-05-13 Thread Alan Stern
On Fri, 13 May 2016, Stephen Furner wrote: > The only reference I can find to usb in a search of the strace output is: > > 0.001723 stat("usb:", 0x7ffe93f30be0) = -1 ENOENT (No such file or directory) > > Yes from what Manfred says it seems likely that the ubuntu > distribution I'm using has

Re: [PATCH 0/3] usb: USB Type-C Class and driver for UCSI

2016-05-13 Thread Guenter Roeck
Hi, On Fri, May 13, 2016 at 05:23:21PM +0300, Heikki Krogerus wrote: > Hi, > > On Wed, May 11, 2016 at 07:47:18AM -0700, Guenter Roeck wrote: > > Hi, > > > > On Wed, May 11, 2016 at 12:40:11PM +0300, Heikki Krogerus wrote: > > > On Tue, May 10, 2016 at 08:14:34PM -0700, Guenter Roeck wrote: > >

Re: Fwd: Downloading tracks from gps via usb

2016-05-13 Thread Stephen Furner
The only reference I can find to usb in a search of the strace output is: 0.001723 stat("usb:", 0x7ffe93f30be0) = -1 ENOENT (No such file or directory) Yes from what Manfred says it seems likely that the ubuntu distribution I'm using has only half the hotplug fix implemented. It does not have

Re: [PATCH] cdc-wdm: fix "out-of-sync" due to missing notifications

2016-05-13 Thread Bjørn Mork
Bjørn Mork writes: > The driver enforces a strict one-to-one relationship between the > received RESPONSE_AVAILABLE notifications and messages read from > the device. At the same time, it will cancel the interrupt URB > when there is no client holding the character device open.

Re: [PATCH 3/3] USB: ohci-jz4740: Remove obsolete driver

2016-05-13 Thread Greg Kroah-Hartman
On Fri, May 13, 2016 at 06:40:17PM +0200, Ralf Baechle wrote: > Maarten, > > if you submit a USB change to the USB mailing list and maintainer the > probability for the maintainer to ack this patch will actuall rise > significantly ;-) > > Greg, I assume this patch is ok to merge or do you want

Re: [PATCH 3/3] USB: ohci-jz4740: Remove obsolete driver

2016-05-13 Thread Ralf Baechle
Maarten, if you submit a USB change to the USB mailing list and maintainer the probability for the maintainer to ack this patch will actuall rise significantly ;-) Greg, I assume this patch is ok to merge or do you want to funnel it hrough your tree? I think it would be good to take this

[PATCH] cdc-wdm: fix "out-of-sync" due to missing notifications

2016-05-13 Thread Bjørn Mork
The driver enforces a strict one-to-one relationship between the received RESPONSE_AVAILABLE notifications and messages read from the device. At the same time, it will cancel the interrupt URB when there is no client holding the character device open. Many devices do not cope well with this

Re: [RFT PATCH] xhci: Fix handling timeouted commands on hosts in weird states.

2016-05-13 Thread Joe Lawrence
On 05/12/2016 07:57 AM, Mathias Nyman wrote: > If commands timeout we mark them for abortion, then stop the command > ring, and turn the commands to no-ops and finally restart the command > ring. > > If the host is working properly the no-op commands will finish and > pending completions are

Re: Fwd: Downloading tracks from gps via usb

2016-05-13 Thread Alan Stern
On Thu, 12 May 2016, Stephen Furner wrote: > I apologise if this is a duplicate I had a bounce back from the list > due to it since I had inadvertently included HTML. So I am resending. > > To: Alan Stern > Cc: USB list > > Alan, > > I

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-13 Thread Alan Stern
On Fri, 13 May 2016, Felipe Balbi wrote: > We deliver to userspace the part userspace requested, right? So that's > okay. The USB details WRT e.g. babble or host trying to send more data > than expected, needs to be handled within the kernel. The point is that you don't know whether the host

Re: Downloading tracks from gps via usb

2016-05-13 Thread Alan Stern
On Thu, 12 May 2016, Stephen Furner wrote: > Alan, > > The permissions for the usb ports are: > > stephen@stephen-N150P:/$ ls -l dev/bus/usb > total 0 > drwxr-xr-x 2 root root 100 May 11 14:39 001 > drwxr-xr-x 2 root root 60 May 12 01:48 002 > drwxr-xr-x 2 root root 80 May 12 21:04 003 >

Re: [PATCH 0/3] usb: USB Type-C Class and driver for UCSI

2016-05-13 Thread Heikki Krogerus
Hi, On Wed, May 11, 2016 at 07:47:18AM -0700, Guenter Roeck wrote: > Hi, > > On Wed, May 11, 2016 at 12:40:11PM +0300, Heikki Krogerus wrote: > > On Tue, May 10, 2016 at 08:14:34PM -0700, Guenter Roeck wrote: > > > Heikki, > > > > > > On 05/06/2016 01:08 AM, Heikki Krogerus wrote: > > > > Hi, >

[PATCH v4] usb: dwc2: fix regression on big-endian PowerPC/ARM systems

2016-05-13 Thread Arnd Bergmann
A patch that went into Linux-4.4 to fix big-endian mode on a Lantiq MIPS system unfortunately broke big-endian operation on PowerPC APM82181 as reported by Christian Lamparter, and likely other systems. It actually introduced multiple issues: - it broke big-endian ARM kernels: any machine that

Re: [PATCH v3] usb: dwc2: fix regression on big-endian PowerPC/ARM systems

2016-05-13 Thread Arnd Bergmann
On Thursday 12 May 2016 23:32:18 John Youn wrote: > > Hi Arnd, > > The capitalization issue is still there in this patch. > > There's also a few checkpatch issues. Fixed now, thanks. I'll send a v4 in a bit. > And should the barrier be moved after the write like it says in the > comment? That

Re: [PATCH] dwc3: gadget: Defer starting the gadget device until gadget is power on

2016-05-13 Thread Felipe Balbi
Hi, Baolin Wang writes: why does it need restart? Why is dwc3 powered off? Who powers it off? >>> >>> Because when the dwc3 Vbus is off (no cable pluging in now), >>> especially for some mobile device, the system need to power off the >>> dwc3 to save power in this

Re: [PATCH] dwc3: gadget: Defer starting the gadget device until gadget is power on

2016-05-13 Thread Baolin Wang
On 13 May 2016 at 20:09, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 6254b2f..dada5c6 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h

[PATCH 1/1] usb: gadget: f_fs: Fix kernel panic if use_os_string not set

2016-05-13 Thread Jim Lin
If c->cdev->use_os_string flag is not set, don't need to invoke ffs_do_os_descs() in _ffs_func_bind. So uninitialized ext_compat_id pointer won't be accessed by __ffs_func_bind_do_os_desc to cause kernel panic. Signed-off-by: Jim Lin --- drivers/usb/gadget/function/f_fs.c | 18

Re: [PATCH] dwc3: gadget: Defer starting the gadget device until gadget is power on

2016-05-13 Thread Felipe Balbi
Hi, Baolin Wang writes: >>> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h >>> index 6254b2f..dada5c6 100644 >>> --- a/drivers/usb/dwc3/core.h >>> +++ b/drivers/usb/dwc3/core.h >>> @@ -734,6 +734,9 @@ struct dwc3_scratchpad_array { >>> * 1 -

Re: [PATCH] dwc3: gadget: Defer starting the gadget device until gadget is power on

2016-05-13 Thread Baolin Wang
Hi Felipe, On 13 May 2016 at 18:40, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Currently on some platforms, the gadget device can be power off to >> save power when the Vbus is off, which means no cable plugging in >> now. In this situation

Re: [PATCH v8 1/7] regulator: fixed: add support for ACPI interface

2016-05-13 Thread Mark Brown
On Thu, May 05, 2016 at 01:32:57PM +0800, Lu Baolu wrote: > + gpiod = gpiod_get(dev, "gpio", GPIOD_ASIS); > + if (IS_ERR(gpiod)) > + return ERR_PTR(-ENODEV); > + config->gpio = desc_to_gpio(gpiod); > + config->enable_high = device_property_read_bool(dev, > +

Re: [PATCH] dwc3: gadget: Defer starting the gadget device until gadget is power on

2016-05-13 Thread Felipe Balbi
Hi, Baolin Wang writes: > Currently on some platforms, the gadget device can be power off to > save power when the Vbus is off, which means no cable plugging in > now. In this situation we should defer starting the gadget until the > gadget device is power on by

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-13 Thread Du, Changbin
Hi, > >> Yeah, it probably deserves a pr_err() or pr_debug(), but host sending > >> more data than it should, is another problem altogether which needs to > >> be addressed at the host. > >> > >> Adding a print to aid debugging is a good idea, but bailing out on the > >> peripheral side is not

[PATCH] usb: gadget: composite: don't queue OS desc req if length is invalid

2016-05-13 Thread William Wu
In OS descriptors handling, if ctrl->bRequestType is USB_RECIP_DEVICE and w_index != 0x4 or (w_value >> 8) is true, it will not assign a valid value to req->length, but use the default value(-EOPNOTSUPP), and queue an OS desc request with the invalid req->length. It always happens on the platforms

[PATCH] dwc3: gadget: Defer starting the gadget device until gadget is power on

2016-05-13 Thread Baolin Wang
Currently on some platforms, the gadget device can be power off to save power when the Vbus is off, which means no cable plugging in now. In this situation we should defer starting the gadget until the gadget device is power on by connecting host. Signed-off-by: Baolin Wang

ftdi_sio: overrun errors

2016-05-13 Thread michael
Hi, if the internal buffer is full, a read() returns a steady stream of zeros until one valid character is received. According to my experiments this happens if the FT232 receives characters while the device is not opened. After the 257th byte the device returns overrun errors, which are

[PATCH v2] usb: dwc3: add DWC3_GUCTL1 reg for debug

2016-05-13 Thread William Wu
GUCTL1 reg has some useful functions which can be written by user. For rockchip platform, we set GUCTL1.DEV_FORCE_20_CLK_FOR_30_CLK (bit26, applicable for the core is programmed to operate in 2.0 device only) to 1 in bootrom, and after start the kernel, we want to check whether this bit can be

[PATCH v8 01/14] usb: hcd: Initialize hcd->flags to 0

2016-05-13 Thread Roger Quadros
When using the OTG/drd library we can call hcd_add/remove consecutively without calling usb_put_hcd/usb_create_hcd in between so hcd->flags can be stale. If the HC dies due to whatever reason then without this patch we get the below error on next hcd_add. [ 91.494257] xhci-hcd xhci-hcd.0.auto:

Re: [PATCH] usb: dwc3: add DWC3_GUCTL1 reg for debug

2016-05-13 Thread William Wu
On 05/13/2016 06:05 PM, William Wu wrote: GUCTL1 reg has some useful functions which can be written by user. For rockchip platform, we set GUCTL1.DEV_FORCE_20_CLK_FOR_30_CLK (bit26, applicable for the core is programmed to operate in 2.0 device only) to 1 in bootrom, and after start the kernel,

[PATCH v8 00/14] USB OTG/dual-role framework

2016-05-13 Thread Roger Quadros
Hi, This series centralizes OTG/Dual-role functionality in the kernel. As of now I've got Dual-role functionality working pretty reliably on dra7-evm and am437x-gp-evm. NOTE: my am437x-gp-evm broke so I couldn't test v8 on it. But the changes since v7 are trivial and shouldn't impact

[PATCH v8 10/14] usb: otg: add hcd companion support

2016-05-13 Thread Roger Quadros
From: Yoshihiro Shimoda Since some host controller (e.g. EHCI) needs a companion host controller (e.g. OHCI), this patch adds such a configuration to use it in the OTG core. Signed-off-by: Yoshihiro Shimoda Signed-off-by:

[PATCH v8 02/14] usb: otg-fsm: Prevent build warning "VDBG" redefined

2016-05-13 Thread Roger Quadros
If usb/otg-fsm.h and usb/composite.h are included together then it results in the build warning [1]. Prevent that by defining VDBG locally. Also get rid of MPC_LOC which doesn't seem to be used by anyone. [1] - warning fixed by this patch: In file included from drivers/usb/dwc3/core.h:33,

[PATCH v8 03/14] usb: hcd.h: Add OTG to HCD interface

2016-05-13 Thread Roger Quadros
The OTG core will use struct otg_hcd_ops to interface with the HCD controller. The main purpose of this interface is to avoid directly calling HCD APIs from the OTG core as they wouldn't be defined in the built-in symbol table if CONFIG_USB is m. Signed-off-by: Roger Quadros

[PATCH v8 05/14] usb: otg-fsm: move host controller operations into usb_otg->hcd_ops

2016-05-13 Thread Roger Quadros
This is to prevent missing symbol build error if OTG is enabled (built-in) and HCD core (CONFIG_USB) is module. Signed-off-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/chipidea/otg_fsm.c | 7 +++ drivers/usb/common/usb-otg-fsm.c | 15

[PATCH v8 04/14] usb: otg-fsm: use usb_otg wherever possible

2016-05-13 Thread Roger Quadros
Move otg_fsm into usb_otg and use usb_otg wherever possible in the usb_otg APIs. Signed-off-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/chipidea/ci.h| 1 - drivers/usb/chipidea/core.c | 14 +-- drivers/usb/chipidea/debug.c | 2

[PATCH v8 07/14] usb: otg: get rid of CONFIG_USB_OTG_FSM in favour of CONFIG_USB_OTG

2016-05-13 Thread Roger Quadros
Let's use CONFIG_USB_OTG as a single config option to enable USB OTG and the OTG FSM. This makes things a lot less confusing. Update all users of CONFIG_USB_OTG_FSM to CONFIG_USB_OTG. Signed-off-by: Roger Quadros Acked-by: Peter Chen ---

[PATCH v8 06/14] usb: gadget.h: Add OTG to gadget interface

2016-05-13 Thread Roger Quadros
The OTG core will use struct otg_gadget_ops to start/stop the gadget controller. The main purpose of this interface is to avoid directly calling usb_gadget_start/stop() from the OTG core as they wouldn't be defined in the built-in symbol table if CONFIG_USB_GADGET is m. Signed-off-by: Roger

[PATCH v8 08/14] usb: otg: add OTG/dual-role core

2016-05-13 Thread Roger Quadros
It provides APIs for the following tasks - Registering an OTG/dual-role capable controller - Registering Host and Gadget controllers to OTG core - Providing inputs to and kicking the OTG state machine Provide a dual-role device (DRD) state machine. DRD mode is a reduced functionality OTG mode.

[PATCH] usb: dwc3: add DWC3_GUCTL1 reg for debug

2016-05-13 Thread William Wu
GUCTL1 reg has some useful functions which can be written by user. For rockchip platform, we set GUCTL1.DEV_FORCE_20_CLK_FOR_30_CLK (bit26, applicable for the core is programmed to operate in 2.0 device only) to 1 in bootrom, and after start the kernel, we want to check whether this bit can be

[PATCH v8 09/14] usb: of: add an API to get OTG device from USB controller node

2016-05-13 Thread Roger Quadros
The OTG controller and the USB controller can be linked via the 'otg-controller' property in the USB controller's device node. of_usb_get_otg() can be used to get the OTG controller device from the USB controller's device node. Signed-off-by: Roger Quadros Acked-by: Peter Chen

[PATCH v8 11/14] usb: otg: use dev_dbg() instead of VDBG()

2016-05-13 Thread Roger Quadros
Now that we have a device reference in struct usb_otg let's use dev_dbg() for debug messages. Signed-off-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/common/usb-otg-fsm.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-)

[PATCH v8 12/14] usb: hcd: Adapt to OTG core

2016-05-13 Thread Roger Quadros
Introduce usb_otg_add/remove_hcd() for use by host controllers that are part of OTG/dual-role port. Non Device tree platforms can use the otg_dev argument to specify the OTG controller device. If otg_dev is NULL then the device tree node's otg-controller property is used to get the otg_dev

[PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-05-13 Thread Roger Quadros
The OTG state machine needs a mechanism to start and stop the gadget controller as well as connect/disconnect from the bus. Add usb_gadget_start(), usb_gadget_stop() and usb_gadget_connect_control(). Introduce usb_otg_add_gadget_udc() to allow controller drivers to register a gadget controller

[PATCH v8 14/14] usb: host: xhci-plat: Add otg device to platform data

2016-05-13 Thread Roger Quadros
Host controllers that are part of an OTG/dual-role instance need to somehow pass the OTG controller device information to the HCD core. We use platform data to pass the OTG controller device. Signed-off-by: Roger Quadros Reviewed-by: Peter Chen ---

[PATCH v2 5/5] usb: dwc3: rockchip: add devicetree bindings documentation

2016-05-13 Thread William Wu
This patch documents the device tree documentation required for Rockchip USB3.0 core wrapper consist of USB3.0 IP from Synopsys. It could operate in device mode (SS, HS, FS) and host mode (SS, HS, FS, LS). Signed-off-by: William Wu --- Changes in v2: - add

Re: [PATCH v2 0/5] support rockchip dwc3 driver

2016-05-13 Thread William Wu
Dear Felipe, On 05/13/2016 05:37 PM, Felipe Balbi wrote: Hi, William Wu writes: This series add support for rockchip dwc3 driver, and add additional optional properties for specific platforms (e.g., rockchip platform). William Wu (5): usb: dwc3: of-simple: add

Re: [PATCH v2 0/5] support rockchip dwc3 driver

2016-05-13 Thread Felipe Balbi
Hi, William Wu writes: > This series add support for rockchip dwc3 driver, > and add additional optional properties for specific > platforms (e.g., rockchip platform). > > William Wu (5): > usb: dwc3: of-simple: add compatible for rockchip > usb: dwc3: add

Re: [PATCH v2 0/5] support rockchip dwc3 driver

2016-05-13 Thread Heiko Stuebner
Hi William, Am Freitag, 13. Mai 2016, 17:24:56 schrieb William Wu: > This series add support for rockchip dwc3 driver, > and add additional optional properties for specific > platforms (e.g., rockchip platform). when submitting new versions of patchsets please also start a new thread. It is hard

[PATCH v2 1/5] usb: dwc3: of-simple: add compatible for rockchip

2016-05-13 Thread William Wu
Rockchip platform merely enable usb3 clocks and populate its children. So we can use this generic glue layer to support Rockchip dwc3. Signed-off-by: William Wu --- Changes in v2: - sort the list of_dwc3_simple_match (Doug) drivers/usb/dwc3/dwc3-of-simple.c | 1 + 1

[PATCH v2 0/5] support rockchip dwc3 driver

2016-05-13 Thread William Wu
This series add support for rockchip dwc3 driver, and add additional optional properties for specific platforms (e.g., rockchip platform). William Wu (5): usb: dwc3: of-simple: add compatible for rockchip usb: dwc3: add dis_u2_freeclk_exists_quirk usb: dwc3: add phyif_utmi_quirk usb:

[PATCH v2 2/5] usb: dwc3: add dis_u2_freeclk_exists_quirk

2016-05-13 Thread William Wu
Add a quirk to clear the GUSB2PHYCFG.U2_FREECLK_EXISTS bit, which specifies whether the USB2.0 PHY provides a free-running PHY clock, which is active when the clock control input is active. Signed-off-by: William Wu --- Changes in v2: - None

[PATCH v2 4/5] usb: dwc3: add dis_del_phy_power_chg_quirk

2016-05-13 Thread William Wu
Add a quirk to clear the GUSB3PIPECTL.DELAYP1TRANS bit, which specifies whether disable delay PHY power change from P0 to P1/P2/P3 when link state changing from U0 to U1/U2/U3 respectively. Signed-off-by: William Wu --- Changes in v2: - None

[PATCH v2 3/5] usb: dwc3: add phyif_utmi_quirk

2016-05-13 Thread William Wu
Add a quirk to configure the core to support the UTMI+ PHY with an 8- or 16-bit interface. UTMI+ PHY interface is hardware property, and it's platform dependent. Normall, the PHYIf can be configured during coreconsultant. But for some specific usb cores(e.g. rk3399 soc dwc3), the default PHYIf

Re: [RFC PATCH v2 4/4] ARM: dts: vf-colibri: USB device/host switch using extcon gpio

2016-05-13 Thread Peter Chen
On Thu, May 12, 2016 at 02:47:09PM +0530, maitysancha...@gmail.com wrote: > Hello Peter, > > On 16-05-12 16:40:16, Peter Chen wrote: > > On Wed, May 11, 2016 at 06:11:36PM +0530, Sanchayan Maity wrote: > > > Use USBC_DET feature of standard Colibri SODIMM pin 137 for USB > > > device/host

RE: [PATCH] usb: gadget: f_fs: report error if excess data received

2016-05-13 Thread Felipe Balbi
Hi, "Du, Changbin" writes: >> "Du, Changbin" writes: >> >> right, and that was my point: if we copy more to userspace, then we have >> >> a real big problem. >> >> >> > Yes, we drop the data because we userspace buffer is not enough this time. >> >

Re: [PATCH v3] usb: dwc2: fix regression on big-endian PowerPC/ARM systems

2016-05-13 Thread John Youn
On 5/12/2016 1:56 PM, Arnd Bergmann wrote: > A patch that went into Linux-4.4 to fix big-endian mode on a Lantiq > MIPS system unfortunately broke big-endian operation on PowerPC > APM82181 as reported by Christian Lamparter, and likely other > systems. > > It actually introduced multiple issues: