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
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
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
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
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
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
-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
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
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
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
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
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
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-
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
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
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
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
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
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
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 |
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
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
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
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
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
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
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().
> >>
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
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
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
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
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
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
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
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
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 (
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
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 +++---
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
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,
> >> >
>
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
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
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
> ---
>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 --
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 --
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
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
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
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
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
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
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
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
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
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
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"
>
/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
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
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
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
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
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
> >
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
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
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
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
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
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
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
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 --
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
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
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
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
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
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
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
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
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 --
201 - 300 of 791 matches
Mail list logo