RE: [PATCH] usb: ohci-at91: Suspend the ports while USB suspending

2016-06-23 Thread Yang, Wenyou
Hi Alan, Sorry for late answer. > -Original Message- > From: Alan Stern [mailto:st...@rowland.harvard.edu] > Sent: 2016年5月13日 2:11 > To: Yang, Wenyou > Cc: Greg Kroah-Hartman ; Ferre, Nicolas > ;

Re: [PATCH] usb: serial: update CH34x driver in drivers/usb/serial

2016-06-23 Thread Greg KH
On Thu, Jun 23, 2016 at 06:47:54PM -0700, t...@winchiphead.com wrote: > The old driver for usb-serial chips ch34x which submitted by kernel volunteer > Frank A Kingswood is too old to use, and > the > driver has bugs when receiving chracters, thus after

Re: [PATCH] usb: serial: update CH34x driver in drivers/usb/serial

2016-06-23 Thread Greg KH
On Thu, Jun 23, 2016 at 06:47:54PM -0700, t...@winchiphead.com wrote: > The old driver for usb-serial chips ch34x which submitted by kernel volunteer > Frank A Kingswood is too old to use, and > the > driver has bugs when receiving chracters, thus after

[PATCH] usb: serial: update CH34x driver in drivers/usb/serial

2016-06-23 Thread tech
The old driver for usb-serial chips ch34x which submitted by kernel volunteer Frank A Kingswood is too old to use, and the driver has bugs when receiving chracters, thus after communicating with the author we decide to revoke the old driver ch341.c and submit

[PATCH] usb-gadget/f_hid: add dev to configfs

2016-06-23 Thread Johannes Berg
Even if the /dev/hidg* chardev is automatically created, one has to guess which one belongs to which function. In the case of multiple HID functions, or maybe even multiple peripherals, this becomes difficult. Add the dev (with major and minor number) to configfs to allow looking up (or even

[PATCH] USB: don't free bandwidth_mutex too early

2016-06-23 Thread Alan Stern
The USB core contains a bug that can show up when a USB-3 host controller is removed. If the primary (USB-2) hcd structure is released before the shared (USB-3) hcd, the core will try to do a double-free of the common bandwidth_mutex. The problem was described in graphical form by Chung-Geol

Re: USB: EHCI: declare hostpc register as zero-length array

2016-06-23 Thread Alan Stern
Greg: Sorry, the Subject line of the original email left out "[PATCH]" at the beginning. Will it still work with your scripts? Alan Stern On Thu, 23 Jun 2016, Alan Stern wrote: > The HOSTPC extension registers found in some EHCI implementations form > a variable-length array, with one

USB: EHCI: declare hostpc register as zero-length array

2016-06-23 Thread Alan Stern
The HOSTPC extension registers found in some EHCI implementations form a variable-length array, with one element for each port. Therefore the hostpc field in struct ehci_regs should be declared as a zero-length array, not a single-element array. This fixes a problem reported by UBSAN.

Re: [PATCH] usb: xhci: handle uPD720201 and uPD720202 w/o ROM

2016-06-23 Thread Christian Lamparter
Hello, On Tuesday, June 21, 2016 05:56:58 AM Yoshihiro Shimoda wrote: > > From: Christian Lamparter > > Sent: Tuesday, June 21, 2016 12:32 AM > > > > On Wednesday, June 08, 2016 12:14:57 AM Christian Lamparter wrote: > > > This patch adds a firmware check for the uPD720201K8-711-BAC-A > > > and

Re: [PATCH v2] input: tablet: pegasus_notetaker: USB PM fixes

2016-06-23 Thread Dmitry Torokhov
Hi Martin, On Tue, Jun 14, 2016 at 01:20:15PM +0200, Martin Kepplinger wrote: > static int pegasus_reset_resume(struct usb_interface *intf) > { > + struct pegasus *pegasus = usb_get_intfdata(intf); > + > + if (pegasus->dev->users) > + pegasus_set_mode(pegasus, PEN_MODE_XY,

Re: [PATCH v9] input: tablet: add Pegasus Notetaker tablet driver

2016-06-23 Thread Martin Kepplinger
Am 2016-06-15 um 15:01 schrieb Martin Kepplinger: > This adds a driver for the Pegasus Notetaker Pen. When connected, > this uses the Pen as an input tablet. > > This device was sold in various different brandings, for example > "Pegasus Mobile Notetaker M210", > "Genie e-note The Notetaker", >

[PATCH] Validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands.

2016-06-23 Thread Scott Bauer
This patch validates the num_values parameter from userland during the HIDIOCGUSAGES and HIDIOCSUSAGES commands. Previously, if the report id was set to HID_REPORT_ID_UNKNOWN, we would fail to validate the num_values parameter leading to a heap overflow. Signed-off-by: Scott Bauer

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

2016-06-23 Thread Guenter Roeck
On 06/23/2016 05:00 AM, Heikki Krogerus wrote: Hi Oliver, On Thu, Jun 23, 2016 at 10:38:58AM +0200, Oliver Neukum wrote: On Thu, 2016-06-23 at 11:23 +0300, Heikki Krogerus wrote: On Wed, Jun 22, 2016 at 06:44:18PM +0200, Oliver Neukum wrote: No it's not. DRP means a port that can operate

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

2016-06-23 Thread Heikki Krogerus
Hi Roger, I'll fix all the typos you mention below... On Thu, Jun 23, 2016 at 02:53:11PM +0300, Roger Quadros wrote: > Hi Heikki, > > On 21/06/16 17:51, Heikki Krogerus wrote: > > The purpose of USB Type-C connector class is to provide > > unified interface for the user space to get the status

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

2016-06-23 Thread Heikki Krogerus
On Thu, Jun 23, 2016 at 03:25:46PM +0300, Roger Quadros wrote: > Hi, > > On 23/06/16 15:00, Heikki Krogerus wrote: > > Hi Oliver, > > > > On Thu, Jun 23, 2016 at 10:38:58AM +0200, Oliver Neukum wrote: > >> On Thu, 2016-06-23 at 11:23 +0300, Heikki Krogerus wrote: > >>> On Wed, Jun 22, 2016 at

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

2016-06-23 Thread Roger Quadros
Hi, On 23/06/16 15:00, Heikki Krogerus wrote: > Hi Oliver, > > On Thu, Jun 23, 2016 at 10:38:58AM +0200, Oliver Neukum wrote: >> On Thu, 2016-06-23 at 11:23 +0300, Heikki Krogerus wrote: >>> On Wed, Jun 22, 2016 at 06:44:18PM +0200, Oliver Neukum wrote: >> >>> No it's not. DRP means a port that

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

2016-06-23 Thread Heikki Krogerus
Hi Oliver, On Thu, Jun 23, 2016 at 10:38:58AM +0200, Oliver Neukum wrote: > On Thu, 2016-06-23 at 11:23 +0300, Heikki Krogerus wrote: > > On Wed, Jun 22, 2016 at 06:44:18PM +0200, Oliver Neukum wrote: > > > No it's not. DRP means a port that can operate as _either_ Source > > (host) or Sink

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

2016-06-23 Thread Roger Quadros
Hi Heikki, On 21/06/16 17:51, 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 connectors on a system, > control over data role swapping, and when USB PD is s/PD/PD

[PATCH 04/16] sisusb: remove dummy variables

2016-06-23 Thread Jiri Slaby
bytes_written parameter of sisusb_copy_memory and sisusb_read_memory is an out parameter, but its value is never used. So remove it and pass a dummy variable down to sisusb_read_mem_bulk. Signed-off-by: Jiri Slaby Cc: Thomas Winischhofer Cc:

[PATCH 05/16] tty: vt, consw->con_scrolldelta cleanup

2016-06-23 Thread Jiri Slaby
* allow NULL consw->con_scrolldelta (some consoles define an empty hook) * => remove empty hooks now * return value of consw->con_scrolldelta is never checked => make the function void * document consw->con_scrolldelta a bit Signed-off-by: Jiri Slaby Cc: Thomas Winischhofer

[PATCH 06/16] tty: vt, consw->con_set_palette cleanup

2016-06-23 Thread Jiri Slaby
* allow NULL consw->con_set_palette (some consoles define an empty hook) * => remove empty hooks now * return value of consw->con_set_palette is never checked => make the function void * document consw->con_set_palette a bit Signed-off-by: Jiri Slaby Cc: Thomas Winischhofer

[PATCH 07/16] tty: vt, remove consw->con_bmove

2016-06-23 Thread Jiri Slaby
It is never called since commit 81732c3b2fede (tty vt: Fix line garbage in virtual console on command line edition) in 3.7. So remove all the callbacks. Signed-off-by: Jiri Slaby Cc: Thomas Winischhofer Cc: linux-usb@vger.kernel.org Cc: Jean-Christophe

[PATCH 14/16] tty: vt, convert more macros to functions

2016-06-23 Thread Jiri Slaby
Namely convert: * IS_FG -> con_is_fg * DO_UPDATE -> con_should_update * CON_IS_VISIBLE -> con_is_visible DO_UPDATE was a weird name for a yes/no answer, so the new name is con_should_update. Signed-off-by: Jiri Slaby Cc: Thomas Winischhofer Cc:

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

2016-06-23 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 v13 4/4] power: wm831x_power: Support USB charger current limit management

2016-06-23 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.

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

2016-06-23 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 v13 1/4] usb: gadget: Introduce the usb charger framework

2016-06-23 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 v13 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-06-23 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

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

2016-06-23 Thread Baolin Wang
Hi, On 21 June 2016 at 18:27, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> 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

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

2016-06-23 Thread Oliver Neukum
On Thu, 2016-06-23 at 11:23 +0300, Heikki Krogerus wrote: > On Wed, Jun 22, 2016 at 06:44:18PM +0200, Oliver Neukum wrote: > No it's not. DRP means a port that can operate as _either_ Source > (host) or Sink (device), but not at the same time.. Yes, but it is unclear what you will be after a

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

2016-06-23 Thread Heikki Krogerus
Hi, On Wed, Jun 22, 2016 at 02:54:28PM -0700, Guenter Roeck wrote: > Hi, > > > + > > +static void typec_remove_partner(struct typec_port *port) > > +{ > > + WARN_ON(port->partner->alt_modes); > > You are setting partner->alt_modes in typec_register_altmodes(), > but you don't clear it in

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

2016-06-23 Thread Heikki Krogerus
On Wed, Jun 22, 2016 at 06:44:18PM +0200, Oliver Neukum wrote: > On Wed, 2016-06-22 at 17:38 +0300, Heikki Krogerus wrote: > > On Wed, Jun 22, 2016 at 03:47:03PM +0200, Oliver Neukum wrote: > > > On Wed, 2016-06-22 at 14:44 +0300, Heikki Krogerus wrote: > > > > If our port is DRD (which would be

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

2016-06-23 Thread Yoshihiro Shimoda
Hi Roger-san, < snip > > commit 11c011a5e777c83819078a18672543f04482b3ec > Author: Srinivas Kandagatla > Date: Thu May 19 11:12:56 2016 +0100 > > usb: echi-hcd: Add ehci_setup check before echi_shutdown > > > > In