Re: [PATCH v8 00/23] usb gadget update for OTG 2.0

2015-08-03 Thread Li Jun
On Thu, Jul 30, 2015 at 09:10:06AM -0500, Felipe Balbi wrote: > On Thu, Jul 30, 2015 at 09:46:58AM +0800, Li Jun wrote: > > On Wed, Jul 29, 2015 at 09:11:41PM -0500, Felipe Balbi wrote: > > > On Thu, Jul 30, 2015 at 07:24:03AM +0800, Li Jun wrote: > > > > On Wed, Ju

Re: [PATCH v8 00/23] usb gadget update for OTG 2.0

2015-07-29 Thread Li Jun
On Wed, Jul 29, 2015 at 09:11:41PM -0500, Felipe Balbi wrote: > On Thu, Jul 30, 2015 at 07:24:03AM +0800, Li Jun wrote: > > On Wed, Jul 29, 2015 at 10:04:27AM -0500, Felipe Balbi wrote: > > > On Mon, Jul 27, 2015 at 03:21:59PM +0800, Peter Chen wrote: > > > > On T

Re: [PATCH v8 00/23] usb gadget update for OTG 2.0

2015-07-29 Thread Li Jun
On Wed, Jul 29, 2015 at 10:04:27AM -0500, Felipe Balbi wrote: > On Mon, Jul 27, 2015 at 03:21:59PM +0800, Peter Chen wrote: > > On Thu, Jul 23, 2015 at 11:37:24AM +0800, Li Jun wrote: > > > Change for v8: > > > - Add Peter's ACk for chipidea driver; and Roger's

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

2015-07-22 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/hid.c | 36

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

2015-07-22 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/mass_storage.c | 35

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

2015-07-22 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/g_ffs.c | 32

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

2015-07-22 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/multi.c | 37

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

2015-07-22 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/cdc2.c | 35

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

2015-07-22 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/serial.c | 37

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

2015-07-22 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/audio.c | 34

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

2015-07-22 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/printer.c | 49

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

2015-07-22 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/ncm.c | 34

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

2015-07-22 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/zero.c | 41

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

2015-07-22 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/acm_ms.c | 35

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

2015-07-22 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 Acked-by: Peter Chen --- drivers/usb/chipidea/ci.h| 5

[PATCH v8 07/23] usb: common: add API to update usb otg capabilities by device tree

2015-07-22 Thread Li Jun
Check property of usb hardware to update otg version and disable SRP, HNP and ADP if its disable flag is present. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/common/common.c | 56 + include/linux/usb/of.h | 7 ++ 2

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

2015-07-22 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 Reviewed-by: Roger Quadros --- include/linux/usb/gadget.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/usb/gadget.h b

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

2015-07-22 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 Reviewed-by: Roger Quadros --- drivers/usb/gadget

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

2015-07-22 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while ether unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy

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

2015-07-22 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 Reviewed-by: Roger Quadros --- include/linux/usb/otg.h | 15 +++ 1 file changed, 15 insertions(+) diff --git

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

2015-07-22 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 --

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

2015-07-22 Thread Li Jun
s can be decided by the combination of usb hardware property and driver config. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/config.c | 56 + include/linux/usb/gadget.h | 4 2 files changed, 60 insertions(+) diff --

[PATCH v8 08/23] usb: chipidea: set usb otg capabilities

2015-07-22 Thread Li Jun
Init and update otg capabilities by DT, set gadget's otg capabilities accordingly. Signed-off-by: Li Jun Reviewed-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/chipidea/core.c | 15 +++ drivers/usb/chipidea/udc.c | 7 ++- include/linux/usb/chipidea.h | 1

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

2015-07-22 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

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

2015-07-22 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 Reviewed-by: Roger Quadros --- Documentation/devicetree/bindings/usb/generic.txt | 15 +++ 1 file changed, 15 inser

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

2015-07-22 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

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

2015-07-22 Thread Li Jun
Roger's Reviewed-by for patch 10~20. - Choose the lesser otg-rev if otg-rev has been set before update by DT, remove 0x0300 in supported otg-rev list, and add code comments in case otg-rev is not passed in DT in patch 7. - Fail chipidea usb initilization if DT pass an unsupported otg-rev in

Re: [PATCH v7 00/23] usb gadget update for OTG 2.0

2015-07-22 Thread Li Jun
On Wed, Jul 22, 2015 at 10:13:08AM -0500, Felipe Balbi wrote: > On Thu, Jul 09, 2015 at 03:18:37PM +0800, Li Jun wrote: > > Change for v7: > > - Free otg descriptor when failure of bind in patch 21, 22, 23. > > add Roger's Reviewed-by for patch 10~20. > > - Choo

Re: [PATCH v7 00/23] usb gadget update for OTG 2.0

2015-07-13 Thread Li Jun
On Thu, Jul 09, 2015 at 03:18:37PM +0800, Li Jun wrote: ... > > This is a follow-up of Macpaul Lin's previous patchset to resolve usb > gadget driver working with OTG 2.0, and set otg features by not only > usb driver config but also usb hardware property in DT, main

Re: [PATCH v7 08/23] usb: chipidea: set usb otg capabilities

2015-07-09 Thread Li Jun
On Thu, Jul 09, 2015 at 11:57:39AM +0300, Roger Quadros wrote: > Hi, > > On 09/07/15 10:18, Li Jun wrote: > > Init and update otg capabilities by DT, set gadget's otg capabilities > > accordingly. > > > > Signed-off-by: Li Jun > >

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

2015-07-09 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/hid.c | 36

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

2015-07-09 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations, free it while ether unbind. If otg capability is not defined, keep its otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy

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

2015-07-09 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/serial.c | 37

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

2015-07-09 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/acm_ms.c | 35

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

2015-07-09 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/multi.c | 37

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

2015-07-09 Thread Li Jun
s can be decided by the combination of usb hardware property and driver config. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/config.c | 56 + include/linux/usb/gadget.h | 4 2 files changed, 60 insertions(+) diff --

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

2015-07-09 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/ncm.c | 34

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

2015-07-09 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/g_ffs.c | 32

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

2015-07-09 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/printer.c | 49

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

2015-07-09 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun --- drivers/usb/gadget/legacy/zero.c | 41

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

2015-07-09 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/cdc2.c | 35

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

2015-07-09 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/audio.c | 34

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

2015-07-09 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 Reviewed-by: Roger Quadros --- drivers/usb/gadget

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

2015-07-09 Thread Li Jun
Allocate and initialize usb otg descriptor according to gadget otg capabilities, add it for each usb configurations. If otg capability is not defined, keep its original otg descriptor unchanged. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/legacy/mass_storage.c | 35

[PATCH v7 07/23] usb: common: add API to update usb otg capabilities by device tree

2015-07-09 Thread Li Jun
Check property of usb hardware to update otg version and disable SRP, HNP and ADP if its disable flag is present. Signed-off-by: Li Jun --- drivers/usb/common/common.c | 56 + include/linux/usb/of.h | 7 ++ 2 files changed, 63 insertions

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

2015-07-09 Thread Li Jun
ptor content is kept the same as current static definition. Li Jun (19): usb: otg: add usb_otg_caps structure for otg capabilities doc: dt-binding: usb: add otg related properties usb: common: add API to update usb otg capabilities by device tree usb: chipidea: set usb otg capabilities

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

2015-07-09 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 Reviewed-by: Roger Quadros --- Documentation/devicetree/bindings/usb/generic.txt | 15 +++ 1 file changed, 15 inser

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

2015-07-09 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 --

[PATCH v7 08/23] usb: chipidea: set usb otg capabilities

2015-07-09 Thread Li Jun
Init and update otg capabilities by DT, set gadget's otg capabilities accordingly. Signed-off-by: Li Jun --- drivers/usb/chipidea/core.c | 15 +++ drivers/usb/chipidea/udc.c | 7 ++- include/linux/usb/chipidea.h | 1 + 3 files changed, 22 insertions(+), 1 deletion(-)

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

2015-07-09 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 Reviewed-by: Roger Quadros --- include/linux/usb/gadget.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/usb/gadget.h b

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

2015-07-09 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

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

2015-07-09 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

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

2015-07-09 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 Reviewed-by: Roger Quadros --- include/linux/usb/otg.h | 15 +++ 1 file changed, 15 insertions(+) diff --git

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

2015-07-09 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

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

2015-07-07 Thread Li Jun
On Tue, Jul 07, 2015 at 04:55:16PM +0300, Roger Quadros wrote: > > On 29/06/15 10:48, Li Jun wrote: > >Allocate and initialize usb otg descriptor according to gadget otg > >capabilities, add it for each usb configurations. If otg capability > >is not defined, keep its

Re: [PATCH v6 08/23] usb: chipidea: set usb otg capabilities

2015-07-07 Thread Li Jun
On Tue, Jul 07, 2015 at 04:25:44PM +0300, Roger Quadros wrote: > On 29/06/15 10:47, Li Jun wrote: > >Init and update otg capabilities by DT, set gadget's otg capabilities > >accordingly. > > > >Signed-off-by: Li Jun > >--- > > drivers/usb/chipi

Re: [PATCH v6 07/23] usb: common: add API to update usb otg capabilities by device tree

2015-07-07 Thread Li Jun
On Tue, Jul 07, 2015 at 04:23:14PM +0300, Roger Quadros wrote: > Hi, > > On 29/06/15 10:47, Li Jun wrote: > >Check property of usb hardware to update otg version and disable SRP, HNP > >and ADP if its disable flag is present. > > > >Signed-off-by: Li Jun > &

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

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

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

2015-06-29 Thread Li Jun
s can be decided by the combination of usb hardware property and driver config. Signed-off-by: Li Jun Reviewed-by: Roger Quadros --- drivers/usb/gadget/config.c | 56 + include/linux/usb/gadget.h | 4 2 files changed, 60 insertions(+) diff --

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

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

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

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

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

2015-06-29 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 --

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

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

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

2015-06-29 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 Reviewed-by: Roger Quadros --- include/linux/usb/otg.h | 15 +++ 1 file changed, 15 insertions(+) diff --git

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

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

[PATCH v6 07/23] usb: common: add API to update usb otg capabilities by device tree

2015-06-29 Thread Li Jun
Check property of usb hardware to update otg version and disable SRP, HNP and ADP if its disable flag is present. Signed-off-by: Li Jun --- drivers/usb/common/common.c | 47 + include/linux/usb/of.h | 7 +++ 2 files changed, 54 insertions

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

2015-06-29 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

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

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

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

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

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

2015-06-29 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 Reviewed-by: Roger Quadros --- drivers/usb/gadget

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

2015-06-29 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

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

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

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

2015-06-29 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 Reviewed-by: Roger Quadros --- Documentation/devicetree/bindings/usb/generic.txt | 15 +++ 1 file changed, 15 inser

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

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

[PATCH v6 08/23] usb: chipidea: set usb otg capabilities

2015-06-29 Thread Li Jun
Init and update otg capabilities by DT, set gadget's otg capabilities accordingly. Signed-off-by: Li Jun --- drivers/usb/chipidea/core.c | 10 ++ drivers/usb/chipidea/udc.c | 7 ++- include/linux/usb/chipidea.h | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff

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

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

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

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

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

2015-06-29 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 Reviewed-by: Roger Quadros --- include/linux/usb/gadget.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/usb/gadget.h b

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

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

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

2015-06-29 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

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

2015-06-29 Thread Li Jun
use the updated mechanism. 4. Remove static usb otg descriptor definition, but allocate and init it according to otg capabilities in each gadget driver, if otg capabilities is not defined for legacy platforms, the usb otg descriptor content is kept the same as current static definition. Li Jun (

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

2015-06-24 Thread Li Jun
On Wed, Jun 24, 2015 at 11:49:23AM +0800, Peter Chen wrote: > On Wed, Jun 24, 2015 at 11:34:23AM +0800, Li Jun wrote: > > On Wed, Jun 24, 2015 at 11:04:43AM +0800, Peter Chen wrote: > > > On Wed, Jun 17, 2015 at 07:40:15PM +0800, Li Jun wrote: > > > > Set gadget&#

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

2015-06-23 Thread Li Jun
On Wed, Jun 24, 2015 at 11:04:43AM +0800, Peter Chen wrote: > On Wed, Jun 17, 2015 at 07:40:15PM +0800, Li Jun wrote: > > Set gadget's otg capabilities according to controller's capability and otg > > properties in device tree. > > > > Signed-off-by: Li J

Re: [PATCH v6] usb: common: add API to set usb otg capabilities by device tree

2015-06-23 Thread Li Jun
On Tue, Jun 23, 2015 at 02:56:06PM +0300, Roger Quadros wrote: > + Kukjin, Stephen, > > for board specific USB question. > > On Tue, 23 Jun 2015 16:35:49 +0800 > Li Jun wrote: > > > On Tue, Jun 23, 2015 at 10:43:28AM +0300, Roger Quadros wrote: > > > > &g

Re: [PATCH v6] usb: common: add API to set usb otg capabilities by device tree

2015-06-23 Thread Li Jun
g-rev is just not > > > present in DT. > > > > > > > Current OTG situation is not so simple, so that we can not use one simple > > rule to handle legacy cases in a common place, but for a particular > > controller > > driver, make decision on this i

Re: [PATCH v6] usb: common: add API to set usb otg capabilities by device tree

2015-06-22 Thread Li Jun
On Mon, Jun 22, 2015 at 04:32:56PM +0300, Roger Quadros wrote: > On Mon, 22 Jun 2015 18:45:37 +0800 > Li Jun wrote: > > > On Mon, Jun 22, 2015 at 12:41:22PM +0300, Roger Quadros wrote: > > > On Thu, 18 Jun 2015 21:37:04 +0800 > > > Li Jun wrote: > > >

Re: [PATCH v6] usb: common: add API to set usb otg capabilities by device tree

2015-06-22 Thread Li Jun
On Mon, Jun 22, 2015 at 12:43:37PM +0300, Roger Quadros wrote: > On Thu, 18 Jun 2015 16:47:48 +0800 > Li Jun wrote: > > > On Thu, Jun 18, 2015 at 10:36:50AM +0300, Roger Quadros wrote: > > > Lin, > > > > > > You can use --in-reply-to "message i

Re: [PATCH v6] usb: common: add API to set usb otg capabilities by device tree

2015-06-22 Thread Li Jun
On Mon, Jun 22, 2015 at 12:41:22PM +0300, Roger Quadros wrote: > On Thu, 18 Jun 2015 21:37:04 +0800 > Li Jun wrote: > > > On Thu, Jun 18, 2015 at 03:07:48PM +0300, Roger Quadros wrote: > > > On Thu, 18 Jun 2015 16:47:48 +0800 > > > Li Jun wrote: > > >

Re: [PATCH v6] usb: common: add API to set usb otg capabilities by device tree

2015-06-18 Thread Li Jun
On Thu, Jun 18, 2015 at 03:18:24PM +0300, Roger Quadros wrote: > On Thu, 18 Jun 2015 15:55:28 +0800 > Li Jun wrote: > > > On Thu, Jun 18, 2015 at 10:36:50AM +0300, Roger Quadros wrote: > > > Lin, > > > > > > You can use --in-reply-to "message i

Re: [PATCH v6] usb: common: add API to set usb otg capabilities by device tree

2015-06-18 Thread Li Jun
On Thu, Jun 18, 2015 at 03:07:48PM +0300, Roger Quadros wrote: > On Thu, 18 Jun 2015 16:47:48 +0800 > Li Jun wrote: > > > On Thu, Jun 18, 2015 at 10:36:50AM +0300, Roger Quadros wrote: > > > Lin, > > > > > > You can use --in-reply-to "message i

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

2015-06-18 Thread Li Jun
On Thu, Jun 18, 2015 at 03:06:27PM +0300, Roger Quadros wrote: > On Thu, 18 Jun 2015 16:20:30 +0800 > Li Jun wrote: > > > On Thu, Jun 18, 2015 at 10:39:35AM +0300, Roger Quadros wrote: > > > Typo in subject > > > gadeget's -> gadget's > > >

Re: [PATCH v6] usb: common: add API to set usb otg capabilities by device tree

2015-06-18 Thread Li Jun
rivers already support OTG HNP/SRP, then change to utilize those new flags, still should support OTG HNP/SRP w/o any dt change, so OTG caps should be enabled for legacy platforms. 4) Some controller drivers does not support any OTG, after add OTG functions and utilize those new flags, should

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

2015-06-18 Thread Li Jun
On Thu, Jun 18, 2015 at 10:51:48AM +0300, Roger Quadros wrote: > On Thu, 18 Jun 2015 10:43:02 +0300 > Roger Quadros wrote: > > > On Wed, 17 Jun 2015 19:40:19 +0800 > > Li Jun wrote: > > > > > @@ -228,11 +215,6 @@ static int rndis_do_confi

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

2015-06-18 Thread Li Jun
On Thu, Jun 18, 2015 at 10:39:35AM +0300, Roger Quadros wrote: > Typo in subject > gadeget's -> gadget's > > On Wed, 17 Jun 2015 19:40:15 +0800 > Li Jun wrote: > > > Set gadget's otg capabilities according to controller's capability and otg > &

Re: [PATCH v6] usb: common: add API to set usb otg capabilities by device tree

2015-06-18 Thread Li Jun
On Thu, Jun 18, 2015 at 10:36:50AM +0300, Roger Quadros wrote: > Lin, > > You can use --in-reply-to "message id of v5 of this path" so that it appears > together > with the other patches in peoples mailboxes. > okay, I will try that next time, thanks. Li Jun &g

[PATCH v6] usb: common: add API to set usb otg capabilities by device tree

2015-06-17 Thread Li Jun
Change for v6: UPdate otg caps by disable flags even if otg_rev is not passed, this is needed in case user wants to disable whole OTG(or just want to ID pin detect). Check property of usb hardware to get otg version and if SRP, HNP and ADP are disabled. Signed-off-by: Li Jun --- drivers/usb

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

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

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

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

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

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

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

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

  1   2   3   >