UM_OTG_FSM_TIMERS];
> +
> + bool fsm_running;
> + bool gadget_can_start; /* OTG FSM says gadget can start */
> + bool host_can_start;/* OTG FSM says host can start */
Do not understand above 2 *_can_start flags from the patch, which are set
only when you reall
river to usb-otg-fsm.c to
make it more generically, then HNP polling can be fully handled by otg fsm
driver.
- Add comments for host_request_flag in patch:
usb: gadget: add host_requestf_flag in usb_gadget for OTG HNP
Li Jun (8):
usb: gadget: add hnp_polling_support and host_request_fl
Adds HNP polling timer when transits to host state, the OTG status request
will be sent to peripheral after timeout, if host request flag is set, it will
switch to peripheral state, otherwise it will repeat HNP polling every 1.5s and
maintain the current session.
Signed-off-by: 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
From: 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
From: Li Jun
Update HNP test procedure as HNP polling is supported.
Signed-off-by: Li Jun
---
Documentation/usb/chipidea.txt | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/Documentation/usb/chipidea.txt b/Documentation/usb/chipidea.txt
index 3f848c1..ff965b2
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 4254792
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 |2 ++
1 file changed, 2 insertions(+)
diff --git a/include
Set host_request_flag if the current peripheral wants to take host role
via setting 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
Enable HNP polling support for chipidea gadget when otg fsm init.
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c
index 2ec90dc..82b1e23 100644
On Thu, Mar 19, 2015 at 08:00:35AM +0800, Peter Chen wrote:
> On Wed, Mar 18, 2015 at 05:57:32PM +0800, Li Jun wrote:
> > On Wed, Mar 18, 2015 at 01:54:40PM +0800, Peter Chen wrote:
> > > On Tue, Mar 17, 2015 at 10:37:52PM +0800, Li Jun wrote:
> > > > From: Li Jun
&g
On Wed, Mar 18, 2015 at 01:54:40PM +0800, Peter Chen wrote:
> On Tue, Mar 17, 2015 at 10:37:52PM +0800, Li Jun wrote:
> > From: Li Jun
> >
> > Update HNP test procedure as HNP polling is supported.
> >
> > Signed-off-by: Li Jun
> > ---
>
Adds HNP polling timer when transits to host state, the OTG status request
will be sent to peripheral after timeout, if host request flag is set, it will
switch to peripheral state, otherwise it will repeat HNP polling every 1.5s and
maintain the current session.
Signed-off-by: Li Jun
Change
On Wed, Mar 18, 2015 at 01:44:11PM +0800, Peter Chen wrote:
> On Tue, Mar 17, 2015 at 10:37:49PM +0800, Li Jun wrote:
> > 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
&
On Wed, Mar 18, 2015 at 01:36:13PM +0800, Peter Chen wrote:
> On Tue, Mar 17, 2015 at 10:37:47PM +0800, Li Jun wrote:
> > Adds HNP polling timer when transits to host state, the OTG status request
> > will be sent to peripheral after timeout, if host request flag is set, it
> &g
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.
Signed-off-by: Li Jun
---
include/uapi/linux/usb/ch9.h |2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/linux/usb/ch9.h b
From: 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.
Signed-off-by: Li Jun
From: Li Jun
Update HNP test procedure as HNP polling is supported.
Signed-off-by: Li Jun
---
Documentation/usb/chipidea.txt |9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/Documentation/usb/chipidea.txt b/Documentation/usb/chipidea.txt
index 3f848c1..95d9170
Enable HNP polling support for chipidea gadget when otg fsm init.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c
index 2ec90dc..82b1e23 100644
--- a/drivers/usb
polling timer from chipidea controller driver to usb-otg-fsm.c to
make it more generically, then HNP polling can be fully handled by otg fsm
driver.
- Add comments for host_request_flag in patch:
usb: gadget: add host_requestf_flag in usb_gadget for OTG HNP
Li Jun (8):
usb: gadget: add
If gadget with HNP polling support receives GetStatus request of otg status
selector, it feedback to host with host request flag to indicate if it wants
to take host role.
Signed-off-by: Li Jun
---
drivers/usb/gadget/composite.c | 25 +
1 file changed, 17 insertions
Since gadget driver will handle this request, so controller driver bypass it.
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 4254792..a65cdaf 100644
--- a
Adds HNP polling timer when transits to host state, the OTG status request
will be sent to peripheral after timeout, if host request flag is set, it will
switch to peripheral state, otherwise it will repeat HNP polling every 1.5s and
maintain the current session.
Signed-off-by: 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.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/chipidea
On Tue, Mar 17, 2015 at 10:06:44AM +0800, Peter Chen wrote:
> On Mon, Mar 16, 2015 at 12:21:53PM -0500, Felipe Balbi wrote:
> > On Mon, Mar 16, 2015 at 05:34:43PM +0800, Li Jun wrote:
> > > On Mon, Mar 16, 2015 at 05:03:17PM +0800, Peter Chen wrote:
> > > > On Mon, Ma
On Mon, Mar 16, 2015 at 05:03:17PM +0800, Peter Chen wrote:
> On Mon, Mar 16, 2015 at 04:15:22PM +0800, Li Jun wrote:
> > On Mon, Mar 16, 2015 at 09:44:30AM +0800, Peter Chen wrote:
> > > On Fri, Mar 13, 2015 at 10:34:59AM -0500, Felipe Balbi wrote:
> > > > On Fri, Ma
On Mon, Mar 16, 2015 at 05:03:17PM +0800, Peter Chen wrote:
> On Mon, Mar 16, 2015 at 04:15:22PM +0800, Li Jun wrote:
> > On Mon, Mar 16, 2015 at 09:44:30AM +0800, Peter Chen wrote:
> > > On Fri, Mar 13, 2015 at 10:34:59AM -0500, Felipe Balbi wrote:
> > > > On Fri, Ma
eet the recommended sequence in OTG and EH spec 2.0.
So, either we add a new flag for it, or we just do this without flag check(allow
an OTG device response to HNP polling with 0 even it actually does not support
HNP polling, which is harmless from what I can see).
Li Jun
> --
>
> Bes
On Thu, Mar 12, 2015 at 11:06:28AM -0500, Felipe Balbi wrote:
> On Thu, Mar 12, 2015 at 10:30:23AM +0800, Li Jun wrote:
> > Adds HNP polling timer when transits to host state, the OTG status request
> > will be sent to peripheral after timeout, if host request flag is set, it
>
On Fri, Mar 13, 2015 at 11:01:47AM +0800, Peter Chen wrote:
> On Thu, Mar 12, 2015 at 10:30:21AM +0800, Li Jun wrote:
> > From: Li Jun
> >
> > Peripheral answers OTG status selector request from host according to
> > host_request_flag of gadget, length is 1.
>
From: Li Jun
Update HNP test procedure as HNP polling is supported.
Signed-off-by: Li Jun
---
Documentation/usb/chipidea.txt |9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/Documentation/usb/chipidea.txt b/Documentation/usb/chipidea.txt
index 3f848c1..95d9170
Adds HNP polling timer when transits to host state, the OTG status request
will be sent to peripheral after timeout, if host request flag is set, it will
switch to peripheral state, otherwise it will repeat HNP polling every 1.5s and
maintain the current session.
Signed-off-by: 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.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/chipidea
From: Li Jun
Adds host_request_flag for gadget to store host request information from
application, which can be used to response to HNP polling from host.
Signed-off-by: Li Jun
---
include/linux/usb/gadget.h |3 +++
1 file changed, 3 insertions(+)
diff --git a/include/linux/usb/gadget.h
From: Li Jun
Peripheral answers OTG status selector request from host according to
host_request_flag of gadget, length is 1.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 28 +++-
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/drivers/usb
host_request_flag in patch:
usb: gadget: add host_requestf_flag in usb_gadget for OTG HNP
Li Jun (5):
usb: gadget: add host_requestf_flag in usb_gadget for OTG HNP
usb: chipidea: udc: add OTG status request handling
usb: chipidea: otg: set host_request_flag for gadget
usb: common: otg-fsm: add HNP
On Tue, Mar 10, 2015 at 03:46:31PM -0500, Felipe Balbi wrote:
> On Mon, Mar 09, 2015 at 10:09:21AM +0800, Li Jun wrote:
> > From: Li Jun
> >
> > Add a dedicataed normal timer for HNP polling since it's cyclical, while
> > in peripheral mode, change a/b_bus_r
On Mon, Mar 09, 2015 at 03:52:35PM +0800, Peter Chen wrote:
> On Mon, Mar 09, 2015 at 10:09:21AM +0800, Li Jun wrote:
> > From: Li Jun
> >
> > Add a dedicataed normal timer for HNP polling since it's cyclical, while
> > in peripheral mode, change a/b_bus_req to b
From: Li Jun
OTG in host mode call this function to poll peripheral if it wants to be host
role.
Signed-off-by: Li Jun
---
drivers/usb/common/usb-otg-fsm.c | 75 ++
include/linux/usb/otg-fsm.h | 10 +
2 files changed, 85 insertions(+)
diff
From: Li Jun
Peripheral answers OTG status selector request from host according to
host_request_flag of gadget, length is 1.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 28 +++-
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/drivers/usb
determine whether
it requires a role-swap and grant this at the earliest opportunity.
Li Jun (7):
usb: gadget: add host_requestf_flag in usb_gadget for OTG HNP
usb: common: otg-fsm: start HNP polling timer in host state
usb: common: otg-fsm: add HNP polling implememtation
usb: chipidea: udc
From: Li Jun
Update HNP test procedure as HNP polling is supported.
Signed-off-by: Li Jun
---
Documentation/usb/chipidea.txt |9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/Documentation/usb/chipidea.txt b/Documentation/usb/chipidea.txt
index 3f848c1..95d9170
From: Li Jun
Cleare the flag after try to do role switch, no matter the role switch succeeds
or not.
Signed-off-by: Li Jun
---
drivers/usb/common/usb-otg-fsm.c |4
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb-otg-fsm.c
index
From: Li Jun
Add a dedicataed normal timer for HNP polling since it's cyclical, while
in peripheral mode, change a/b_bus_req to be 1 will make it response
to host request flag with 1, then role switch will be started.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/ci.h |
From: Li Jun
Adds host_request_flag for gadget to store host request information from
application, which can be used to response to HNP polling from host.
Signed-off-by: Li Jun
---
include/linux/usb/gadget.h |1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/usb/gadget.h b
From: Li Jun
Adds OTG HNP polling timer when otg fsm moves to host state.
Signed-off-by: Li Jun
---
drivers/usb/common/usb-otg-fsm.c |2 ++
include/linux/usb/otg-fsm.h |1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb
From: Li Jun
Current otg fsm timers are using controller 1ms irq and count it, this patch
is to replace it with hrtimer solution, use one hrtimer for all otg timers.
Signed-off-by: Li Jun
Change for v3:
- clean up the definitions for original timer solution: ci_otg_fsm_timer
and
From: Li Jun
B_DATA_PLS(data-line pulse time) and B_SSEND_SRP(session end to SRP init) are
also from OTG&EH 2.0 Specification and they are not chipidea specific.
Signed-off-by: Li Jun
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c
index 3014e2c..ba2cb91 10
From: Li Jun
Since BSV irq is enabled for B-device all the time, so B_SESS_VLD timer
is not required, and also no need to check BSV status when B_ASE0_BRST
timer timeout.
Signed-off-by: Li Jun
diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c
index e3cf5be..3014e2c
From: Li Jun
Current otg fsm timers are using controller 1ms irq and count it, this patch
is to replace it with hrtimer solution, use one hrtimer for all otg timers.
Signed-off-by: Li Jun
Changes for v2:
- change enabled_otg_timers to be enabled_otg_timer_bits.
- Remove duplicated OTG 1MSIE
he code, I don't know the state is at A_IDLE, mind to change?
>
It's already under condition of A_IDLE as below:
if (ci->fsm.otg->state == OTG_STATE_A_IDLE) {
... ...
if () {
... ...
} else {
/* Enable data pulse irq */
...
}
}
That's a change to avoid to do it in timer out(VFALL) handler, so put it here
(after otg fsm transit to A_IDLE and will no further state transitions).
Li Jun
>
> Peter
--
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, Feb 26, 2015 at 07:25:56PM +0800, Peter Chen wrote:
> On Mon, Feb 09, 2015 at 02:54:48PM +0800, Li Jun wrote:
> > From: Li Jun
> >
> > Current otg fsm timers are using controller 1ms irq and count it, this patch
> > is to replace it with hrtimer solution,
From: Li Jun
This patch adds runtime power management support for otg fsm mode, since
A-device in a_idle state cannot detect data pulse irq after suspended, here
enable wakeup by connection before suspend to make it can be resumed by DP;
and handle wakeup from that state like SRP.
Signed-off-by
From: Li Jun
In otg fsm mode, vbus_active will be updated by otg fsm, this is to fix
the system hang issue if load gadget driver with vbus turned on, because
when binding gadget driver, if vbus_active is set, udc core will pull up
DP by enable R/S bit but controller is already runtime suspended
From: Li Jun
Hi Peter,
The 2 patches are to fix the problems I found in otg fsm mode.
The 1st patch is to fix one system hang issue in otg fsm mode if runtime PM
is enabled, but can not cover vbus glitch case you found on i.MX6SX.
The 2nd patch is to stop the ci_udc_start also for otg A-device
From: Li Jun
For A-device, when load gadget driver, we should not run udc either as this
will be controlled by otg fsm.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c |5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb
On Mon, Feb 09, 2015 at 03:22:17PM +0800, Peter Chen wrote:
> On Mon, Feb 09, 2015 at 02:45:30PM +0800, Li Jun wrote:
> > From: Li Jun
> >
> > This patch adds runtime power management support for otg fsm mode, since
> > A-device in a_idle state cannot detect data puls
From: Li Jun
This patch adds runtime power management support for otg fsm mode, since
A-device in a_idle state cannot detect data pulse irq after suspended, here
enable wakeup by connection before suspend to make it can be resumed by DP;
and handle wakeup from that state like SRP.
Signed-off-by
From: Li Jun
Current otg fsm timers are using controller 1ms irq and count it, this patch
is to replace it with hrtimer solution, use one hrtimer for all otg timers.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/ci.h | 10 +-
drivers/usb/chipidea/otg_fsm.c | 365
From: Li Jun
B_DATA_PLS(data-line pulse time) and B_SSEND_SRP(session end to SRP init) are
also from OTG&EH 2.0 Specification and they are not chipidea specific.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c |8
drivers/usb/chipidea/otg_fsm.h |
From: Li Jun
Since BSV irq is enabled for B-device all the time, so B_SESS_VLD timer
is not required, and also no need to check BSV status when B_ASE0_BRST
timer timeout.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c | 31 +--
drivers/usb/chipidea
From: Li Jun
This patch adds runtime power management support for otg fsm mode, since
A-device in a_idle state cannot detect data pulse irq after suspended, here
enable wakeup by connection before suspend to make it can be resumed by DP;
and handle wakeup from that state like SRP.
Signed-off-by
ry to dequeue a request that has already
> completed much more frequently than one which is pending.
>
> Cc: Li Jun
> Signed-off-by: Felipe Balbi
> ---
>
> Greg, can you still apply this for v3.17 final ? Please take it as a patch
> directly so we avoid a pull request f
rdware can
access the buffer's memory anytime before the request's complettion rountine
runs, and usb_ep_dequeue always call the complettion rountine before it returns,
so the best way is to dequeue the request before free its buffer.
Suggested-by: Felipe Balbi
Signed-off-by: Li Jun
On Wed, Aug 27, 2014 at 01:56:36PM -0500, Felipe Balbi wrote:
> Hi,
>
> On Mon, Aug 25, 2014 at 04:49:12PM +0800, Li Jun wrote:
> > As Felipe suggested, dequeue the cdev->req before free its buffer.
> >
> > Suggested-by: Felipe Balbi
> > Signed-off-by: Li
As Felipe suggested, dequeue the cdev->req before free its buffer.
Suggested-by: Felipe Balbi
Signed-off-by: Li Jun
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 6935a82..4514e73 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gad
This patch try to dequeue the cdev->req to guarantee the request is not queued
before free it.
Signed-off-by: Li Jun
---
drivers/usb/gadget/composite.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index f801519..6935
On Wed, Jul 02, 2014 at 11:49:07AM -0500, Felipe Balbi wrote:
> On Mon, May 19, 2014 at 01:55:42PM +0800, Li Jun wrote:
> > From: Li Jun
> >
> > Hi Felipe,
> >
> > This patchset adds otg HNP polling common part for otg fsm.
>
> awesome :-) How have you te
From: Li Jun
This patch sets host request flag in sys input when a A device
set a_bus_req or a B device set b_bus_req in peripheral role.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/usb
From: Li Jun
This patchset adds chipidea driver part of otg HNP polling support.
Change since v1 for patch:
usb: chipidea: udc: add OTG status request handling
- Correct the OTG status request length to be 1 byte.
Li Jun (3):
usb: chipidea: udc: add OTG status request handling
usb
From: Li Jun
Peripheral answers OTG status selector request from host according to
host request flag of gadget, length is 1. this flag may be set by application
via kernel interface.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 22 +-
1 file changed, 17
From: Li Jun
This patch adds HNP polling support for chipidea otg fsm driver, which
adds a SW timer to send HNP polling request.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/ci.h |2 ++
drivers/usb/chipidea/otg_fsm.c | 32 ++--
drivers/usb/chipidea
From: Li Jun
This patch adds OTG status selector request sending function, can be used
to poll peripheral if it wants to be host after OTG port is in host state.
Signed-off-by: Li Jun
---
drivers/usb/common/usb-otg-fsm.c | 55 ++
include/linux/usb/otg
From: Li Jun
This patchset adds otg HNP polling common part for otg fsm.
Change since v1 for patch:
usb: common: otg-fsm: add HNP polling request sending funciton
- Use usb_control_msg to get OTG status, since the status length
is 1 byte, which is different with all other existing usb status
From: Li Jun
This patch adds host_request_flag in usb_gadget to store host request from
application, clear the flag when otg leaves host state.
Signed-off-by: Li Jun
---
drivers/usb/common/usb-otg-fsm.c |4
include/linux/usb/gadget.h |1 +
2 files changed, 5 insertions
From: Li Jun
This patch starts HNP polling timer when otg is set to be a_host
or b_host.
Signed-off-by: Li Jun
---
drivers/usb/common/usb-otg-fsm.c |2 ++
include/linux/usb/otg-fsm.h |1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers
From: Li Jun
Hi Peter,
This patchset adds chipidea driver part of otg HNP polling support.
Li Jun (3):
usb: chipidea: udc: add OTG status request handling.
usb: chipidea: otg_fsm: add HNP polling support
usb: chipidea: set host request flag via sys input
drivers/usb/chipidea/ci.h
From: Li Jun
This patch sets host request flag in sys input when a A device
set a_bus_req or a B device set b_bus_req in peripheral role.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/usb
From: Li Jun
This patch adds HNP polling support for chipidea otg fsm driver, which
adds a SW timer to send HNP polling request.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/ci.h |2 ++
drivers/usb/chipidea/otg_fsm.c | 32 ++--
drivers/usb/chipidea
: Li Jun
---
drivers/usb/chipidea/udc.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index d683968..4564936 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -823,8 +823,16
From: Li Jun
This patch adds HNP polling support for chipidea otg fsm driver, which
adds a SW timer to send HNP polling request.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/ci.h |2 ++
drivers/usb/chipidea/otg_fsm.c | 32 ++--
drivers/usb/chipidea
Peripheral answers OTG status selector request from host according to
host request flag of gadget, this flag may be set by application via
kernel interface.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a
From: Li Jun
Hi Peter,
This patchset adds chipidea driver part of otg HNP polling support.
Li Jun (3):
usb: chipidea: udc: add OTG status request handling.
usb: chipidea: otg_fsm: add HNP polling support
usb: chipidea: set host request flag via sys input
drivers/usb/chipidea/ci.h
From: Li Jun
This patch sets host request flag in sys input when a A device
set a_bus_req or a B device set b_bus_req in peripheral role.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg_fsm.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/usb
From: Li Jun
This patch adds OTG status selector request sending function, can be called
by HNP polling timer function after OTG port is in host state.
Signed-off-by: Li Jun
---
drivers/usb/common/usb-otg-fsm.c | 47 ++
include/linux/usb/otg-fsm.h
From: Li Jun
This patch adds host_request_flag in usb_gadget to store host request from
application, clear the flag when otg leaves host state.
Signed-off-by: Li Jun
---
drivers/usb/common/usb-otg-fsm.c |4
include/linux/usb/gadget.h |1 +
2 files changed, 5 insertions
From: Li Jun
This patch starts HNP polling timer when otg is set to be a_host
or b_host.
Signed-off-by: Li Jun
---
drivers/usb/common/usb-otg-fsm.c |2 ++
include/linux/usb/otg-fsm.h |1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers
From: Li Jun
Hi Felipe,
This patchset adds otg HNP polling common part for otg fsm.
Li Jun (3):
usb: common: otg-fsm: start HNP polling timer in host state
usb: common: otg-fsm: add HNP polling request sending funciton
usb: common: otg-fsm: add host_request_flag in usb_gadget
drivers
ot wanting more here,
this dual role functionality actually is not the part of "CONFIG_USB_OTG";
What USB_OTG + USB_OTG_FSM does is *specific* for HNP and SRP, it's based on
OTG spec and will *not* work well with a normal usb device, that's the reason
behind in disable USB_OTG,
bool "Rely on OTG Targeted Peripherals List"
> depends on USB_OTG || EXPERT
> - default y if USB_OTG
> help
> If you say Y here, the "otg_whitelist.h" file will be used as a
> product whitelist, so USB peripherals not listed there will be
>
> Shawn
As Peter suggested, do not enable OTG_FSM in defconfig since there are very few
HNP&SRP capable device in market. With OTG_FSM enabled, even USB_OTG_WHITELIST
is not selected, the OTG port still can't work the same as before if you connect
a normal usb device to it.
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
From: Li Jun
This patch adds a debug file for OTG vairables show.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/debug.c | 84 ++
1 file changed, 84 insertions(+)
diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c
index 5b890c1
This patch adds OTG fsm related initialization when do otg init,
add a seperate file for OTG fsm related utilities.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/Makefile |1 +
drivers/usb/chipidea/ci.h | 17 +++
drivers/usb/chipidea/otg.c |4 +++
drivers/usb
From: Li Jun
USB OTG interrupt handling and fsm transitions according to USB OTG
and EH 2.0.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/core.c| 24 +++-
drivers/usb/chipidea/otg.c |9 +-
drivers/usb/chipidea/otg_fsm.c | 243
drivers
From: Li Jun
This patch exports symbol of otg_statemachine for kernel module
can use it.
Signed-off-by: Li Jun
---
drivers/usb/phy/phy-fsm-usb.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/phy/phy-fsm-usb.c b/drivers/usb/phy/phy-fsm-usb.c
index c47e5a6..a62d8c8 100644
Init otg_port number of otg capable host to be 1 at host start.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/host.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index ffb4168..a93d950 100644
--- a
Add b_hnp_enable request handling and enable gadget->is_otg
Acked-by: Peter Chen
Signed-off-by: Li Jun
---
drivers/usb/chipidea/udc.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index f58857d..cba7
From: Li Jun
This patch adds OTG fsm timers initialization, which use controller's 1ms
interrupt as timeout counter, also adds some local timers which are not
in otg_fsm_timer list.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/bits.h|1 +
drivers/usb/chipidea/otg_fsm.c |
From: Li Jun
This patch adds sys input to control and show OTG fsm inputs by application,
user can do host and preipheral role switch by change these inputs.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/otg.c |2 +
drivers/usb/chipidea/otg_fsm.c | 173
Leave vbus on/off hanlded by OTG fsm if in OTG mode.
Signed-off-by: Li Jun
---
drivers/usb/chipidea/host.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index a8ac6c1..ffb4168 100644
--- a/drivers/usb
From: Li Jun
This patch adds a file chipidea.txt for how to demo chipidea usb OTG HNP and SRP
functions via sysfs input files, any other possible information should be
documented for chipidea usb driver in future can be added into this file.
Signed-off-by: Li Jun
---
Documentation/usb
501 - 600 of 791 matches
Mail list logo