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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2016-01-25 Thread Li Jun
If gadget with HNP polling support receives GetStatus request of otg status selector, it feedback to host with host request flag to indicate if it wants to take host role. Acked-by: Peter Chen Signed-off-by: Li Jun --- drivers/usb/gadget/composite.c | 25 + 1 file

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2016-02-18 Thread Li Jun
this timing issue. Acked-by: Peter Chen 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

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

2016-02-18 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. Acked-by: Peter Chen Signed-off-by: Li Jun --- include/linux/usb/otg-fsm.h | 1 + 1 file changed, 1

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

2016-02-18 Thread Li Jun
If gadget with HNP polling support receives GetStatus request of otg status selector, it feedback to host with host request flag to indicate if it wants to take host role. Acked-by: Peter Chen Signed-off-by: Li Jun --- drivers/usb/gadget/composite.c | 25 + 1 file

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

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

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

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

[PATCH 1/2] doc: usb: usbmisc-imx: add imx7d compatible string

2016-07-12 Thread Li Jun
Add compatible string for imx7d-usbmisc. Signed-off-by: Li Jun --- Documentation/devicetree/bindings/usb/usbmisc-imx.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt b/Documentation/devicetree/bindings/usb/usbmisc-imx.txt index

[PATCH 2/2] usb: chipidea: usbmisc: set over current polarity for imx6 and imx7

2016-07-12 Thread Li Jun
As all usb power supply use low active for over current flag on imx6 imx7 boards, and the default register setting(0) is for high active, this patch is to correct it. Signed-off-by: Li Jun --- drivers/usb/chipidea/usbmisc_imx.c | 18 -- 1 file changed, 16 insertions(+), 2

[PATCH 1/4] doc: usb: usbmisc-imx: add imx7d compatible string

2016-07-18 Thread Li Jun
Add compatible string for imx7d-usbmisc. Signed-off-by: Li Jun --- Documentation/devicetree/bindings/usb/usbmisc-imx.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt b/Documentation/devicetree/bindings/usb/usbmisc-imx.txt index

[PATCH 4/4] usb: chipidea: imx: set over current polarity per dts setting

2016-07-18 Thread Li Jun
With over-current-polarity property added, imx usb over current polarity can be configed to be low or high active, since the default setting value(0) is for active high, so keep this setting for those legacy platforms without this property specified. Signed-off-by: Li Jun --- drivers/usb

[PATCH 2/4] doc: usb: ci-hdrc-usb2: add property over-current-polarity

2016-07-18 Thread Li Jun
Adding over-current-polarity to indicate the over current flag is low active or high active. Signed-off-by: Li Jun --- Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b

[PATCH 3/4] ARM: dts: imx7d-sdb: Set OTG2 oc polarity to be active low

2016-07-18 Thread Li Jun
Set OTG2 over current flag to be active low, OTG1 OC is not used by default. Signed-off-by: Li Jun --- arch/arm/boot/dts/imx7d-sdb.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/imx7d-sdb.dts b/arch/arm/boot/dts/imx7d-sdb.dts index b267f79..44ed399 100644

[PATCH v2 2/3] doc: usb: ci-hdrc-usb2: add property over-current-active-high

2016-07-20 Thread Li Jun
Adding over-current-active-high to indicate the over current flag is high active as typically we use active low for over current polarity. Signed-off-by: Li Jun --- Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation

[PATCH v2 1/3] doc: usb: usbmisc-imx: add imx7d compatible string

2016-07-20 Thread Li Jun
Add compatible string for imx7d-usbmisc. Acked-by: Rob Herring Signed-off-by: Li Jun --- Documentation/devicetree/bindings/usb/usbmisc-imx.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/usbmisc-imx.txt b/Documentation/devicetree/bindings/usb

[PATCH v2 3/3] usb: chipidea: imx: set over current polarity per dts setting

2016-07-20 Thread Li Jun
current is enabled. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci_hdrc_imx.c | 3 +++ drivers/usb/chipidea/ci_hdrc_imx.h | 1 + drivers/usb/chipidea/usbmisc_imx.c | 22 +- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b

[PATCH] usb: chipidea: udc: don't touch DP when controller is in host mode

2016-08-11 Thread Li Jun
When the controller is configured to be dual role and it's in host mode, if bind udc and gadgt driver, those gadget operations will do gadget disconnect and finally pull down DP line, which will break host function. Signed-off-by: Li Jun --- drivers/usb/chipidea/udc.c | 7 +-- 1

[PATCH v2] usb: chipidea: udc: don't touch DP when controller is in host mode

2016-08-16 Thread Li Jun
When the controller is configured to be dual role and it's in host mode, if bind udc and gadgt driver, those gadget operations will do gadget disconnect and finally pull down DP line, which will break host function. Cc: # 4.1+ Signed-off-by: Li Jun --- drivers/usb/chipidea/udc.c | 7 +

[PATCH 0/5] usb: chipidea: Add usb charger detection support

2016-04-18 Thread Li Jun
ed set pull_dp_for_charger flag, tested with i.mx7d, support for i.mx6 will be added later. This patch set is based on Baolin's usb charger framework: http://comments.gmane.org/gmane.linux.power-management.general/74394 Li Jun (5): usb: chipidea: add usb charger detection support usb: ch

[PATCH 2/5] usb: chipidea: imx: add usb charger dectection for imx platforms

2016-04-18 Thread Li Jun
Some imx usb charger dectection need software implement the whole process, during which, pull up&down DP line via usb core is required. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci_hdrc_imx.c | 43 ++ drivers/usb/chipidea/ci_hdrc_imx.h | 3 +++ dri

[PATCH 1/5] usb: chipidea: add usb charger detection support

2016-04-18 Thread Li Jun
Some usb module implementations has functionality of detect usb charger type, it can be used by usb charger framework to report max current drawn from charger in different situations. Signed-off-by: Li Jun --- drivers/usb/chipidea/udc.c | 40 include

[PATCH 5/5] doc: usb: ci-hdrc-usb2: add property usb-charger-detection

2016-04-18 Thread Li Jun
Set this property if your usb module has usb charger detect function and you want to use it. Signed-off-by: Li Jun --- Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b

[PATCH 3/5] usb: chipidea: imx: add imx7d usbmisc compatible string

2016-04-18 Thread Li Jun
Add imx7d usbmisc compatible string. Signed-off-by: Li Jun --- drivers/usb/chipidea/usbmisc_imx.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c index 3d70712..daa7c02 100644 --- a/drivers/usb/chipidea

[PATCH 4/5] usb: chipidea: imx: add usb charger detection for imx7d

2016-04-18 Thread Li Jun
Adds imx7d usb charger detection implementation, which needs pull up DP line before do secondary detection and pull down DP afterwards. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci_hdrc_imx.c | 3 +- drivers/usb/chipidea/usbmisc_imx.c | 157 + 2 files

[PATCH v2 2/4] usb: chipidea: imx: add usb charger dectection for imx platforms

2016-04-26 Thread Li Jun
Some imx usb charger dectection need software implement the whole process, during which, pull up&down DP line via chipidea usb core is required. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci_hdrc_imx.c | 44 ++ drivers/usb/chipidea/ci_hdrc_imx.h

[PATCH v2 3/4] usb: chipidea: imx: add usb charger detection for imx7d

2016-04-26 Thread Li Jun
Adds imx7d usb charger detection implementation, which needs pull up DP line before do secondary detection and pull down DP afterwards. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci_hdrc_imx.c | 3 +- drivers/usb/chipidea/usbmisc_imx.c | 161 + 2 files

[PATCH v2 1/4] usb: chipidea: add usb charger detection support

2016-04-26 Thread Li Jun
Some usb module implementations have functionality of detect usb charger type, it can be used by usb charger framework to report max current drawn from charger in different situations. Signed-off-by: Li Jun --- drivers/usb/chipidea/udc.c | 40 include

[PATCH v2 4/4] doc: usb: ci-hdrc-usb2: add property usb-charger-detection

2016-04-26 Thread Li Jun
Set this property if your usb module has usb charger detect function and you want to use it. Signed-off-by: Li Jun --- Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b

[PATCH v2 0/4] usb: chipidea: Add usb charger detection support

2016-04-26 Thread Li Jun
name to be more readable, - Add comments for 2 added api and 1 flag in ci_hdrc_platform_data. Li Jun (4): usb: chipidea: add usb charger detection support usb: chipidea: imx: add usb charger dectection for imx platforms usb: chipidea: imx: add usb charger detection for imx7d doc: usb: ci-hdr

[PATCH] usb: chipidea: udc: update gadget state after bus resume

2017-03-06 Thread Li Jun
Gadget state is set to be suspended when bus suspened, but not updated after resume, this patch saves the gadget state before suspend and restores it after resume. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci.h | 2 ++ drivers/usb/chipidea/udc.c | 21 + 2 files

[PATCH 03/10] usb: chipidea: host:vbus control change for OTG HNP.

2014-01-08 Thread Li Jun
Leave vbus on/off hanlded by OTG fsm if in OTG mode, init OTG port number. Signed-off-by: Li Jun --- drivers/usb/chipidea/host.c | 13 + drivers/usb/chipidea/host.h |9 + 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/usb/chipidea/host.c b

[PATCH 02/10] usb: chipidea: usb OTG fsm initlization.

2014-01-08 Thread Li Jun
This patch adds OTG fsm related initizations 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 |1 + drivers/usb/chipidea/otg.c |6 +++ drivers/usb/chipidea/otg_fsm.c

[PATCH 04/10] usb: chipidea: udc:driver update for OTG HNP.

2014-01-08 Thread Li Jun
Add b_hnp_enable request handling and enable gadget->is_otg Signed-off-by: Li Jun --- drivers/usb/chipidea/udc.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 73a39ef..ccdc277 100644 --

[PATCH 00/10] usb: chipidea: Add USB OTG HNP and SRP support on Chipidea usb driver.

2014-01-08 Thread Li Jun
. Reference to: "On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification July 27, 2012 Revision 2.0 version 1.1a" Li Jun (10): usb: otg-fsm: update OTG HNP state transition conditions according to OTG and EH 2.0 spec. usb: chipidea: usb OTG fsm initlizat

[PATCH 01/10] usb: phy-fsm: update OTG HNP state transition conditions according to OTG and EH 2.0 spec.

2014-01-08 Thread Li Jun
a_idle if a_wait_vfall_tmout Signed-off-by: Li Jun --- drivers/usb/phy/phy-fsm-usb.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/phy/phy-fsm-usb.c b/drivers/usb/phy/phy-fsm-usb.c index 7aa314e..c47e5a6 100644 --- a/drivers/usb/phy/phy-fsm-usb.c +++ b/drivers/u

[PATCH 08/10] usb: chipidea: add OTG HNP polling support.

2014-01-08 Thread Li Jun
This patch add OTG HNP polling support for both A and B device. After A/B in host state, host request polling message will be sent from host to peripheral every 1.5s, if host found the host request flag is set to be 1 by peripheral, a role switch will be started. Signed-off-by: Li Jun

[PATCH 10/10] usb: chipidea: debug: add debug file for OTG variables show and registers dump.

2014-01-08 Thread Li Jun
This patch add a debug file for OTG vairables show and registers dump. Signed-off-by: Li Jun --- drivers/usb/chipidea/debug.c | 100 ++ 1 files changed, 100 insertions(+), 0 deletions(-) diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea

[PATCH 07/10] usb: chipidea: OTG HNP and SRP fsm implementation.

2014-01-08 Thread Li Jun
USB OTG interrupt handling and fsm transition according to USB OTG spec 2.0, update otg timer time out handlers. Signed-off-by: Li Jun --- drivers/usb/chipidea/bits.h|3 + drivers/usb/chipidea/core.c| 10 ++- drivers/usb/chipidea/otg.c |6 + drivers/usb/chipidea/otg_fsm.c

[PATCH 06/10] usb: chipidea: OTG fsm timers initialization.

2014-01-08 Thread Li Jun
This patch adds OTG fsm timers initialization, which use controller's 1ms interrupt as time out counter, also adds some local timers which are not in otg_fsm_timer list. Signed-off-by: Li Jun --- drivers/usb/chipidea/otg_fsm.c | 111 +++- driver

[PATCH 05/10] usb: chipidea: add OTG fsm operation functions implemenation.

2014-01-08 Thread Li Jun
Add OTG HNP and SRP operation functions implementation: - charge vbus - drive vbus - connection signaling - drive sof - start data pulse - add fsm timer - delete fsm timer - start host - start gadget Signed-off-by: Li Jun --- drivers/usb/chipidea/bits.h| 11 ++ drivers/usb/chipidea

[PATCH 09/10] usb: chipidea: add sys inputs for OTG fsm input.

2014-01-08 Thread 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 |1 + drivers/usb/chipidea/otg_fsm.c | 204

[PATCH v2 7/9] usb: chipidea: OTG HNP and SRP fsm implementation.

2014-01-19 Thread Li Jun
USB OTG interrupt handling and fsm transition according to USB OTG spec 2.0, update otg timer timeout handlers. Signed-off-by: Li Jun --- drivers/usb/chipidea/bits.h|2 + drivers/usb/chipidea/core.c| 10 ++- drivers/usb/chipidea/otg.c |9 ++- drivers/usb/chipidea/otg_fsm.c

[PATCH v2 4/9] usb: chipidea: udc: driver update for OTG HNP.

2014-01-19 Thread Li Jun
Add b_hnp_enable request handling and enable gadget->is_otg Signed-off-by: Li Jun --- drivers/usb/chipidea/udc.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 80de2f8..b08ab1d 100644 --

[PATCH v2 9/9] usb: chipidea: debug: add debug file for OTG variables show and registers dump.

2014-01-19 Thread Li Jun
This patch add a debug file for OTG vairables show and registers dump. Signed-off-by: Li Jun --- drivers/usb/chipidea/debug.c | 102 ++ 1 files changed, 102 insertions(+), 0 deletions(-) diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea

[PATCH v2 0/9] Add USB OTG HNP and SRP support on Chipidea usb driver

2014-01-19 Thread Li Jun
can exist in one system - Change some otg fsm functions to be static - Re-split timer init patch to avoid a later patch changing a previous one in the same series - Change timer structure memory allocation to be devm_kzalloc - Update some format alignment and spelling errors Li Jun (9): us

[PATCH v2 6/9] usb: chipidea: OTG fsm timers initialization.

2014-01-19 Thread 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 |

[PATCH v2 3/9] usb: chipidea: host: vbus control change for OTG HNP.

2014-01-19 Thread Li Jun
Leave vbus on/off hanlded by OTG fsm if in OTG mode, init OTG port number. Signed-off-by: Li Jun --- drivers/usb/chipidea/host.c | 13 + drivers/usb/chipidea/host.h |9 + 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/usb/chipidea/host.c b

[PATCH v2 2/9] usb: chipidea: usb OTG fsm initlization.

2014-01-19 Thread Li Jun
This patch adds OTG fsm related initizations 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 |1 + drivers/usb/chipidea/otg.c |7 drivers/usb/chipidea

[PATCH v2 5/9] usb: chipidea: add OTG fsm operation functions implemenation.

2014-01-19 Thread Li Jun
Add OTG HNP and SRP operation functions implementation: - charge vbus - drive vbus - connection signaling - drive sof - start data pulse - add fsm timer - delete fsm timer - start host - start gadget Signed-off-by: Li Jun --- drivers/usb/chipidea/bits.h| 11 ++ drivers/usb/chipidea/ci.h

[PATCH v2 1/9] usb: phy-fsm: update OTG HNP state transition conditions according to OTG and EH 2.0 spec.

2014-01-19 Thread Li Jun
a_idle if a_wait_vfall_tmout Signed-off-by: Li Jun --- drivers/usb/phy/phy-fsm-usb.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/phy/phy-fsm-usb.c b/drivers/usb/phy/phy-fsm-usb.c index 7aa314e..c47e5a6 100644 --- a/drivers/usb/phy/phy-fsm-usb.c +++ b/drivers/u

[PATCH v2 8/9] usb: chipidea: add sys inputs for OTG fsm input.

2014-01-19 Thread 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 |1 + drivers/usb/chipidea/otg_fsm.c | 192

[PATCH v2 1/6] usb: otg-fsm: add HNP polling operation function.

2014-01-19 Thread Li Jun
This patch adds HNP polling operation function for OTG fsm. Signed-off-by: Li Jun --- drivers/usb/phy/phy-fsm-usb.c |2 ++ include/linux/usb/otg-fsm.h |9 + 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/usb/phy/phy-fsm-usb.c b/drivers/usb/phy/phy-fsm

[PATCH v2 0/6] usb: chipidea: add OTG HNP polling support.

2014-01-19 Thread Li Jun
the HNP polling patch in V1([PATCH 08/10] usb: chipidea: add OTG HNP polling support) Li Jun (6): usb: otg-fsm: add HNP polling operation function. usb: otg-fsm: add host request flag for HNP polling. usb: chipidea: udc: add OTG status request handling. usb: chipidea: set host request flag

[PATCH v2 2/6] usb: otg-fsm: add host request flag for HNP polling.

2014-01-19 Thread Li Jun
This patch adds host request flag in usb_gadget and clears it when leaves host state in OTG fsm driver, which will be set in gadget driver if the peripheral wishes to become host. Signed-off-by: Li Jun --- drivers/usb/phy/phy-fsm-usb.c |4 include/linux/usb/gadget.h|1

[PATCH v2 4/6] usb: chipidea: set host request flag via sys input.

2014-01-19 Thread 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 | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/drivers/usb/chipidea

[PATCH v2 3/6] usb: chipidea: udc: add OTG status request handling.

2014-01-19 Thread Li Jun
Peripheral answers OTG status selector request from host according to host request flag of gadget, this flag may be set via kernel interface by application. Signed-off-by: Li Jun --- drivers/usb/chipidea/udc.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a

[PATCH v2 6/6] usb: chipidea: OTG fsm driver HNP polling implementation.

2014-01-19 Thread Li Jun
This patch implements OTG host request polling and does role switch when peripheral sets the host request flag. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci.h |1 + drivers/usb/chipidea/otg_fsm.c | 81 drivers/usb/chipidea/otg_fsm.h

[PATCH v2 5/6] usb: otg-fsm: add a timer for polling host request flag from peripheral.

2014-01-19 Thread Li Jun
This patch adds a timer in otg_fsm structure, with this timer, host can query the peripheral if it wishes to become host periodically. Signed-off-by: Li Jun --- include/linux/usb/otg-fsm.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/usb/otg-fsm.h b

Re: [PATCH v2 5/9] usb: chipidea: add OTG fsm operation functions implemenation.

2014-02-08 Thread Li Jun
un "git am --skip". > To restore the original branch and stop patching run "git am --abort". > > Peter > I rebased my patchset to be latest greg's usb-next just now, no conflicts or error found. > On Mon, Jan 20, 2014 at 09:56:16AM +0800, Li Jun wrote: &g

Re: [PATCH v2 3/9] usb: chipidea: host: vbus control change for OTG HNP.

2014-02-08 Thread Li Jun
On Sat, Feb 08, 2014 at 03:04:52PM +0800, Peter Chen wrote: > On Mon, Jan 20, 2014 at 09:56:14AM +0800, Li Jun wrote: > > Leave vbus on/off hanlded by OTG fsm if in OTG mode, init OTG port number. > > > > It is better split this to two patches, one for vbus, another is for &

Re: [PATCH v2 0/9] Add USB OTG HNP and SRP support on Chipidea usb driver

2014-02-08 Thread Li Jun
On Sat, Feb 08, 2014 at 03:00:35PM +0800, Peter Chen wrote: > On Mon, Jan 20, 2014 at 09:56:11AM +0800, Li Jun wrote: > > This patchset adds USB OTG HNP and SRP support on chipidea usb driver, > > existing OTG port role swtich function by ID pin status kept unchanged, > > bas

[PATCH v3 00/13] Add USB OTG HNP and SRP support on Chipidea usb driver

2014-02-26 Thread Li Jun
in ci_hdrc, to make multiple OTG instances can exist in one system - Change some otg fsm functions to be static - Re-split timer init patch to avoid a later patch changing a previous one in the same series - Change timer structure memory allocation to be devm_kzalloc - Update some format alignment and

[PATCH v3 01/13] usb: phy-fsm: update OTG HNP state transition conditions according to OTG and EH 2.0 spec.

2014-02-26 Thread Li Jun
a_idle if a_wait_vfall_tmout Signed-off-by: Li Jun --- drivers/usb/phy/phy-fsm-usb.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/phy/phy-fsm-usb.c b/drivers/usb/phy/phy-fsm-usb.c index 7aa314e..c47e5a6 100644 --- a/drivers/usb/phy/phy-fsm-usb.c +++ b/drivers/u

[PATCH v3 06/13] usb: chipidea: export interrupt enable and status register read functions.

2014-02-26 Thread Li Jun
This patch move usb interrupt enable and status register read functions from udc driver to core driver to use them in all ci drivers. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci.h |4 drivers/usb/chipidea/core.c | 20 drivers/usb/chipidea/udc.c | 20

[PATCH v3 03/13] usb: chipidea: host: vbus control change for OTG HNP.

2014-02-26 Thread Li Jun
Leave vbus on/off hanlded by OTG fsm if in OTG mode. Signed-off-by: Li Jun --- drivers/usb/chipidea/host.c |6 +++--- drivers/usb/chipidea/host.h |9 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index

[PATCH v3 05/13] usb: chipidea: udc: driver update for OTG HNP.

2014-02-26 Thread Li Jun
Add b_hnp_enable request handling and enable gadget->is_otg 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 fe30dcc..602bbf3 100644 --- a/driv

[PATCH v3 04/13] usb: chipidea: host: init otg port number.

2014-02-26 Thread Li Jun
Init otg_port number of otg capable host to be 1 at host start. Signed-off-by: Li Jun --- drivers/usb/chipidea/host.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index 4b609bc..5ec8ccd 100644 --- a

[PATCH v3 02/13] usb: chipidea: usb OTG fsm initialization.

2014-02-26 Thread Li Jun
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 |1 + drivers/usb/chipidea/otg.c |7 + drivers/usb/chipidea

[PATCH v3 07/13] usb: chipidea: add OTG fsm operation functions implemenation.

2014-02-26 Thread Li Jun
Add OTG HNP and SRP operation functions implementation: - charge vbus - drive vbus - connection signaling - drive sof - start data pulse - add fsm timer - delete fsm timer - start host - start gadget Signed-off-by: Li Jun --- drivers/usb/chipidea/bits.h| 11 ++ drivers/usb/chipidea/ci.h

[PATCH v3 13/13] Documentation: ABI: usb: chipidea USB OTG HNP sysfs interface description.

2014-02-26 Thread Li Jun
This patch adds sysfs interface description for chipidea USB OTG role switch in HNP. Signed-off-by: Li Jun --- .../ABI/testing/sysfs-platform-chipidea-usb-otg| 55 1 file changed, 55 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-platform-chipidea-usb-otg

[PATCH v3 09/13] usb: chipidea: OTG HNP and SRP fsm implementation.

2014-02-26 Thread Li Jun
USB OTG interrupt handling and fsm transition according to USB OTG and EH 2.0, update otg timer timeout handlers. Signed-off-by: Li Jun --- drivers/usb/chipidea/core.c| 10 ++- drivers/usb/chipidea/otg.c |9 +- drivers/usb/chipidea/otg_fsm.c | 191

[PATCH v3 10/13] usb: chipidea: add sys inputs for OTG fsm input.

2014-02-26 Thread 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 |1 + drivers/usb/chipidea/otg_fsm.c | 192

[PATCH v3 08/13] usb: chipidea: OTG fsm timers initialization.

2014-02-26 Thread 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 |

[PATCH v3 11/13] usb: chipidea: debug: add debug file for OTG variables show.

2014-02-26 Thread Li Jun
This patch adds a debug file for OTG vairables show. Signed-off-by: Li Jun --- drivers/usb/chipidea/debug.c | 85 ++ 1 file changed, 85 insertions(+) diff --git a/drivers/usb/chipidea/debug.c b/drivers/usb/chipidea/debug.c index 96d899a..06be301 100644

[PATCH v3 12/13] usb: chipidea: debug: add debug file for controller registers dump.

2014-02-26 Thread Li Jun
This patch adds below registers dump for debug: - USBINTR - USBSTS - USBMODE - USBCMD - PORTSC - OTGSC Signed-off-by: Li Jun --- drivers/usb/chipidea/debug.c | 48 ++ 1 file changed, 48 insertions(+) diff --git a/drivers/usb/chipidea/debug.c b/drivers

Re: [PATCH v2 7/9] usb: chipidea: OTG HNP and SRP fsm implementation.

2014-02-26 Thread Li Jun
On Mon, Feb 10, 2014 at 10:32:24AM +0800, Peter Chen wrote: > On Mon, Jan 20, 2014 at 09:56:18AM +0800, Li Jun wrote: > > USB OTG interrupt handling and fsm transition according to USB OTG > > spec 2.0, update otg timer timeout handlers. > > USB OTG and EH 2.0 > changed.

Re: [PATCH v3 07/13] usb: chipidea: add OTG fsm operation functions implemenation.

2014-03-05 Thread Li Jun
On Wed, Mar 05, 2014 at 04:28:14PM +0800, Peter Chen wrote: > On Thu, Feb 27, 2014 at 07:38:25AM +0800, Li Jun wrote: > > Add OTG HNP and SRP operation functions implementation: > > - charge vbus > > - drive vbus > > - connection signaling > > - drive sof > >

[PATCH 3/3] usb: chipidea: debug: add debug file for controller registers dump.

2014-03-12 Thread Li Jun
This patch adds below registers dump for debug: - USBINTR - USBSTS - USBMODE - USBCMD - PORTSC - OTGSC Signed-off-by: Li Jun --- drivers/usb/chipidea/debug.c | 49 ++ 1 file changed, 49 insertions(+) diff --git a/drivers/usb/chipidea/debug.c b/drivers

[PATCH 2/3] usb: chipidea: export interrupt enable and status register read functions.

2014-03-12 Thread Li Jun
This patch moves usb interrupt enable and status register read functions from udc driver to core driver to use them in all ci drivers. Signed-off-by: Li Jun --- drivers/usb/chipidea/ci.h |4 drivers/usb/chipidea/core.c | 20 drivers/usb/chipidea/udc.c | 20

[PATCH 1/3] usb: chipidea: operate on otgsc register in a general way

2014-03-12 Thread Li Jun
From: Li Jun Use a more general way to read and write otgsc register. Signed-off-by: Li Jun --- drivers/usb/chipidea/core.c | 19 + drivers/usb/chipidea/otg.c | 48 +++ drivers/usb/chipidea/otg.h | 19 +++-- drivers

  1   2   3   4   5   6   7   8   >