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

2016-01-26 Thread Li Jun
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 01/10] usb: gadget: add hnp_polling_support and host_request_flag in usb_gadget

2016-01-25 Thread Li Jun
r.c...@freescale.com> Signed-off-by: Li Jun <jun...@nxp.com> --- include/linux/usb/gadget.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 3d583a1..453c000 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget

[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 <peter.c...@freescale.com> Signed-off-by: Li Jun <jun...@nxp.com> --- include/uapi/linux/usb/ch9.h | 1 + 1

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

2016-01-25 Thread Li Jun
r.c...@nxp.com> Signed-off-by: Li Jun <jun...@nxp.com> --- 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/u

[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 <peter.c...@freescale.com> Signed-off-by: Li Jun <jun...@nxp.com> --- drivers/usb/chipidea/udc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/chip

[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 <peter.c...@nxp.com> Signed-off-by: Li Jun <jun...@nxp.com> --- drivers/usb/chipidea/otg_fsm.c | 4 1 file changed, 4 insertions(+) diff --git 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 <peter.c...@freescale.com> Signed-off-by: Li Jun <jun...@nxp.com> --- drivers/usb/gadget

[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 <jun...@nxp.com> --- 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 9

[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 <jun...@nxp.com> --- include/linux/usb/otg-fsm.h | 1 + 1 file chan

[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 <peter.c...@nxp.com> Signed-off-by: Li Jun <jun...@nxp.com> --- Documentation/usb/chipidea.txt | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Documentation/usb/chipidea.txt b/D

[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 <jun...@nxp.com> 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/u

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

[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 <jun...@nxp.com> --- drivers/usb/chipidea/udc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea

[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: Li Jun <

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

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

2015-12-01 Thread Li Jun
c changes > in usbcore to be validated. Specially when you consider not 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

[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 <jun...@freescale.com> --- drivers/usb/chipidea/otg.c |9 ++--- 1 file chan

[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 <jun...@freescale.com> --- drivers/usb/chipidea/debug.c |2 ++ 1 file change

[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: <sta...@vger.kernel.org> # v3.10+ Signed-off-by: Li Jun <jun...@freescale.com> --- C

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

2015-09-16 Thread Li Jun
From: Peter Chen <peter.c...@freescale.com> Add "fsl,imx6ul-usbphy" compatible string for iMX6ul usb phy Signed-off-by: Peter Chen <peter.c...@freescale.com> Signed-off-by: Li Jun <jun...@freescale.com> --- drivers/usb/phy/phy-mxs-usb.c | 5 + 1 file changed,

[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: <sta...@vger.kernel.org> # v4.1+ Signed-off-by: Li Jun <jun...@freescale.com> --- drivers/usb/chipidea/ci_hdrc_imx.c | 2 +- 1 fil

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

2015-09-16 Thread Li Jun
From: Peter Chen <peter.c...@freescale.com> Add imx6ul usb support. Signed-off-by: Peter chen <peter.c...@freescale.com> Signed-off-by: Li Jun <jun...@freescale.com> --- drivers/usb/chipidea/ci_hdrc_imx.c | 7 +++ drivers/usb/chipidea/usbmisc_imx.c | 4 2 files chan

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

2015-09-16 Thread Li Jun
From: Peter Chen <peter.c...@freescale.com> Add imx6ul usb support. Signed-off-by: Peter chen <peter.c...@freescale.com> Signed-off-by: Li Jun <jun...@freescale.com> --- Change for v2: - remove CI_HDRC_DISABLE_HOST_STREAMING. drivers/usb/chipidea/ci_hdrc_imx.c | 6 ++ dr

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

2015-09-16 Thread Li Jun
From: Peter Chen <peter.c...@freescale.com> Add "fsl,imx6ul-usbphy" compatible string for iMX6ul usb phy Signed-off-by: Peter Chen <peter.c...@freescale.com> Signed-off-by: Li Jun <jun...@freescale.com> --- drivers/usb/phy/phy-mxs-usb.c | 5 + 1 file changed,

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(). > >>

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

2015-09-09 Thread Li Jun
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 a me

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 star

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

2015-09-09 Thread Li Jun
From: Peter Chen <peter.c...@freescale.com> Add imx7d usb support. Signed-off-by: Peter Chen <peter.c...@freescale.com> Signed-off-by: Li Jun <jun...@freescale.com> --- Change for v3: - Remove CI_HDRC_DISABLE_HOST_STREAMING and CI_HDRC_TURN_VBUS_EARLY_ON since they are r

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

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

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

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

2015-09-08 Thread Li Jun
From: Peter Chen <peter.c...@freescale.com> Add imx7d usb support. Signed-off-by: Peter Chen <peter.c...@freescale.com> Signed-off-by: Li Jun <jun...@freescale.com> --- change for v2: - update author and signed-off drivers/usb/chipidea/ci_hdrc_imx.c |7 dr

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

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

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

[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
different length than OTG 1.x using usb_otg_descriptor. Signed-off-by: Li Jun <jun...@freescale.com> --- 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

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

2015-08-25 Thread Li Jun
different length than OTG 1.x using usb_otg_descriptor. Signed-off-by: Li Jun jun...@freescale.com --- 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

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 b47...@freescale.com wrote: On Fri, Aug 14, 2015 at 07:04:56PM +0800, Baolin Wang wrote: On 14 August 2015 at 16:55, Li Jun b47...@freescale.com wrote: Hi Baolin, On Fri, Aug 14, 2015

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 b47...@freescale.com 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 of this feature

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

2015-08-14 Thread Li Jun
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: send the line unsubscribe linux-usb

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, Jul 29, 2015 at 10:04:27AM -0500, Felipe

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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com Acked-by: Peter Chen peter.c

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com Acked-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c | 4 ++-- 1 file

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 Thu, Jul 23, 2015 at 11:37:24AM +0800, Li Jun

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 Reviewed-by for patch 07, 21~23

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

[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 jun...@freescale.com Acked-by: Peter Chen peter.c...@freescale.com

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com

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

2015-07-22 Thread Li Jun
From: Macpaul Lin macp...@gmail.com Add usb_otg_caps pointer to usb_gadget structure to indicate its otg capabilities. Signed-off-by: Macpaul Lin macp...@gmail.com Signed-off-by: Li Jun jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- include/linux/usb/gadget.h | 2 ++ 1 file

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb/common/common.c | 56 + include/linux

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com Acked-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 15 +++ drivers/usb/chipidea/udc.c

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

2015-07-22 Thread Li Jun
be decided by the combination of usb hardware property and driver config. Signed-off-by: Li Jun jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb/gadget/config.c | 56 + include/linux/usb/gadget.h | 4 2 files changed

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

2015-07-22 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 Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb/gadget/composite.c | 27

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- include/linux/usb/otg.h | 15 +++ 1 file

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

2015-07-22 Thread Li Jun
-off-by: Li Jun jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.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

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- Documentation/devicetree/bindings/usb/generic.txt | 15 +++ 1

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

2015-07-22 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 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 jun...@freescale.com Reviewed-by: Roger Quadros rog

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

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

2015-07-22 Thread Li Jun
-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 8. Li Jun (19

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- 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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

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. - Choose the lesser otg-rev if otg-rev has been

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 ops function to start/stop

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

2015-07-17 Thread Li Jun
will have more comments after try more. 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 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 plug

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

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

2015-07-16 Thread Li Jun
) [ 44.251100] ---[ end trace 48ab8610ac76d0a2 ]--- [ 44.255725] Kernel panic - not syncing: Fatal exception in interrupt [ 44.262092] ---[ end Kernel panic - not syncing: Fatal exception in interrupt Cc: sta...@vger.kernel.org #v3.14+ Cc: Jun Li jun...@freescale.com Cc: Roger Quadros rog

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 kernel. As of now I've got Dual-role functionality working

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 changes: 1. Add

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

2015-07-10 Thread Li Jun
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 unsubscribe from this list: send the line unsubscribe

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. Li Jun

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

2015-07-09 Thread Li Jun
-off-by: Li Jun jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.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

[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 jun...@freescale.com --- drivers/usb/chipidea/core.c | 15 +++ drivers/usb/chipidea/udc.c | 7 ++- include/linux/usb/chipidea.h | 1 + 3 files changed, 22 insertions

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

2015-07-09 Thread Li Jun
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 usb: chipidea

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- Documentation/devicetree/bindings/usb/generic.txt | 15 +++ 1

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

2015-07-09 Thread Li Jun
From: Macpaul Lin macp...@gmail.com Add usb_otg_caps pointer to usb_gadget structure to indicate its otg capabilities. Signed-off-by: Macpaul Lin macp...@gmail.com Signed-off-by: Li Jun jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- include/linux/usb/gadget.h | 2 ++ 1 file

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

2015-07-09 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 v7 05/23] usb: gadget: composite: add USB_DT_OTG request handling

2015-07-09 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 Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb/gadget/composite.c | 27

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- include/linux/usb/otg.h | 15 +++ 1 file

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

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

2015-07-09 Thread Li Jun
be decided by the combination of usb hardware property and driver config. Signed-off-by: Li Jun jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb/gadget/config.c | 56 + include/linux/usb/gadget.h | 4 2 files changed

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

[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 jun...@freescale.com --- 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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

[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 jun...@freescale.com --- drivers/usb/common/common.c | 56 + include/linux/usb/of.h | 7 ++ 2 files

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

[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 jun...@freescale.com Reviewed-by: Roger Quadros rog...@ti.com --- drivers/usb

<    1   2   3   4   5   6   7   8   >