[RESEND PATCH v6 00/10] add HNP polling support for usb otg fsm

2016-02-18 Thread Li Jun
a.txt in patch 8/8. - Fix some typo. - Add Peter's Ack in patch 1,2,4,5,6,7/8 of the series. Li Jun (10): usb: gadget: add hnp_polling_support and host_request_flag in usb_gadget usb: add OTG status selector definition for HNP polling usb: common: otg-fsm: add HNP polling support usb

[PATCH v6 06/10] usb: chipidea: otg: set host_request_flag for gadget

2016-01-26 Thread Li Jun
Set host_request_flag if the current peripheral wants to take host role via changing a_bus_req or b_bus_req by user application. Acked-by: Peter Chen Signed-off-by: Li Jun --- drivers/usb/chipidea/otg_fsm.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a

[PATCH v6 00/10] add HNP polling support for usb otg fsm

2016-01-26 Thread Li Jun
a.txt in patch 8/8. - Fix some typo. - Add Peter's Ack in patch 1,2,4,5,6,7/8 of the series. Li Jun (10): usb: gadget: add hnp_polling_support and host_request_flag in usb_gadget usb: add OTG status selector definition for HNP polling usb: common: otg-fsm: add HNP polling sup

[PATCH v6 02/10] usb: add OTG status selector definition for HNP polling

2016-01-25 Thread Li Jun
A host is required to use the GetStatus command, with wIndex set to the OTG status selector(F000H) to request the Host request flag from the peripheral. Acked-by: Peter Chen Signed-off-by: Li Jun --- include/uapi/linux/usb/ch9.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi

[PATCH v6 04/10] usb: chipidea: udc: bypass otg status selector handling to gadget driver

2016-01-25 Thread Li Jun
Since gadget driver will handle this request, so controller driver bypass it. Acked-by: Peter Chen Signed-off-by: Li Jun --- drivers/usb/chipidea/udc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 3eafa2c

[PATCH v6 07/10] usb: chipidea: otg: enable HNP polling support for gadget and host

2016-01-25 Thread Li Jun
Enable HNP polling support for chipidea gadget and allocate memory for host request flag when otg fsm init. Acked-by: Peter Chen Signed-off-by: Li Jun --- drivers/usb/chipidea/otg_fsm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb

[PATCH v6 03/10] usb: common: otg-fsm: add HNP polling support

2016-01-25 Thread Li Jun
-by: Li Jun --- drivers/usb/common/usb-otg-fsm.c | 87 include/linux/usb/otg-fsm.h | 14 +++ 2 files changed, 101 insertions(+) diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb-otg-fsm.c index 61d538a..504708f 100644 --- a

[PATCH v6 05/10] usb: gadget: composite: handle otg status selector request from OTG host

2016-01-25 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. Acked-by: Peter Chen Signed-off-by: Li Jun --- drivers/usb/gadget/composite.c | 25 + 1 file

[PATCH v6 09/10] usb: otg-fsm: add B_AIDL_BDIS timer

2016-01-25 Thread Li Jun
Add A-idle to B-disconnect timer, B-device detects that bus is idle for more than TB_AIDL_BDIS min and begins HNP by turning off pullup on D+. This allows the bus to discharge to the SE0 state. Signed-off-by: Li Jun --- include/linux/usb/otg-fsm.h | 1 + 1 file changed, 1 insertion(+) diff

[PATCH v6 08/10] Documentation: usb: chipidea: Update test procedure for HNP polling

2016-01-25 Thread Li Jun
Update HNP test procedure as HNP polling is supported. Acked-by: Peter Chen Signed-off-by: Li Jun --- Documentation/usb/chipidea.txt | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Documentation/usb/chipidea.txt b/Documentation/usb/chipidea.txt index 05f735a

[PATCH v6 10/10] usb: chipidea: otg: add A idle to B disconnect timer

2016-01-25 Thread Li Jun
this timing issue. Signed-off-by: Li Jun --- drivers/usb/chipidea/otg_fsm.c | 12 ++-- drivers/usb/chipidea/otg_fsm.h | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c index 9a963a7..de8e22e 100644 --- a

[PATCH v6 01/10] usb: gadget: add hnp_polling_support and host_request_flag in usb_gadget

2016-01-25 Thread Li Jun
Add 2 flags for USB OTG HNP polling, hnp_polling_support is to indicate if the gadget can support HNP polling, host_request_flag is used for gadget to store host request information from application, which can be used to respond to HNP polling from host. Acked-by: Peter Chen Signed-off-by: Li

[PATCH RESEND 1/1] usb: phy: mxs: declare variable with initialized value

2016-01-21 Thread Li Jun
Initialize vbus_value to be 0 since it's possible not to assign any value before judgement. Signed-off-by: Li Jun diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index c2936dc..00bfea0 100644 --- a/drivers/usb/phy/phy-mxs-usb.c +++ b/drivers/usb/phy/phy-mxs-

[PATCH 2/2] usb: chipidea: udc: remove unused value assignment

2016-01-20 Thread Li Jun
retval is assigned to be -EOVERFLOW but is overwritten later before it's used, remove this unused value assignment. Signed-off-by: Li Jun --- drivers/usb/chipidea/udc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index f3

[PATCH 1/2] usb: phy: mxs: declare variable with initialized value

2016-01-20 Thread Li Jun
Initialize vbus_value to be 0 since it's possible not to assign any value before judgement. Signed-off-by: Li Jun --- drivers/usb/phy/phy-mxs-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index c2

[PATCH 1/2] usb: chipidea: host: set host to be null after hcd is freed

2015-12-15 Thread Li Jun
Set ci->hcd and ci->otg.host to be null in host_stop since the hcd already freed. Signed-off-by: Li Jun --- drivers/usb/chipidea/host.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index 3d24304..053bac9 100644 --- a/drive

[PATCH 2/2] usb: chipidea: otg: use usb autosuspend to suspend bus for HNP

2015-12-15 Thread Li Jun
Directly manipulate the controller regsiter to suspend the usb bus for HNP is not the proper way, this should be done through the usbcore by usb autosuspend. So to start HNP, autosuspend support should be added for OTG devices interface driver if it's not enabled. Signed-off-by: L

Re: [PATCH V4] usb: remove unnecessary CONFIG_PM dependency from USB_OTG

2015-12-01 Thread Li Jun
many will > have whatever special HW which, likely, doesn't even work with mainline > to validate a change. > > Please, make sure to fix that design so that HNP *always* goes through > the proper code path. If you have devices which would prevent HNP > because their class driver (ho

[PATCH 1/1] usb: chipidea: otg: don't wait vbus drops below BSV when starts host

2015-10-15 Thread Li Jun
Some HW design may use ID pin state to control vbus for otg port, so before host role start, the vbus is already turned on, in this case, we do not need wait vbus dropping below BSV. Signed-off-by: Li Jun --- drivers/usb/chipidea/otg.c |9 ++--- 1 file changed, 6 insertions(+), 3

[PATCH v2 1/1] usb: chipidea: debug: disable usb irq while role switch

2015-10-13 Thread Li Jun
up the board with ID cable and usb device connected. 3. echo gadget > /sys/kernel/debug/ci_hdrc.0/role 4. echo host > /sys/kernel/debug/ci_hdrc.0/role 5. irq 212: nobody cared. Cc: # v3.10+ Signed-off-by: Li Jun --- Change for v2: -cc sta...@vger.kernel.org drivers/usb/chipidea/debug.c |

[PATCH 1/1] usb: chipidea: debug: disable usb irq while role switch

2015-10-13 Thread Li Jun
up the board with ID cable and usb device connected. 3. echo gadget > /sys/kernel/debug/ci_hdrc.0/role 4. echo host > /sys/kernel/debug/ci_hdrc.0/role 5. irq 212: nobody cared. Signed-off-by: Li Jun --- drivers/usb/chipidea/debug.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/dr

[PATCH v2 2/2] usb: phy: mxs: add "fsl,imx6ul-usbphy" compatible string

2015-09-16 Thread Li Jun
From: Peter Chen Add "fsl,imx6ul-usbphy" compatible string for iMX6ul usb phy Signed-off-by: Peter Chen Signed-off-by: Li Jun --- drivers/usb/phy/phy-mxs-usb.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c ind

[PATCH v2 1/2] usb: chipidea: imx: add imx6ul usb support

2015-09-16 Thread Li Jun
From: Peter Chen Add imx6ul usb support. Signed-off-by: Peter chen Signed-off-by: Li Jun --- Change for v2: - remove CI_HDRC_DISABLE_HOST_STREAMING. drivers/usb/chipidea/ci_hdrc_imx.c | 6 ++ drivers/usb/chipidea/usbmisc_imx.c | 4 2 files changed, 10 insertions(+) diff --git a

[PATCH v2 1/1] usb: chipidea: imx: fix a typo for imx6sx

2015-09-16 Thread Li Jun
Use imx6sx instead of imx6sl's platform flags for imx6sx. Fixes: e14db48dfcf3 ("usb: chipidea: imx: add runtime power management support") Cc: # v4.1+ Signed-off-by: Li Jun --- drivers/usb/chipidea/ci_hdrc_imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH 2/2] usb: phy: mxs: add "fsl,imx6ul-usbphy" compatible string

2015-09-15 Thread Li Jun
From: Peter Chen Add "fsl,imx6ul-usbphy" compatible string for iMX6ul usb phy Signed-off-by: Peter Chen Signed-off-by: Li Jun --- drivers/usb/phy/phy-mxs-usb.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c ind

[PATCH 1/2] usb: chipidea: imx: add imx6ul usb support

2015-09-15 Thread Li Jun
From: Peter Chen Add imx6ul usb support. Signed-off-by: Peter chen Signed-off-by: Li Jun --- drivers/usb/chipidea/ci_hdrc_imx.c | 7 +++ drivers/usb/chipidea/usbmisc_imx.c | 4 2 files changed, 11 insertions(+) diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-10 Thread Li Jun
On Wed, Sep 09, 2015 at 01:01:14PM +0300, Roger Quadros wrote: ... ... > +return -EINVAL; > >>> > >>> Return non-zero, then if err, do we need call usb_otg_add_hcd() after > >>> usb_otg_register_hcd() fails? > >> > >> You should not call usb_otg_register_hcd() but usb_add_hcd(). > >>

[PATCH v3 2/2] usb: chipidea: imx: fix a typo for imx6sx

2015-09-09 Thread Li Jun
Use imx6sx instead of imx6sl's platform flags for imx6sx. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci_hdrc_imx.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index c038bca..c7f127f 1

[PATCH v3 1/2] usb: chipidea: imx: add usb support for imx7d

2015-09-09 Thread Li Jun
From: Peter Chen Add imx7d usb support. Signed-off-by: Peter Chen Signed-off-by: Li Jun --- Change for v3: - Remove CI_HDRC_DISABLE_HOST_STREAMING and CI_HDRC_TURN_VBUS_EARLY_ON since they are required for i.mx7d drivers/usb/chipidea/ci_hdrc_imx.c |5 +++ drivers/usb/chipidea

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-09 Thread Li Jun
On Mon, Sep 07, 2015 at 01:53:19PM +0300, Roger Quadros wrote: > On 07/09/15 10:40, Li Jun wrote: > > On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: > >> The OTG core instantiates the OTG Finite State Machine > >> per OTG controller and manages starting

Re: [PATCH 1/2] usb: chipidea: imx: add usb support for imx7d

2015-09-08 Thread Li Jun
t; Title: Non-Double Word Aligned Buffer Address Sometimes Causes Host > to Hang on OUT Retry > > At v2.5 core, this bug has fixed by IP vendor. > ok, I will remove this flag. Li Jun -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of

[PATCH v2 2/2] usb: chipidea: imx: fix a typo for imx6sx

2015-09-08 Thread Li Jun
Use imx6sx instead of imx6sl's platform flags for imx6sx. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci_hdrc_imx.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index f9deea5..1becd33 1

[PATCH v2 1/2] usb: chipidea: imx: add usb support for imx7d

2015-09-08 Thread Li Jun
From: Peter Chen Add imx7d usb support. Signed-off-by: Peter Chen Signed-off-by: Li Jun --- change for v2: - update author and signed-off drivers/usb/chipidea/ci_hdrc_imx.c |7 drivers/usb/chipidea/usbmisc_imx.c | 62 2 files changed, 69

[PATCH 1/2] usb: chipidea: imx: add usb support for imx7d

2015-09-08 Thread Li Jun
Add imx7d usb support. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci_hdrc_imx.c |7 drivers/usb/chipidea/usbmisc_imx.c | 62 2 files changed, 69 insertions(+) diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea

[PATCH 2/2] usb: chipidea: imx: fix a typo for imx6sx

2015-09-08 Thread Li Jun
Use imx6sx instead of imx6sl's platform flags for imx6sx. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci_hdrc_imx.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index f9deea5..1becd33 1

Re: [PATCH v4 13/13] usb: otg: Add dual-role device (DRD) support

2015-09-07 Thread Li Jun
On Mon, Aug 24, 2015 at 04:21:24PM +0300, Roger Quadros wrote: > DRD mode is a reduced functionality OTG mode. In this mode > we don't support SRP, HNP and dynamic role-swap. > > In DRD operation, the controller mode (Host or Peripheral) > is decided based on the ID pin status. Once a cable plug (

Re: [PATCH v4 07/13] usb: otg: add OTG core

2015-09-07 Thread Li Jun
On Mon, Aug 24, 2015 at 04:21:18PM +0300, Roger Quadros wrote: > The OTG core instantiates the OTG Finite State Machine > per OTG controller and manages starting/stopping the > host and gadget controllers based on the bus state. > > It provides APIs for the following tasks > > - Registering an OT

[PATCH v2 1/1] usb: otg: don't set a_alt_hnp_support feature for OTG 2.0 device

2015-08-31 Thread Li Jun
h has different length than OTG 1.x using usb_otg_descriptor. Signed-off-by: Li Jun --- Changes for v2: - Change dev_info to be dev_err if set otg features failed. - Coding style update for line charactors less than 80. drivers/usb/core/hub.c | 68 +++---

[PATCH] usb: otg: don't set a_alt_hnp_support feature for OTG 2.0 device

2015-08-25 Thread Li Jun
h has different length than OTG 1.x using usb_otg_descriptor. Signed-off-by: Li Jun --- drivers/usb/core/hub.c | 45 + 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 917c27c..47dca78 1

Re: [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-17 Thread Li Jun
On Mon, Aug 17, 2015 at 02:02:08PM +0800, Baolin Wang wrote: > On 17 August 2015 at 09:15, Li Jun wrote: > > On Fri, Aug 14, 2015 at 07:04:56PM +0800, Baolin Wang wrote: > >> On 14 August 2015 at 16:55, Li Jun wrote: > >> > Hi Baolin, > >> > >

Re: [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-16 Thread Li Jun
On Fri, Aug 14, 2015 at 07:04:56PM +0800, Baolin Wang wrote: > On 14 August 2015 at 16:55, Li Jun wrote: > > Hi Baolin, > > > > On Fri, Aug 14, 2015 at 05:47:43PM +0800, Baolin Wang wrote: > >> Currently the Linux kernel does not provide any standard integration o

Re: [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-14 Thread Li Jun
d this in their kernels > or USB gadget devices based on Linux (such as mobile phones) may not behave > as they should. > > Providing a standard framework for doing this in the kernel. > Why not add power supply class support into this? Li Jun -- To unsubscribe from this list: se

Re: [PATCH] usb: chipidea: add ci->is_otg condition for otg judgement

2015-08-03 Thread Li Jun
On Fri, Jul 31, 2015 at 10:41:00AM +0800, Li Jun wrote: > Since some chipidea based controller is not otg capable, add ci->is_otg > condition when setting is_otg flag for gadget. > > Signed-off-by: Li Jun > Reviewed-by: Roger Quadros > Acked-by: Peter Chen > --- >

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

[PATCH] usb: chipidea: add ci->is_otg condition for otg judgement

2015-07-30 Thread Li Jun
Since some chipidea based controller is not otg capable, add ci->is_otg condition when setting is_otg flag for gadget. Signed-off-by: Li Jun Reviewed-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/chipidea/udc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

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] usb: chipidea: debug: add runtime pm for register access

2015-07-28 Thread Li Jun
Add runtime pm operations for registers access to avoid system hang. Signed-off-by: Li Jun --- drivers/usb/chipidea/debug.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c index 3869c6d..080b7be 100644 --- a/drivers/usb

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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

[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

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 v3 07/11] usb: otg: add OTG core

2015-07-21 Thread Li Jun
Hi, [...] > >> + otg_timer_init(A_WAIT_ENUM, otgd, set_tmout, TB_SRP_FAIL, NULL); > > > > 2 timers are missing: B_DATA_PLS, B_SSEND_SRP. > > Those 2 are not used by usb-otg-fsm.c. We can add it when usb-otg-fsm.c is > updated. > ok. > > > >> +} [...] > >> + > >> +/** > >> + * OTG FSM op

Re: [PATCH v3 10/11] usb: otg: Add dual-role device (DRD) support

2015-07-17 Thread Li Jun
On Wed, Jul 08, 2015 at 01:19:36PM +0300, Roger Quadros wrote: [...] > struct otg_fsm *usb_otg_register(struct device *parent_dev, > - struct otg_fsm_ops *fsm_ops) > + struct otg_fsm_ops *fsm_ops, > + bool drd

Re: [PATCH v3 10/11] usb: otg: Add dual-role device (DRD) support

2015-07-17 Thread Li Jun
Hi, On Wed, Jul 08, 2015 at 01:19:36PM +0300, Roger Quadros wrote: > DRD mode is a reduced functionality OTG mode. In this mode > we don't support SRP, HNP and dynamic role-swap. > > In DRD operation, the controller mode (Host or Peripheral) > is decided based on the ID pin status. Once a cable p

Re: [PATCH v3 07/11] usb: otg: add OTG core

2015-07-17 Thread Li Jun
help > @@ -75,15 +75,6 @@ config USB_OTG_BLACKLIST_HUB > and software costs by not supporting external hubs. So > are "Embedded Hosts" that don't offer OTG support. > > -config USB_OTG_FSM > - tristate "USB 2.0 OTG FSM implementation" >

Re: [PATCH 1/1] usb: gadget: composite: fix configuration NULL pointer dereference problem

2015-07-16 Thread Li Jun
/composite.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c > index 4e3447b..dc836b3 100644 > --- a/drivers/usb/gadget/composite.c > +++ b/drivers/usb/gadget/composite.c > @@ -1758,6 +1758,8 @@ unknown: >* take such requests too, if that's ever needed: to work >* in config 0, etc. >*/ > + if (!cdev->config) > + break; > list_for_each_entry(f, &cdev->config->functions, list) > if (f->req_match && f->req_match(f, ctrl)) > goto try_fun_setup; > -- > 1.9.1 > For this case, could be better if fix it like A_ALT_HNP_SUPPORT in chipidea/udc.c? Li Jun -- 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

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 v3 00/11] USB: OTG/DRD Core functionality

2015-07-13 Thread Li Jun
On Mon, Jul 13, 2015 at 01:24:05PM +0300, Roger Quadros wrote: > Hi, > > On 10/07/15 10:58, Li Jun wrote: > > On Wed, Jul 08, 2015 at 01:19:26PM +0300, Roger Quadros wrote: > >> Hi, > >> > >> This series centralizes OTG/Dual-role functionality in the

Re: [PATCH v3 02/11] usb: otg-fsm: support multiple instances

2015-07-10 Thread Li Jun
On Wed, Jul 08, 2015 at 01:19:28PM +0300, Roger Quadros wrote: > Move the state_changed variable into struct otg_fsm > so that we can support multiple instances. > I am not sure if multiple instances may happen since OTG protocol requires only one OTG port can be equipped on OTG device

Re: [PATCH v3 00/11] USB: OTG/DRD Core functionality

2015-07-10 Thread Li Jun
use are already > in v4.2 Do you have any plan to implement OTG(HNP) on some of your platforms based on this OTG core? Li Jun > > http://thread.gmane.org/gmane.linux.kernel/1923161 > > DWC3 controller and platform related patches are sent separately. > > Changelog: -- To

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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 --

<    1   2   3   4   5   6   7   8   >