[PATCH v3 00/22] usb gadget update for OTG 2.0

2015-06-16 Thread Li Jun
Changes for v3: - For simple, add one more otg descriptor structure: usb_otg20_descriptor for OTG 2.0 and later release as Alan suggested. - Use disable flags for OTG features property. - Move out memory allocation from usb_otg_descriptor_init() to its caller. Changes for v2: - Use zero-lengt

[PATCH v3 08/22] usb: chipidea: update ci_otg_is_fsm_mode conditions

2015-06-16 Thread Li Jun
After introduce usb otg properties, update ci_otg_is_fsm_mode conditions to be depending on both usb hardware properties and usb driver config, also resolve a compile issue in debug.c after the API change. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci.h| 3 ++- drivers/usb/chipidea/debug

[PATCH v3 17/22] usb: gadget: mass_storage: init usb_otg_descriptor via usb_otg_descriptor_add

2015-06-16 Thread Li Jun
Use usb_otg_descriptor_add to allocate and initialize usb_otg_descriptor, free it while composite unbind. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/mass_storage.c | 34 ++-- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/drivers/usb/gadget/l

[PATCH v3 03/22] usb: add OTG feature options to gadget structure.

2015-06-16 Thread Li Jun
From: Macpaul Lin Add ADP, HNP and SRP feature options and otg version to gadget structure. Signed-off-by: Macpaul Lin Signed-off-by: Li Jun --- include/linux/usb/gadget.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h

Re: [PATCH v3 01/22] usb: add usb_otg20_descriptor for OTG 2.0 and above

2015-06-16 Thread Roger Quadros
On Tue, 16 Jun 2015 14:51:51 +0800 Li Jun wrote: > From: Macpaul Lin > > OTG 2.0 introduces bcdOTG in otg descriptor to identify the OTG and EH > supplement release number with which the OTG device is compliant, this > patch adds structure usb_otg20_descriptor for OTG 2.0 and above. > > Signe

Re: [PATCH v3 03/22] usb: add OTG feature options to gadget structure.

2015-06-16 Thread Roger Quadros
On Tue, 16 Jun 2015 14:51:53 +0800 Li Jun wrote: > From: Macpaul Lin > > Add ADP, HNP and SRP feature options and otg version to gadget structure. > > Signed-off-by: Macpaul Lin > Signed-off-by: Li Jun > --- > include/linux/usb/gadget.h | 11 +++ > 1 file changed, 11 insertions(+)

Re: [PATCH v3 04/22] usb: gadget: composite: add USB_DT_OTG request handling

2015-06-16 Thread Roger Quadros
On Tue, 16 Jun 2015 14:51:54 +0800 Li Jun wrote: > From: Macpaul Lin > > Copy usb_otg_descriptor from config's descriptor if host requests > USB_DT_OTG. > > Signed-off-by: Macpaul Lin > Signed-off-by: Li Jun Reviewed-by: Roger Quadros cheers, -roger > --- > drivers/usb/gadget/composite

Re: [PATCH v3 10/22] usb: gadget: configfs: init and add usb_otg_descriptor for usb configurations

2015-06-16 Thread Roger Quadros
On Tue, 16 Jun 2015 14:52:00 +0800 Li Jun wrote: > Use usb_otg_descriptor_add to allocate and initialize usb_otg_descriptor, > add it for each usb configurations, free it while composite unbind. > > Signed-off-by: Li Jun > --- > drivers/usb/gadget/configfs.c | 34 +

Re: [PATCH v3 09/22] usb: gadget: add usb_otg_descriptor_add interface to init usb_otg_descriptor

2015-06-16 Thread Roger Quadros
On Tue, 16 Jun 2015 14:51:59 +0800 Li Jun wrote: > Allocate usb_otg_descriptor and initialize it according to gadget otg > options, if none of options is not set, keep bmAttributes setting as > current gadget drivers, with this new interface, usb_otg_descriptor can > include bcdOTG if OTG 2.0 or

Re: [PATCH v3 03/22] usb: add OTG feature options to gadget structure.

2015-06-16 Thread Li Jun
On Tue, Jun 16, 2015 at 10:28:57AM +0300, Roger Quadros wrote: > > On Tue, 16 Jun 2015 14:51:53 +0800 > Li Jun wrote: > > > From: Macpaul Lin > > > > Add ADP, HNP and SRP feature options and otg version to gadget structure. > > > > Signed-off-by: Macpaul Lin > > Signed-off-by: Li Jun > > --

Re: [PATCH v3 10/22] usb: gadget: configfs: init and add usb_otg_descriptor for usb configurations

2015-06-16 Thread Li Jun
On Tue, Jun 16, 2015 at 10:58:27AM +0300, Roger Quadros wrote: > > On Tue, 16 Jun 2015 14:52:00 +0800 > Li Jun wrote: > > > Use usb_otg_descriptor_add to allocate and initialize usb_otg_descriptor, > > add it for each usb configurations, free it while composite unbind. > > > > Signed-off-by: Li

Re: [PATCH v3 09/22] usb: gadget: add usb_otg_descriptor_add interface to init usb_otg_descriptor

2015-06-16 Thread Li Jun
On Tue, Jun 16, 2015 at 11:01:58AM +0300, Roger Quadros wrote: > > On Tue, 16 Jun 2015 14:51:59 +0800 > Li Jun wrote: > > > Allocate usb_otg_descriptor and initialize it according to gadget otg > > options, if none of options is not set, keep bmAttributes setting as > > current gadget drivers, w

Re: [PATCH v3 05/22] doc: dt-binding: usb: add otg related properties

2015-06-16 Thread Roger Quadros
On Tue, 16 Jun 2015 14:51:55 +0800 Li Jun wrote: > Add otg version, srp, hnp and adp support for usb OTG port, then those OTG > features don't have to be decided by usb gadget drivers. > > Signed-off-by: Li Jun > --- > Documentation/devicetree/bindings/usb/generic.txt | 18 ++

Re: [PATCH v3 05/22] doc: dt-binding: usb: add otg related properties

2015-06-16 Thread Li Jun
On Tue, Jun 16, 2015 at 11:21:15AM +0300, Roger Quadros wrote: > > On Tue, 16 Jun 2015 14:51:55 +0800 > Li Jun wrote: > > > Add otg version, srp, hnp and adp support for usb OTG port, then those OTG > > features don't have to be decided by usb gadget drivers. > > > > Signed-off-by: Li Jun > >

Re: [PATCH v3 07/22] usb: chipidea: set usb gadeget's otg config

2015-06-16 Thread Roger Quadros
On Tue, 16 Jun 2015 14:51:57 +0800 Li Jun wrote: > Set gadget's otg features according to controller's capability and usb > property in device tree. > > Signed-off-by: Li Jun > --- > drivers/usb/chipidea/core.c | 18 ++ > drivers/usb/chipidea/udc.c | 20 +++-

Re: [BUG] usb/at91: usb hub does not work

2015-06-16 Thread Jiří Prchal
On 13.6.2015 13:13, Boris Brezillon wrote: On Sat, 13 Jun 2015 13:09:56 +0200 Boris Brezillon wrote: Hi Jiri, On Fri, 12 Jun 2015 11:30:20 +0200 Jiří Prchal wrote: On 11.6.2015 15:53, Alan Stern wrote: On Thu, 11 Jun 2015, Jiří Prchal wrote: Hi all, I discovered some bug when I chan

Re: [BUG] usb/at91: usb hub does not work

2015-06-16 Thread Boris Brezillon
Hi Jiri, On Tue, 16 Jun 2015 10:51:55 +0200 Jiří Prchal wrote: > > > On 13.6.2015 13:13, Boris Brezillon wrote: > > On Sat, 13 Jun 2015 13:09:56 +0200 > > Boris Brezillon wrote: > > > >> Hi Jiri, > >> > >> On Fri, 12 Jun 2015 11:30:20 +0200 > >> Jiří Prchal wrote: > >> > >>> > >>> > >>> On 1

Re: [ehci-orion] ETIMEOUT with ehci_setup()'s ehci_halt()

2015-06-16 Thread Valentin Longchamp
On 06/12/2015 01:37 PM, Valentin Longchamp wrote: > On 06/08/2015 01:46 PM, Valentin Longchamp wrote: >> On 06/06/2015 02:17 PM, Sebastian Hesselbarth wrote: >>> On 05.06.2015 17:19, Andrew Lunn wrote: On Fri, Jun 05, 2015 at 04:34:54PM +0200, Valentin Longchamp wrote: > I am currently bri

Re: [PATCH] usb: dwc3: pci: make better use of gpiod API

2015-06-16 Thread Linus Walleij
On Fri, Jun 12, 2015 at 9:10 AM, Uwe Kleine-König wrote: > Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) > which appeared in v3.17-rc1, the gpiod_get* functions take an additional > parameter that allows to specify direction and initial value for output. > > Furthermore

Re: [PATCH v3 07/22] usb: chipidea: set usb gadeget's otg config

2015-06-16 Thread Li Jun
On Tue, Jun 16, 2015 at 11:44:52AM +0300, Roger Quadros wrote: > > On Tue, 16 Jun 2015 14:51:57 +0800 > Li Jun wrote: > > > Set gadget's otg features according to controller's capability and usb > > property in device tree. > > > > Signed-off-by: Li Jun > > --- > > drivers/usb/chipidea/core.c

[linux-usb] how to pass parameters to mass storage kernel module for best host compatibility

2015-06-16 Thread Xuebing Wang
Hi Alan and community, I am using mass storage kernel module of v4.0.1 for Freescale i.MX6SL for a commercial product. As this is commercial product, thus USB host compatibility is important. 1) It seems that Windows 7 host can *not* auto-mount if I pass parameters as below: modprobe g_mass

Re: TRIM/DISCARD for usb drives?

2015-06-16 Thread Tom Yan
Actually as of the current kernel, uas support/driver is a prerequisite of TRIM, because skip_vdp_page in scsiglue.c prevent sd_read_block_limits(), which configure various values necessary for blkdev_issue_discard() (and other filesystem-specific discard functions/ioctls) through sd_config_discard

Re: [linux-usb] how to pass parameters to mass storage kernel module for best host compatibility

2015-06-16 Thread Alan Stern
On Tue, 16 Jun 2015, Xuebing Wang wrote: > Hi Alan and community, > > I am using mass storage kernel module of v4.0.1 for Freescale i.MX6SL > for a commercial product. As this is commercial product, thus USB host > compatibility is important. > > 1) It seems that Windows 7 host can *not* auto-

[Patch V3 1/3] usb: Add Xen pvUSB protocol description

2015-06-16 Thread Juergen Gross
Add the definition of pvUSB protocol used between the pvUSB frontend in a Xen domU and the pvUSB backend in a Xen driver domain (usually Dom0). This header was originally provided by Fujitsu for Xen based on Linux 2.6.18. Changes are: - adapt to Linux style guide Signed-off-by: Juergen Gross --

[Patch V3 0/3] xen, usb: support pvUSB frontend driver

2015-06-16 Thread Juergen Gross
This series adds XEN guest pvUSB support. With pvUSB it is possible to use physical USB devices from a XEN domain. The support consists of a frontend in form of a virtual hcd driver in the unprivileged domU passing I/O-requests to the backend in a driver domain (usually Dom0). The backend is not p

[Patch V3 2/3] usb: Introduce Xen pvUSB frontend (xen hcd)

2015-06-16 Thread Juergen Gross
Introduces the Xen pvUSB frontend. With pvUSB it is possible for a Xen domU to communicate with a USB device assigned to that domU. The communication is all done via the pvUSB backend in a driver domain (usually Dom0) which is owner of the physical device. The pvUSB frontend is a USB hcd for a vir

[Patch V3 3/3] xen: add Xen pvUSB maintainer

2015-06-16 Thread Juergen Gross
Add myself as maintainer for the Xen pvUSB stuff. Signed-off-by: Juergen Gross Acked-by: Konrad Rzeszutek Wilk --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d8afd29..8ef4e83 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10965,6 +109

Re: [Patch V3 2/3] usb: Introduce Xen pvUSB frontend (xen hcd)

2015-06-16 Thread Greg KH
On Tue, Jun 16, 2015 at 04:32:34PM +0200, Juergen Gross wrote: > Introduces the Xen pvUSB frontend. With pvUSB it is possible for a Xen > domU to communicate with a USB device assigned to that domU. The > communication is all done via the pvUSB backend in a driver domain > (usually Dom0) which is o

Re: [Patch V3 2/3] usb: Introduce Xen pvUSB frontend (xen hcd)

2015-06-16 Thread Juergen Gross
On 06/16/2015 04:45 PM, Greg KH wrote: On Tue, Jun 16, 2015 at 04:32:34PM +0200, Juergen Gross wrote: Introduces the Xen pvUSB frontend. With pvUSB it is possible for a Xen domU to communicate with a USB device assigned to that domU. The communication is all done via the pvUSB backend in a drive

Re: [Patch V3 2/3] usb: Introduce Xen pvUSB frontend (xen hcd)

2015-06-16 Thread Greg KH
On Tue, Jun 16, 2015 at 04:56:35PM +0200, Juergen Gross wrote: > Hmm, I'm beginning to question the value of that file. May be I should > just throw it away. Given that you are going to have to justify every one of them, and ensure that you are creating them in a race-free manner (I didn't look to

Re: [Patch V3 2/3] usb: Introduce Xen pvUSB frontend (xen hcd)

2015-06-16 Thread David Vrabel
On 16/06/15 15:56, Juergen Gross wrote: > > Hmm, I'm beginning to question the value of that file. May be I should > just throw it away. > > Thanks for the quick feedback. You could move it to debugfs, but if it's not useful better to get rid of it. David -- To unsubscribe from this list: send

[PATCH] usb: fix coding style issue

2015-06-16 Thread Kris Borer
Fixed coding style issue: newline after declaration Signed-off-by: Kris Borer --- drivers/usb/core/driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 818369a..6b5063e 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/co

[PATCH] usbcore: add sysfs support to xHCI usb3 hardware LPM

2015-06-16 Thread Kevin Strasser
Add a sysfs node to make it easier to verify if LPM is supported and being enabled for USB 3.0 devices. Signed-off-by: Kevin Strasser --- Documentation/ABI/testing/sysfs-bus-usb | 14 ++ Documentation/usb/power-management.txt | 15 +-- drivers/usb/core/hub.c

Re: [PATCH v2 0/5] usb: Add usb interface authorization

2015-06-16 Thread Stefan Koch
Am Samstag, den 13.06.2015, 10:55 -0400 schrieb Alan Stern: > On Fri, 12 Jun 2015, Stefan Koch wrote: > > > Am Freitag, den 12.06.2015, 16:34 -0400 schrieb Alan Stern: > > > On Fri, 12 Jun 2015, Stefan Koch wrote: > > > > > > > Am Freitag, den 12.06.2015, 14:09 -0400 schrieb Alan Stern: > > > > >

[PATCH] usb: xhci: make USB_XHCI_PLATFORM selectable

2015-06-16 Thread Rafał Miłecki
Right now xhci-plat-hcd can be built when using one of platform specific drivers only (mvebu/rcar). There shouldn't be such limitation as some platforms may not require any quirks and may want to just use a generic driver ("generic-xhci" / "xhci-hcd"). Signed-off-by: Rafał Miłecki --- Greg/Mathia

Re: optimal io size / custom alignment

2015-06-16 Thread Tom Yan
On 17 June 2015 at 01:08, Martin K. Petersen wrote: > The two values have nothing to do with each other. They just happen to > be the same in your case (65535 is the maximum block count for the WRITE > SAME(10) command). > > Your device sets the transfer length granularity to 1 logical block and >

Re: [PATCH v2 0/5] usb: Add usb interface authorization

2015-06-16 Thread Alan Stern
On Tue, 16 Jun 2015, Stefan Koch wrote: > > And call the attribute "authorize", not "interface_authorize". It will > > be obvious that the attribute applies to the interface, because the > > attribute file will be inside the interface's sysfs directory. > How do you solve the problem that the dev

Re: [PATCH] usb: xhci: make USB_XHCI_PLATFORM selectable

2015-06-16 Thread Sergei Shtylyov
Hello. On 06/16/2015 10:18 PM, Rafał Miłecki wrote: Right now xhci-plat-hcd can be built when using one of platform specific drivers only (mvebu/rcar). There shouldn't be such limitation as some platforms may not require any quirks and may want to just use a generic driver ("generic-xhci" / "xh

[PATCH V2] usb: xhci: make USB_XHCI_PLATFORM selectable

2015-06-16 Thread Rafał Miłecki
Right now xhci-plat-hcd can be built when using one of platform specific drivers only (mvebu/rcar). There shouldn't be such limitation as some platforms may not require any quirks and may want to just use a generic driver ("generic-xhci" / "xhci-hcd"). Signed-off-by: Rafał Miłecki --- Greg/Mathia

Re: [PATCH] usb: xhci: make USB_XHCI_PLATFORM selectable

2015-06-16 Thread Greg Kroah-Hartman
On Tue, Jun 16, 2015 at 09:18:05PM +0200, Rafał Miłecki wrote: > Right now xhci-plat-hcd can be built when using one of platform specific > drivers only (mvebu/rcar). There shouldn't be such limitation as some > platforms may not require any quirks and may want to just use a generic > driver ("gene

Re: [PATCH] usb: xhci: make USB_XHCI_PLATFORM selectable

2015-06-16 Thread Rafał Miłecki
On 16 June 2015 at 21:56, Greg Kroah-Hartman wrote: > On Tue, Jun 16, 2015 at 09:18:05PM +0200, Rafał Miłecki wrote: >> Right now xhci-plat-hcd can be built when using one of platform specific >> drivers only (mvebu/rcar). There shouldn't be such limitation as some >> platforms may not require any

Re: [PATCH v2 0/5] usb: Add usb interface authorization

2015-06-16 Thread Stefan Koch
Am Dienstag, den 16.06.2015, 15:26 -0400 schrieb Alan Stern: > On Tue, 16 Jun 2015, Stefan Koch wrote: > > > > And call the attribute "authorize", not "interface_authorize". It will > > > be obvious that the attribute applies to the interface, because the > > > attribute file will be inside the i

Re: optimal io size / custom alignment

2015-06-16 Thread Martin K. Petersen
> "Tom" == Tom Yan writes: Tom> All drives I have are flash drives so none of them reports 4k Tom> physical sectors. There are plenty of SSDs that report 4K physical sectors, fwiw. Tom> The usb-storage driver does not read vpd so it won't be a thing, Tom> but the the uas driver does. We ga

Re: [linux-usb] how to pass parameters to mass storage kernel module for best host compatibility

2015-06-16 Thread Xuebing Wang
On 06/16/2015 10:32 PM, Alan Stern wrote: On Tue, 16 Jun 2015, Xuebing Wang wrote: Hi Alan and community, I am using mass storage kernel module of v4.0.1 for Freescale i.MX6SL for a commercial product. As this is commercial product, thus USB host compatibility is important. 1) It seems that

Re: [linux-usb] how to pass parameters to mass storage kernel module for best host compatibility

2015-06-16 Thread Felipe Balbi
On Wed, Jun 17, 2015 at 07:33:37AM +0800, Xuebing Wang wrote: > > On 06/16/2015 10:32 PM, Alan Stern wrote: > >On Tue, 16 Jun 2015, Xuebing Wang wrote: > > > >>Hi Alan and community, > >> > >>I am using mass storage kernel module of v4.0.1 for Freescale i.MX6SL > >>for a commercial product. As thi

Re: [linux-usb] how to pass parameters to mass storage kernel module for best host compatibility

2015-06-16 Thread Xuebing Wang
On 06/17/2015 10:19 AM, Felipe Balbi wrote: On Wed, Jun 17, 2015 at 07:33:37AM +0800, Xuebing Wang wrote: On 06/16/2015 10:32 PM, Alan Stern wrote: On Tue, 16 Jun 2015, Xuebing Wang wrote: Hi Alan and community, I am using mass storage kernel module of v4.0.1 for Freescale i.MX6SL for a com

ax88179_178a: ethernet to usb dongle disconnect crash

2015-06-16 Thread Vivek Bhagat
Hi All, I have connected my pc and TV board as below - PC (network i/f) <> ethernet to usb dongle <---> usb port of TV board When I power off my board, i get a kernel crash. Please have a look at log attached here.I debug and found that unregister_netdev() in usbnet_disconnect() clears net_

Re: [linux-usb] how to pass parameters to mass storage kernel module for best host compatibility

2015-06-16 Thread Felipe Balbi
On Wed, Jun 17, 2015 at 10:28:26AM +0800, Xuebing Wang wrote: > > On 06/17/2015 10:19 AM, Felipe Balbi wrote: > >On Wed, Jun 17, 2015 at 07:33:37AM +0800, Xuebing Wang wrote: > >>On 06/16/2015 10:32 PM, Alan Stern wrote: > >>>On Tue, 16 Jun 2015, Xuebing Wang wrote: > >>> > Hi Alan and communi

[PATCH v4 02/23] usb: add USB_OTG_ADP definition

2015-06-16 Thread Li Jun
From: Macpaul Lin Add USB_OTG_ADP definition for usb_otg_descriptor.bmAttributes. Signed-off-by: Macpaul Lin Signed-off-by: Li Jun Acked-by: Peter Chen --- include/uapi/linux/usb/ch9.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/c

[PATCH v4 04/23] usb: add usb_otg_caps to usb_gadget structure.

2015-06-16 Thread Li Jun
From: Macpaul Lin Add usb_otg_caps pointer to usb_gadget structure to indicate its otg capabilities. Signed-off-by: Macpaul Lin Signed-off-by: Li Jun --- include/linux/usb/gadget.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h in

[PATCH v4 11/23] usb: gadget: configfs: allocate and init otg descriptor by otg capabilities

2015-06-16 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/configfs.c | 29 +

[PATCH v4 09/23] usb: chipidea: update ci_otg_is_fsm_mode conditions

2015-06-16 Thread Li Jun
After introduce usb otg properties, update ci_otg_is_fsm_mode conditions to be depending on both usb hardware properties and usb driver config, also resolve a compile issue in debug.c after the API change. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci.h| 5 - drivers/usb/chipidea/deb

[PATCH v4 03/23] usb: otg: add usb_otg_caps structure for otg capabilities

2015-06-16 Thread Li Jun
This patch adds a structure usb_otg_caps to cover all otg related capabilities of the device, including otg revision, and if hnp/srp/adp is supported. Signed-off-by: Li Jun --- include/linux/usb/otg.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/linux/usb/otg.h b/

[PATCH v4 12/23] usb: gadget: ether: allocate and init otg descriptor by otg capabilities

2015-06-16 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/ether.c | 38 +

[PATCH v4 07/23] usb: common: add API to get usb otg features from device tree

2015-06-16 Thread Li Jun
Check property of usb hardware to get otg version and if SRP, HNP and ADP are supported. Signed-off-by: Li Jun --- drivers/usb/common/common.c | 29 + include/linux/usb/of.h | 7 +++ 2 files changed, 36 insertions(+) diff --git a/drivers/usb/common/common.c

[PATCH v4 06/23] doc: dt-binding: usb: add otg related properties

2015-06-16 Thread Li Jun
Add otg version, srp, hnp and adp support for usb OTG port, then those OTG features don't have to be decided by usb gadget drivers. Signed-off-by: Li Jun --- Documentation/devicetree/bindings/usb/generic.txt | 15 +++ 1 file changed, 15 insertions(+) diff --git a/Documentation/devic

[PATCH v4 01/23] usb: add usb_otg20_descriptor for OTG 2.0 and above

2015-06-16 Thread Li Jun
From: Macpaul Lin OTG 2.0 introduces bcdOTG in otg descriptor to identify the OTG and EH supplement release number with which the OTG device is compliant, this patch adds structure usb_otg20_descriptor for OTG 2.0 and above. Signed-off-by: Macpaul Lin Signed-off-by: Li Jun Reviewed-by: Roger Q

[PATCH v4 08/23] usb: chipidea: set usb gadeget's otg capabilities

2015-06-16 Thread Li Jun
Set gadget's otg capabilities according to controller's capability and otg properties in device tree. Signed-off-by: Li Jun --- drivers/usb/chipidea/core.c | 3 +++ drivers/usb/chipidea/udc.c | 7 ++- include/linux/usb/chipidea.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) di

[PATCH v4 05/23] usb: gadget: composite: add USB_DT_OTG request handling

2015-06-16 Thread Li Jun
From: Macpaul Lin Copy usb_otg_descriptor from config's descriptor if host requests USB_DT_OTG. Signed-off-by: Macpaul Lin Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/composite.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/driv

[PATCH v4 10/23] usb: gadget: add usb otg descriptor allocate and init interface

2015-06-16 Thread Li Jun
Allocate usb otg descriptor and initialize it according to gadget's otg capabilities, if usb_otg_caps is not set, keep settings as current gadget drivers. With this 2 new interfaces, gadget can use usb_otg_descriptor for OTG 1.x, and usb_otg20_descriptor for OTG 2.0 or above, and otg features can b

[PATCH v4 00/23] usb gadget update for OTG 2.0

2015-06-16 Thread Li Jun
Changes for v4: - Add usb_otg_caps structure for all otg related capability attributes. - Use one interface: of_usb_get_otg_caps to get all otg capabilities from DT, including otg_rev, hnp/srp/adp support. - Add usb_otg_descriptor_alloc interface to allocate otg descriptor for better code shari

[PATCH v4 16/23] usb: gadget: g_ffs: allocate and init otg descriptor by otg capabilities

2015-06-16 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/g_ffs.c | 29 +

[PATCH v4 14/23] usb: gadget: audio: allocate and init otg descriptor by otg capabilities

2015-06-16 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/audio.c | 28 +

[PATCH v4 15/23] usb: gadget: cdc2: allocate and init otg descriptor by otg capabilities

2015-06-16 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/cdc2.c | 29 ++

[PATCH v4 13/23] usb: gadget: acm_ms: allocate and init otg descriptor by otg capabilities

2015-06-16 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/acm_ms.c | 29

[PATCH v4 18/23] usb: gadget: mass_storage: allocate and init otg descriptor by otg capabilities

2015-06-16 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/mass_storage.c | 29 ++

[PATCH v4 21/23] usb: gadget: printer: allocate and init otg descriptor by otg capabilities

2015-06-16 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/printer.c | 25 +++

[PATCH v4 23/23] usb: gadget: zero: allocate and init otg descriptor by otg capabilities

2015-06-16 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/zero.c | 32 ++

[PATCH v4 22/23] usb: gadget: serial: allocate and init otg descriptor by otg capabilities

2015-06-16 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/serial.c | 29

[PATCH v4 20/23] usb: gadget: ncm: allocate and init otg descriptor by otg capabilities

2015-06-16 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/ncm.c | 28 ++-

[PATCH v4 17/23] usb: gadget: hid: allocate and init otg descriptor by otg capabilities

2015-06-16 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/hid.c | 30 +++

[PATCH v4 19/23] usb: gadget: multi: allocate and init otg descriptor by otg capabilities

2015-06-16 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while composite unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/multi.c | 39 +