[PATCH v3 11/22] usb: gadget: ether: 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 jun...@freescale.com --- drivers/usb/gadget/legacy/ether.c | 48 +++ 1 file changed, 34 insertions(+), 14 deletions(-) diff --git

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

2015-06-16 Thread Li Jun
of usb hardware property and driver config. Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/gadget/config.c | 39 +++ include/linux/usb/gadget.h | 2 ++ 2 files changed, 41 insertions(+) diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget

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

2015-06-16 Thread Li Jun
From: Macpaul Lin macp...@gmail.com Copy usb_otg_descriptor from config's descriptor if host requests USB_DT_OTG. Signed-off-by: Macpaul Lin macp...@gmail.com Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/gadget/composite.c | 25 + 1 file changed, 25

[PATCH v3 05/22] 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 jun...@freescale.com --- Documentation/devicetree/bindings/usb/generic.txt | 18 ++ 1 file changed, 18 insertions(+) diff

[PATCH v3 22/22] usb: gadget: zero: 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 jun...@freescale.com --- drivers/usb/gadget/legacy/zero.c | 37 +++-- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git

[PATCH v3 19/22] usb: gadget: ncm: 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 jun...@freescale.com --- drivers/usb/gadget/legacy/ncm.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/drivers

[PATCH v3 15/22] usb: gadget: g_ffs: 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 jun...@freescale.com --- drivers/usb/gadget/legacy/g_ffs.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git

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

2015-06-16 Thread Li Jun
-off-by: Li Jun jun...@freescale.com --- include/uapi/linux/usb/ch9.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index aa33fd1..aec6899 100644 --- a/include/uapi/linux/usb/ch9.h +++ b/include/uapi/linux/usb/ch9.h

[PATCH v3 02/22] usb: add USB_OTG_ADP definition

2015-06-16 Thread Li Jun
From: Macpaul Lin macp...@gmail.com Add USB_OTG_ADP definition for usb_otg_descriptor.bmAttributes. Signed-off-by: Macpaul Lin macp...@gmail.com Signed-off-by: Li Jun jun...@freescale.com Acked-by: Peter Chen peter.c...@freescale.com --- include/uapi/linux/usb/ch9.h | 1 + 1 file changed, 1

[PATCH v3 06/22] 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 jun...@freescale.com --- drivers/usb/common/common.c | 64 + include/linux/usb/of.h | 20 ++ 2 files changed, 84 insertions

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

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

[PATCH v3 14/22] usb: gadget: cdc2: 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 jun...@freescale.com --- drivers/usb/gadget/legacy/cdc2.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git

[PATCH v3 20/22] usb: gadget: printer: 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 jun...@freescale.com --- drivers/usb/gadget/legacy/printer.c | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git

[PATCH v3 16/22] usb: gadget: hid: 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 jun...@freescale.com --- drivers/usb/gadget/legacy/hid.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git

[PATCH v3 18/22] usb: gadget: multi: 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 jun...@freescale.com --- drivers/usb/gadget/legacy/multi.c | 49 +++ 1 file changed, 34 insertions(+), 15 deletions(-) diff --git

[PATCH v3 13/22] usb: gadget: audio: 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 jun...@freescale.com --- drivers/usb/gadget/legacy/audio.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git

[PATCH v3 21/22] usb: gadget: serial: 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 jun...@freescale.com --- drivers/usb/gadget/legacy/serial.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git

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

2015-06-16 Thread Li Jun
according to otg options in each gadget driver. Li Jun (18): doc: dt-binding: usb: add otg related properties usb: common: add API to get usb otg features from device tree usb: chipidea: set usb gadeget's otg config usb: chipidea: update ci_otg_is_fsm_mode conditions usb: gadget: add

[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 jun...@freescale.com --- drivers/usb/chipidea/ci.h| 3

[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 jun...@freescale.com --- drivers/usb/gadget/legacy/mass_storage.c | 34 ++-- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git

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 jun...@freescale.com 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

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 jun...@freescale.com 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

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 jun...@freescale.com 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

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 jun...@freescale.com wrote: From: Macpaul Lin macp...@gmail.com Add ADP, HNP and SRP feature options and otg version to gadget structure. Signed-off-by: Macpaul Lin macp

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 jun...@freescale.com wrote: Set gadget's otg features according to controller's capability and usb property in device tree. Signed-off-by: Li Jun jun...@freescale.com

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

2015-06-15 Thread Li Jun
On Mon, Jun 15, 2015 at 03:25:48PM +0300, Sergei Shtylyov wrote: Hello. On 6/15/2015 10:41 AM, Li Jun wrote: [...] Regarding use of xyz-disable flags: After more thinking this, I just realize that we can use otg-rev property to handle the case of none of xyz-disable properties passed

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

2015-06-15 Thread Li Jun
On Fri, Jun 12, 2015 at 11:31:02AM +0300, Roger Quadros wrote: On Fri, 12 Jun 2015 11:09:17 +0800 Li Jun b47...@freescale.com wrote: [...] Other than those new flags, I have not found other good way to judge whether some platform is a legacy one. Directly use dt property? Then above

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

2015-06-15 Thread Li Jun
enable SRP/HNP). So: 1) new platform with full otg feature support: dr_mode = otg; otg-rev = 0x0200; 2) legacy platform dr_mode = otg Then I think we are okay to use disable flags. thanks Li Jun -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord

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

2015-06-12 Thread Li Jun
On Fri, Jun 12, 2015 at 11:41:40AM +0300, Roger Quadros wrote: On Fri, 12 Jun 2015 16:23:59 +0800 Li Jun b47...@freescale.com wrote: On Fri, Jun 12, 2015 at 11:02:13AM +0300, Roger Quadros wrote: On Fri, 12 Jun 2015 09:42:04 +0800 Li Jun b47...@freescale.com wrote

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

2015-06-12 Thread Li Jun
On Fri, Jun 12, 2015 at 11:02:13AM +0300, Roger Quadros wrote: On Fri, 12 Jun 2015 09:42:04 +0800 Li Jun b47...@freescale.com wrote: On Thu, Jun 11, 2015 at 05:55:57PM +0300, Roger Quadros wrote: drivers/usb/core/hub.c static int usb_enumerate_device_otg(struct usb_device

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

2015-06-11 Thread Li Jun
On Thu, Jun 11, 2015 at 10:30:35AM +0300, Roger Quadros wrote: On Wed, 10 Jun 2015 20:06:25 +0800 Li Jun b47...@freescale.com wrote: On Tue, Jun 09, 2015 at 11:29:31PM +0800, Roger Quadros wrote: Rob, On Tue, 9 Jun 2015 08:26:20 -0500 Rob Herring robherri...@gmail.com wrote

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

2015-06-11 Thread Li Jun
On Thu, Jun 11, 2015 at 03:37:03PM +0300, Roger Quadros wrote: On Thu, 11 Jun 2015 16:20:13 +0800 Li Jun b47...@freescale.com wrote: On Thu, Jun 11, 2015 at 10:18:53AM +0300, Roger Quadros wrote: On Wed, 10 Jun 2015 21:47:51 +0800 Li Jun b47...@freescale.com wrote: On Wed

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

2015-06-11 Thread Li Jun
On Thu, Jun 11, 2015 at 03:51:02PM +0300, Roger Quadros wrote: On Thu, 11 Jun 2015 16:38:52 +0800 Li Jun b47...@freescale.com wrote: On Thu, Jun 11, 2015 at 10:30:35AM +0300, Roger Quadros wrote: On Wed, 10 Jun 2015 20:06:25 +0800 Li Jun b47...@freescale.com wrote: On Tue

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

2015-06-11 Thread Li Jun
On Thu, Jun 11, 2015 at 05:52:15PM +0300, Roger Quadros wrote: On Thu, 11 Jun 2015 22:11:22 +0800 Li Jun b47...@freescale.com wrote: On Thu, Jun 11, 2015 at 03:37:03PM +0300, Roger Quadros wrote: On Thu, 11 Jun 2015 16:20:13 +0800 Li Jun b47...@freescale.com wrote: On Thu

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

2015-06-11 Thread Li Jun
On Thu, Jun 11, 2015 at 05:55:57PM +0300, Roger Quadros wrote: drivers/usb/core/hub.c static int usb_enumerate_device_otg(struct usb_device *udev) { int err = 0; #ifdefCONFIG_USB_OTG /* * OTG-aware devices on OTG-capable root hubs may be able to use SRP,

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

2015-06-11 Thread Li Jun
On Thu, Jun 11, 2015 at 10:18:53AM +0300, Roger Quadros wrote: On Wed, 10 Jun 2015 21:47:51 +0800 Li Jun b47...@freescale.com wrote: On Wed, Jun 10, 2015 at 03:37:37PM +0800, Roger Quadros wrote: On Tue, 9 Jun 2015 11:33:11 -0500 Rob Herring robherri...@gmail.com wrote

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

2015-06-10 Thread Li Jun
On Tue, Jun 09, 2015 at 09:26:20PM +0800, Rob Herring wrote: On Mon, Jun 8, 2015 at 8:18 PM, Li Jun b47...@freescale.com wrote: On Mon, Jun 08, 2015 at 11:06:49AM -0500, Rob Herring wrote: On Mon, Jun 8, 2015 at 10:02 AM, Li Jun jun...@freescale.com wrote: Add otg version, srp, hnp and adp

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

2015-06-10 Thread Li Jun
On Tue, Jun 09, 2015 at 11:29:31PM +0800, Roger Quadros wrote: Rob, On Tue, 9 Jun 2015 08:26:20 -0500 Rob Herring robherri...@gmail.com wrote: On Mon, Jun 8, 2015 at 8:18 PM, Li Jun b47...@freescale.com wrote: On Mon, Jun 08, 2015 at 11:06:49AM -0500, Rob Herring wrote: On Mon, Jun

Re: [PATCH v2 01/22] usb: add OTG version number in usb_otg_descriptor

2015-06-10 Thread Li Jun
On Tue, Jun 09, 2015 at 10:16:23AM -0400, Alan Stern wrote: On Tue, 9 Jun 2015, Li Jun wrote: -/* USB_DT_OTG (from OTG 1.0a supplement) */ +/* USB_DT_OTG */ struct usb_otg_descriptor { __u8 bLength; __u8 bDescriptorType; __u8

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

2015-06-10 Thread Li Jun
wrote: On Mon, Jun 8, 2015 at 8:18 PM, Li Jun b47...@freescale.com wrote: On Mon, Jun 08, 2015 at 11:06:49AM -0500, Rob Herring wrote: On Mon, Jun 8, 2015 at 10:02 AM, Li Jun jun...@freescale.com wrote: Add otg version, srp, hnp and adp support for usb OTG port, then those

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

2015-06-10 Thread Li Jun
On Tue, Jun 09, 2015 at 09:27:51PM +0800, Roger Quadros wrote: On Mon, 8 Jun 2015 23:02:04 +0800 Li Jun jun...@freescale.com 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

Re: [PATCH v2 06/22] usb: common: add API to get usb otg features from device tree

2015-06-09 Thread Li Jun
On Tue, Jun 09, 2015 at 03:55:29PM +0300, Roger Quadros wrote: Hi, On Mon, 8 Jun 2015 23:02:01 +0800 Li Jun jun...@freescale.com wrote: Check property of usb hardware to get otg version and if SRP, HNP and ADP are supported. Signed-off-by: Li Jun jun...@freescale.com

Re: [PATCH v2 01/22] usb: add OTG version number in usb_otg_descriptor

2015-06-09 Thread Li Jun
On Tue, Jun 09, 2015 at 03:56:44PM +0300, Roger Quadros wrote: On Mon, 8 Jun 2015 23:01:56 +0800 Li Jun jun...@freescale.com wrote: From: Macpaul Lin macp...@gmail.com OTG 2.0 introduces bcdOTG to identify the OTG and EH supplement release number with which the OTG device

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

2015-06-09 Thread Li Jun
On Tue, Jun 09, 2015 at 03:27:29PM +0300, Roger Quadros wrote: Hi, On Mon, 8 Jun 2015 23:01:59 +0800 Li Jun jun...@freescale.com wrote: From: Macpaul Lin macp...@gmail.com Copy usb_otg_descriptor from config's descriptor if host requests USB_DT_OTG. Signed-off-by: Macpaul Lin

Re: [PATCH v2 06/22] usb: common: add API to get usb otg features from device tree

2015-06-09 Thread Li Jun
On Tue, Jun 09, 2015 at 03:55:29PM +0300, Roger Quadros wrote: Hi, On Mon, 8 Jun 2015 23:02:01 +0800 Li Jun jun...@freescale.com wrote: Check property of usb hardware to get otg version and if SRP, HNP and ADP are supported. Signed-off-by: Li Jun jun...@freescale.com

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

2015-06-08 Thread Li Jun
On Mon, Jun 08, 2015 at 11:06:49AM -0500, Rob Herring wrote: On Mon, Jun 8, 2015 at 10:02 AM, Li Jun jun...@freescale.com 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 jun

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

2015-06-08 Thread Li Jun
mechanism. 4. Init usb_otg_descriptor according to otg options in each gadget driver. Li Jun (18): doc: dt-binding: usb: add otg related properties usb: common: add API to get usb otg features from device tree usb: chipidea: udc: set usb gadeget's otg config usb: chipidea: update

[PATCH v2 01/22] usb: add OTG version number in usb_otg_descriptor

2015-06-08 Thread Li Jun
From: Macpaul Lin macp...@gmail.com OTG 2.0 introduces bcdOTG to identify the OTG and EH supplement release number with which the OTG device is compliant, so adds it for usb_otg_descriptor. Signed-off-by: Macpaul Lin macp...@gmail.com Signed-off-by: Li Jun jun...@freescale.com --- include/uapi

[PATCH v2 20/22] usb: gadget: printer: init usb_otg_descriptor via usb_otg_descriptor_add

2015-06-08 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 jun...@freescale.com --- drivers/usb/gadget/legacy/printer.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/usb

[PATCH v2 16/22] usb: gadget: hid: init usb_otg_descriptor via usb_otg_descriptor_add

2015-06-08 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 jun...@freescale.com --- drivers/usb/gadget/legacy/hid.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/drivers/usb

[PATCH v2 19/22] usb: gadget: ncm: init usb_otg_descriptor via usb_otg_descriptor_add

2015-06-08 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 jun...@freescale.com --- drivers/usb/gadget/legacy/ncm.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/usb

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

2015-06-08 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 jun...@freescale.com --- drivers/usb/gadget/legacy/mass_storage.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git

[PATCH v2 21/22] usb: gadget: serial: init usb_otg_descriptor via usb_otg_descriptor_add

2015-06-08 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 jun...@freescale.com --- drivers/usb/gadget/legacy/serial.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/usb

[PATCH v2 22/22] usb: gadget: zero: init usb_otg_descriptor via usb_otg_descriptor_add

2015-06-08 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 jun...@freescale.com --- drivers/usb/gadget/legacy/zero.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/usb

[PATCH v2 18/22] usb: gadget: multi: init usb_otg_descriptor via usb_otg_descriptor_add

2015-06-08 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 jun...@freescale.com --- drivers/usb/gadget/legacy/multi.c | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git

[PATCH v2 02/22] usb: add USB_OTG_ADP definition

2015-06-08 Thread Li Jun
From: Macpaul Lin macp...@gmail.com Add USB_OTG_ADP definition for usb_otg_descriptor.bmAttributes. Signed-off-by: Macpaul Lin macp...@gmail.com Signed-off-by: Li Jun jun...@freescale.com Acked-by: Peter Chen peter.c...@freescale.com --- include/uapi/linux/usb/ch9.h | 1 + 1 file changed, 1

[PATCH v2 06/22] usb: common: add API to get usb otg features from device tree

2015-06-08 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 jun...@freescale.com --- drivers/usb/common/common.c | 64 + include/linux/usb/of.h | 20 ++ 2 files changed, 84 insertions

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

2015-06-08 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 jun...@freescale.com --- Documentation/devicetree/bindings/usb/generic.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH v2 07/22] usb: chipidea: udc: set usb gadeget's otg config

2015-06-08 Thread Li Jun
Set gadget's otg features according to controller's capability and usb property in device tree. Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/chipidea/core.c | 16 drivers/usb/chipidea/udc.c | 20 +++- include/linux/usb/chipidea.h | 4 3

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

2015-06-08 Thread Li Jun
From: Macpaul Lin macp...@gmail.com Copy usb_otg_descriptor from config's descriptor if host requests USB_DT_OTG. Signed-off-by: Macpaul Lin macp...@gmail.com Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/gadget/composite.c | 21 + 1 file changed, 21 insertions

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

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

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

2015-06-08 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 jun...@freescale.com --- drivers/usb/chipidea/ci.h| 3

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

2015-06-08 Thread Li Jun
of usb hardware property and driver config. Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/gadget/config.c | 37 + include/linux/usb/gadget.h | 1 + 2 files changed, 38 insertions(+) diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget

[PATCH v2 11/22] usb: gadget: ether: init usb_otg_descriptor via usb_otg_descriptor_add

2015-06-08 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 jun...@freescale.com --- drivers/usb/gadget/legacy/ether.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git

[PATCH v2 12/22] usb: gadget: acm_ms: init usb_otg_descriptor via usb_otg_descriptor_add

2015-06-08 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 jun...@freescale.com --- drivers/usb/gadget/legacy/acm_ms.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/drivers/usb

[PATCH v2 14/22] usb: gadget: cdc2: init usb_otg_descriptor via usb_otg_descriptor_add

2015-06-08 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 jun...@freescale.com --- drivers/usb/gadget/legacy/cdc2.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/drivers/usb

[PATCH v2 13/22] usb: gadget: audio: init usb_otg_descriptor via usb_otg_descriptor_add

2015-06-08 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 jun...@freescale.com --- drivers/usb/gadget/legacy/audio.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/usb

[PATCH v2 15/22] usb: gadget: g_ffs: init usb_otg_descriptor via usb_otg_descriptor_add

2015-06-08 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 jun...@freescale.com --- drivers/usb/gadget/legacy/g_ffs.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/drivers/usb

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

2015-06-08 Thread Li Jun
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 jun...@freescale.com --- drivers/usb/gadget/configfs.c | 26 +- 1 file changed, 17 insertions(+), 9

[PATCH 5/9] usb: gadget: composite: add USB_DT_OTG request handling

2015-05-27 Thread Li Jun
From: Macpaul Lin macp...@gmail.com Copy usb_otg_descriptor from config's descriptor if host requests USB_DT_OTG. Signed-off-by: Macpaul Lin macp...@gmail.com Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/gadget/composite.c | 18 ++ 1 file changed, 18 insertions

[PATCH 9/9] usb: chipidea: update ci_otg_is_fsm_mode conditions

2015-05-27 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 after this API change in debug.c. Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/chipidea/ci.h| 4

[PATCH 3/9] usb: add ADP, HNP and SRP feature options to gadget structure.

2015-05-27 Thread Li Jun
From: Macpaul Lin macp...@gmail.com Add ADP, HNP and SRP feature options to gadget structure. Signed-off-by: Macpaul Lin macp...@gmail.com --- include/linux/usb/gadget.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index

[PATCH 2/9] usb: add USB_OTG_ADP definition

2015-05-27 Thread Li Jun
From: Macpaul Lin macp...@gmail.com Add USB_OTG_ADP definition for usb_otg_descriptor.bmAttributes. Signed-off-by: Macpaul Lin macp...@gmail.com Signed-off-by: Li Jun jun...@freescale.com --- include/uapi/linux/usb/ch9.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/usb

[PATCH 4/9] usb: gdaget: composite: override OTG capabilities when add config

2015-05-27 Thread Li Jun
From: Macpaul Lin macp...@gmail.com Update usb_otg_descriptor for ADP/SRP/HNP features if usb HW has any configrations of them. Signed-off-by: Macpaul Lin macp...@gmail.com Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/gadget/composite.c | 31 +++ 1 file

[PATCH 1/9] usb: introduce OTG version number config

2015-05-27 Thread Li Jun
...@gmail.com Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/core/Kconfig | 11 +++ include/uapi/linux/usb/ch9.h | 7 ++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig index cc0ced0..566a6c6 100644

[PATCH 6/9] doc: dt-binding: ci-hdrc-imx: add otg related properties

2015-05-27 Thread Li Jun
Add srp, hnp and adp support for usb OTG port, then those OTG features don't have to be decided by usb driver. Signed-off-by: Li Jun jun...@freescale.com --- Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree

[PATCH 0/9] usb gadget update for OTG 2.0

2015-05-27 Thread Li Jun
/linux-usb/msg123927.html Li Jun (4): doc: dt-binding: ci-hdrc-imx: add otg related properties usb: common: add API to get usb otg features from device tree usb: chipidea: udc: set usb gadeget's otg config usb: chipidea: update ci_otg_is_fsm_mode conditions Macpaul Lin (5): usb: introduce OTG

[PATCH 7/9] usb: common: add API to get usb otg features from device tree

2015-05-27 Thread Li Jun
Check property of usb hardware to get if SRP, HNP and ADP is supported. Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/common/common.c | 45 + include/linux/usb/of.h | 15 +++ 2 files changed, 60 insertions(+) diff --git

[PATCH 8/9] usb: chipidea: udc: set usb gadeget's otg config

2015-05-27 Thread Li Jun
Set gadget's otg features according to controller's capability and usb property in device tree. Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/chipidea/core.c | 12 drivers/usb/chipidea/udc.c | 19 ++- include/linux/usb/chipidea.h | 3 +++ 3 files

Re: [PATCH 1/9] usb: introduce OTG version number config

2015-05-27 Thread Li Jun
On Thu, May 28, 2015 at 09:15:05AM +0800, Peter Chen wrote: On Wed, May 27, 2015 at 07:50:01PM +0800, Li Jun wrote: From: Macpaul Lin macp...@gmail.com Add CONFIG_USB_OTG_VERSION to identify the OTG and EH supplement release number with which the OTG device is compliant, also update

Re: [PATCH 9/9] usb: chipidea: update ci_otg_is_fsm_mode conditions

2015-05-27 Thread Li Jun
On Thu, May 28, 2015 at 09:37:47AM +0800, Peter Chen wrote: On Wed, May 27, 2015 at 07:50:09PM +0800, Li Jun wrote: 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

Re: [PATCH v4 1/5] usb: introduce OTG 2.0 related kernel feature and API.

2015-04-20 Thread Li Jun
per OTG spec. Li Jun At gadget driver, assign otg descriptor like below: static const struct usb_descriptor_header *otg_desc[] = { (struct usb_descriptor_header *) (struct usb_otg_descriptor){ .bLength = sizeof(struct usb_otg_descriptor

Re: [PATCH v4 0/8] add HNP polling support for usb otg fsm

2015-04-20 Thread Li Jun
On Thu, Mar 26, 2015 at 05:38:11PM +0800, Peter Chen wrote: On Wed, Mar 25, 2015 at 07:25:24PM +0800, Li Jun wrote: On Wed, Mar 25, 2015 at 02:43:43PM +0800, Chen Peter-B29397 wrote: On Wed, Mar 25, 2015 at 02:03:51PM +0800, Peter Chen wrote: Hi Jun, The above three

[PATCH v2 1/1] usb: chipidea: debug: add low power mode check before print registers

2015-03-27 Thread Li Jun
Since the required clock to access registers is gated off in low power mode, add ci-in_lpm check before try to dump registers value. Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/chipidea/debug.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/chipidea/debug.c b

Re: [PATCH v2 1/1] usb: chipidea: debug: add low power mode check before print registers

2015-03-27 Thread Li Jun
On Fri, Mar 27, 2015 at 05:07:59PM +0800, Peter Chen wrote: On Fri, Mar 27, 2015 at 03:06:27PM +0800, Li Jun wrote: Since the required clock to access registers is gated off in low power mode, add ci-in_lpm check before try to dump registers value. Signed-off-by: Li Jun jun

[PATCH v3 1/1] usb: chipidea: debug: add low power mode check before print registers

2015-03-27 Thread Li Jun
Since the required clock to access registers is gated off in low power mode, add ci-in_lpm check before try to dump registers value. Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/chipidea/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb

[PATCH 1/1] usb: chipidea: debug: add low power mode check before print registers

2015-03-26 Thread Li Jun
Since the required clock to access registers is gated off in low power mode, add ci-in_lpm check before try to dump registers value. Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/chipidea/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb

Re: [PATCH 4/4] usb: legacy/multi add supports OTG 2.0

2015-03-26 Thread Li Jun
(like above setting) and the response for getting OTG descriptor request(your patch 3 does in composite.c). Li Jun +#ifdef CONFIG_USB_OTG20 + .bcdOTG = cpu_to_le16(0x0200), +#endif }, NULL, }; -- 1.8.3.2 -- To unsubscribe from this list: send

[PATCH v2 1/1] usb: chipidea: otg: remove mutex unlock and lock while stop and start role

2015-03-26 Thread Li Jun
# v3.16+ Signed-off-by: Li Jun jun...@freescale.com Changes for v2: - Add Cc tag for sta...@vger.kernel.org --- drivers/usb/chipidea/otg_fsm.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c index 82b1e23..789dd76 100644

Re: [PATCH v4 0/8] add HNP polling support for usb otg fsm

2015-03-25 Thread Li Jun
/b_bus_req - Do HNP at A side echo 1 /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req The problem has occurred, the A can't be back to host again. I use your peter-usb-dev branch and did not found the problem, so I need use Greg's tree to try again? Li Jun [1] http://www.spinics.net

Re: [PATCH v4 0/8] add HNP polling support for usb otg fsm

2015-03-25 Thread Li Jun
it. It can work with my i.MX6DL + i.MX6Q SD, but with i.MX6DL + i.MX6SX SDB, I can reproduce the problem you reported, which triggers a bug in our otg_fsm driver, I will send out a patch to fix it. Li Jun Peter -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body

[PATCH 1/1] usb: chipidea: otg: remove mutex unlock and lock while stop and start role

2015-03-25 Thread Li Jun
Wrongly release mutex lock during otg_statemachine may result in re-enter otg_statemachine, which is not allowed, we should do next state transtition after previous one completed. Signed-off-by: Li Jun jun...@freescale.com Hi Peter This is to fix the problem of HNP you reported after apply my

Re: [PATCH] usb: add OTG 2.0 definition and support into gadget function

2015-03-25 Thread Li Jun
on controller. Li Jun + otg_desc-bcdOTG = cpu_to_le16(0x0200); + value = min_t(int, w_length, + sizeof(struct usb_otg_descriptor)); + break; +#endif case USB_DT_DEVICE

Re: [PATCH 1/1] usb: chipidea: otg: remove mutex unlock and lock while stop and start role

2015-03-25 Thread Li Jun
on) hw_device_reset(ci); ci_role_start(ci, CI_ROLE_GADGET); } - mutex_lock(fsm-lock); return 0; } What is intention you added before? not to sleep with the lock hold, actually it's not a problem. Li Jun Peter @@ -548,12 +546,10 @@ static int

Re: [PATCH v4 0/8] add HNP polling support for usb otg fsm

2015-03-23 Thread Li Jun
On Fri, Mar 20, 2015 at 11:07:17AM +0800, Peter Chen wrote: On Thu, Mar 19, 2015 at 11:11:17AM +0800, Li Jun wrote: HNP polling is a mechanism which allows the OTG device currently acting as host to determine when the other attached OTG device wishes to take the host role. When an OTG

[PATCH 1/1] usb: chipidea: udc: bypass pullup DP when gadget connect in OTG fsm mode

2015-03-23 Thread Li Jun
By pass pullup DP in OTG fsm mode when do gadget connect, to let it handled by OTG state machine. Signed-off-by: Li Jun jun...@freescale.com This patch can fix the problem you found with my HNP polling patchset after below 3 patches introduced: 467a78c usb: chipidea: udc: apply new

[PATCH v3 5/8] usb: gadget: composite: handle otg status selector request from OTG host

2015-03-17 Thread Li Jun
If gadget with HNP polling support receives GetStatus request of otg status selector, it feedback to host with host request flag to indicate if it wants to take host role. Signed-off-by: Li Jun jun...@freescale.com --- drivers/usb/gadget/composite.c | 25 + 1 file

Re: [PATCH v2 2/5] usb: chipidea: udc: add OTG status request handling

2015-03-16 Thread Li Jun
On Mon, Mar 16, 2015 at 05:03:17PM +0800, Peter Chen wrote: On Mon, Mar 16, 2015 at 04:15:22PM +0800, Li Jun wrote: On Mon, Mar 16, 2015 at 09:44:30AM +0800, Peter Chen wrote: On Fri, Mar 13, 2015 at 10:34:59AM -0500, Felipe Balbi wrote: On Fri, Mar 13, 2015 at 11:13:11AM +0800, Peter

Re: [PATCH v2 2/5] usb: chipidea: udc: add OTG status request handling

2015-03-16 Thread Li Jun
On Mon, Mar 16, 2015 at 05:03:17PM +0800, Peter Chen wrote: On Mon, Mar 16, 2015 at 04:15:22PM +0800, Li Jun wrote: On Mon, Mar 16, 2015 at 09:44:30AM +0800, Peter Chen wrote: On Fri, Mar 13, 2015 at 10:34:59AM -0500, Felipe Balbi wrote: On Fri, Mar 13, 2015 at 11:13:11AM +0800, Peter

Re: [PATCH v2 2/5] usb: chipidea: udc: add OTG status request handling

2015-03-16 Thread Li Jun
from what I can see). Li Jun -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

<    1   2   3   4   5   6   7   8   >