[GIT PULL] USB driver fixes for 4.7-rc6

2016-07-01 Thread Greg KH
The following changes since commit 33688abb2802ff3a230bd2441f765477b94cc89e: Linux 4.7-rc4 (2016-06-19 21:30:02 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ tags/usb-4.7-rc6 for you to fetch changes up to

Re: [GIT PULL] usb: chipidea changes for v4.8-rc1

2016-07-01 Thread Greg Kroah-Hartman
On Fri, Jul 01, 2016 at 10:11:26AM +0800, Peter Chen wrote: > The following changes since commit aa5e94a2e13377e374795de5400e346c978f46be: > > Revert "usb: ohci-at91: Forcibly suspend ports while USB suspend" > (2016-06-20 07:42:07 -0700) > > are available in the git repository at: > >

Re: [PATCHv4 1/2] usb: USB Type-C connector class

2016-07-01 Thread Guenter Roeck
On Fri, Jul 01, 2016 at 10:38:03AM +0300, Heikki Krogerus wrote: > On Thu, Jun 30, 2016 at 10:10:25AM -0700, Guenter Roeck wrote: > > On Wed, Jun 29, 2016 at 04:38:37PM +0300, Heikki Krogerus wrote: > > > The purpose of USB Type-C connector class is to provide > > > unified interface for the user

Re: [PATCHv4 1/2] usb: USB Type-C connector class

2016-07-01 Thread Guenter Roeck
On Fri, Jul 01, 2016 at 03:05:35PM +0300, Heikki Krogerus wrote: > On Fri, Jul 01, 2016 at 10:13:48AM +0300, Heikki Krogerus wrote: > > Hi Guenter, > > > > On Thu, Jun 30, 2016 at 03:02:20PM -0700, Guenter Roeck wrote: > > > > +static ssize_t > > > > +preferred_role_store(struct device *dev,

Re: [RFC] usb: phy: generic: get rid of VBUS handling

2016-07-01 Thread Felipe Balbi
Hi, Robert Jarzmik writes: >> your commit 7acc9973e3c4 ("usb: phy: generic: add vbus support") added >> GPIO-based VBUS handling for phy-generic.c, but that ends up calling >> usb_gadget_vbus_connect() which forces NOP to depend on the gadget API. >> >> I was grepping

[PATCH 2/3] usb: gadget: u_ether: fix dereference after null check coverify warning

2016-07-01 Thread Peter Chen
dev->port_usb is checked for null pointer at above code, so dev->port_usb might be null, fix it by adding null pointer check. Signed-off-by: Peter Chen --- drivers/usb/gadget/function/u_ether.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [RFC] usb: phy: generic: get rid of VBUS handling

2016-07-01 Thread Robert Jarzmik
Felipe Balbi writes: > Hi Robert, > > your commit 7acc9973e3c4 ("usb: phy: generic: add vbus support") added > GPIO-based VBUS handling for phy-generic.c, but that ends up calling > usb_gadget_vbus_connect() which forces NOP to depend on the gadget API. > > I was

Re: [PATCHv4 1/2] usb: USB Type-C connector class

2016-07-01 Thread Heikki Krogerus
On Fri, Jul 01, 2016 at 10:13:48AM +0300, Heikki Krogerus wrote: > Hi Guenter, > > On Thu, Jun 30, 2016 at 03:02:20PM -0700, Guenter Roeck wrote: > > > +static ssize_t > > > +preferred_role_store(struct device *dev, struct device_attribute *attr, > > > + const char *buf, size_t size)

Re: [PATCH] usb: host: Allow EHCI_OMAP to be built-in when USB_GADGET is 'm'

2016-07-01 Thread Roger Quadros
On 01/07/16 12:41, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: NOP_USB_XCEIV is used not only by gadget drivers but by host drivers as well e.g. EHCI_OMAP. commit 5a8d651a2bde ("usb: gadget: move gadget API functions to

Re: [PATCH net] r8152: clear LINK_OFF_WAKE_EN after autoresume

2016-07-01 Thread David Miller
From: Hayes Wang Date: Thu, 30 Jun 2016 15:33:35 +0800 > LINK_OFF_WAKE_EN should be cleared after autoresume, otherwise after > system suspend, the system would wake up when linking off occurs. > > Signed-off-by: Hayes Wang Applied, thanks. -- To

[RFC] usb: phy: generic: get rid of VBUS handling

2016-07-01 Thread Felipe Balbi
Hi Robert, your commit 7acc9973e3c4 ("usb: phy: generic: add vbus support") added GPIO-based VBUS handling for phy-generic.c, but that ends up calling usb_gadget_vbus_connect() which forces NOP to depend on the gadget API. I was grepping around and couldn't find any users for that VBUS gpio

Re: [PATCH] usb: host: Allow EHCI_OMAP to be built-in when USB_GADGET is 'm'

2016-07-01 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> NOP_USB_XCEIV is used not only by gadget drivers but by >>> host drivers as well e.g. EHCI_OMAP. >>> >>> commit 5a8d651a2bde ("usb: gadget: move gadget API functions to >>> udc-core") >>> made it so that NOP_USB_XCEIV can't

[PATCH 1/3] usb: gadget: composite: fix dereference after null check coverify warning

2016-07-01 Thread Peter Chen
cdev->config is checked for null pointer at above code, so cdev->config might be null, fix it by adding null pointer check. Signed-off-by: Peter Chen --- drivers/usb/gadget/composite.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/gadget/composite.c

[PATCH 3/3] usb: gadget: u_ether: fix dereference after null check coverify warning

2016-07-01 Thread Peter Chen
skb is checked for null pointer at above code, so skb might be null. eem_wrap uses it without checking null pointer, fix it by adding null pointer check. Signed-off-by: Peter Chen --- drivers/usb/gadget/function/u_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 0/3] usb: gadget: fix several coverity warnings

2016-07-01 Thread Peter Chen
Hi Felipe, Below three patches are fixes for warning which are found during coverity code scan, all for dereference after null pointer check. Peter Chen (3): usb: gadget: composite: fix dereference after null check coverify warning usb: gadget: u_ether: fix dereference after null check

Re: [PATCH] usb: host: Allow EHCI_OMAP to be built-in when USB_GADGET is 'm'

2016-07-01 Thread Roger Quadros
On 01/07/16 11:15, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >> NOP_USB_XCEIV is used not only by gadget drivers but by >> host drivers as well e.g. EHCI_OMAP. >> >> commit 5a8d651a2bde ("usb: gadget: move gadget API functions to >> udc-core")

Re: [PATCH] usb: host: Allow EHCI_OMAP to be built-in when USB_GADGET is 'm'

2016-07-01 Thread Felipe Balbi
Hi, Roger Quadros writes: > NOP_USB_XCEIV is used not only by gadget drivers but by > host drivers as well e.g. EHCI_OMAP. > > commit 5a8d651a2bde ("usb: gadget: move gadget API functions to udc-core") > made it so that NOP_USB_XCEIV can't be built-in if

Re: [PATCH] usb: host: Allow EHCI_OMAP to be built-in when USB_GADGET is 'm'

2016-07-01 Thread Roger Quadros
On 01/07/16 10:57, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: NOP_USB_XCEIV is used not only by gadget drivers but by host drivers as well e.g. EHCI_OMAP. commit 5a8d651a2bde ("usb: gadget: move gadget API functions to udc-core") made it so

RE: ftdi_sio: overrun errors

2016-07-01 Thread David Laight
From: Michael Walle ... > What comes directly to my mind is the handling of the break condition. > Can't look into that at the moment. But if break conditions are > translated into status-only packets, how are two consecutive breaks > recognized. Ie. if the break condition flag is sticky (until a

Re: [PATCH] usb: host: Allow EHCI_OMAP to be built-in when USB_GADGET is 'm'

2016-07-01 Thread Felipe Balbi
Hi, Roger Quadros writes: >>> NOP_USB_XCEIV is used not only by gadget drivers but by >>> host drivers as well e.g. EHCI_OMAP. >>> >>> commit 5a8d651a2bde ("usb: gadget: move gadget API functions to udc-core") >>> made it so that NOP_USB_XCEIV can't be built-in if USB_GADGET is

Re: [PATCHv4 1/2] usb: USB Type-C connector class

2016-07-01 Thread Heikki Krogerus
On Thu, Jun 30, 2016 at 10:10:25AM -0700, Guenter Roeck wrote: > On Wed, Jun 29, 2016 at 04:38:37PM +0300, Heikki Krogerus wrote: > > The purpose of USB Type-C connector class is to provide > > unified interface for the user space to get the status and > > basic information about USB Type-C

Re: [PATCHv4 1/2] usb: USB Type-C connector class

2016-07-01 Thread Heikki Krogerus
Hi Guenter, On Thu, Jun 30, 2016 at 03:02:20PM -0700, Guenter Roeck wrote: > > +static ssize_t > > +preferred_role_store(struct device *dev, struct device_attribute *attr, > > +const char *buf, size_t size) > > +{ > > + struct typec_port *port = to_typec_port(dev); > > + enum

[PATCH v15 1/4] usb: gadget: Introduce the usb charger framework

2016-07-01 Thread Baolin Wang
This patch introduces the usb charger driver based on usb gadget that makes an enhancement to a power driver. It works well in practice but that requires a system with suitable hardware. The basic conception of the usb charger is that, when one usb charger is added or removed by reporting from

[PATCH v15 3/4] usb: gadget: Integrate with the usb gadget supporting for usb charger

2016-07-01 Thread Baolin Wang
When the usb gadget supporting for usb charger is ready, the usb charger can implement the usb_charger_plug_by_gadget() function, usb_charger_exit() function and dev_to_uchger() function by getting 'struct usb_charger' from 'struct gadget'. Signed-off-by: Baolin Wang

[PATCH v15 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-07-01 Thread Baolin Wang
Currently the Linux kernel does not provide any standard integration of this feature that integrates the USB subsystem with the system power regulation provided by PMICs meaning that either vendors must add this in their kernels or USB gadget devices based on Linux (such as mobile phones) may not

[PATCH v15 2/4] usb: gadget: Support for the usb charger framework

2016-07-01 Thread Baolin Wang
For supporting the usb charger, it adds the usb_charger_init() and usb_charger_exit() functions for usb charger initialization and exit. It will report to the usb charger when the gadget state is changed, then the usb charger can do the power things. Signed-off-by: Baolin Wang

[PATCH v15 4/4] power: wm831x_power: Support USB charger current limit management

2016-07-01 Thread Baolin Wang
Integrate with the newly added USB charger interface to limit the current we draw from the USB input based on the input device configuration identified by the USB stack, allowing us to charge more quickly from high current inputs without drawing more current than specified from others.