Re: [PATCH v12 00/13] Add tested id switch and vbus connect detect support for Chipidea

2013-07-21 Thread Peter Chen
is the same at your board. If it works, please give a tested-by :). -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v12 00/13] Add tested id switch and vbus connect detect support for Chipidea

2013-07-21 Thread Peter Chen
On Mon, Jul 22, 2013 at 03:40:32AM +0200, Marek Vasut wrote: Dear Peter Chen, On Mon, Jul 22, 2013 at 03:15:28AM +0200, Marek Vasut wrote: Hi Peter, On Fri, Jul 12, 2013 at 03:18:31PM +0200, Marek Vasut wrote: Hi Peter, On Fri, Jul 12, 2013 at 06:04:43AM +0200

Re: [PATCH v12 00/13] Add tested id switch and vbus connect detect support for Chipidea

2013-07-25 Thread Peter Chen
the problem? Any changes for this patchset? -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] chipidea: core: Move hw_phymode_configure() into probe

2013-07-25 Thread Peter Chen
. Reviewed-by: Peter Chen peter.c...@freescale.com -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] chipidea: ci_hdrc_imx: Remove unused variable 'res'

2013-07-25 Thread Peter Chen
); if (IS_ERR(data-clk)) { dev_err(pdev-dev, -- 1.8.1.2 Acked-by: Peter Chen peter.c...@freescale.com -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More

[PATCH v13 02/14] usb: chipidea: imx: remove vbus regulator operation

2013-07-26 Thread Peter Chen
Since we have added vbus reguatlor operation at common host file (chipidea/host.c), the glue layer vbus operation isn't needed any more. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/ci_hdrc_imx.c | 30

[PATCH v13 13/14] usb: chipidea: udc: .pullup is valid when vbus is on at CI_HDRC_PULLUP_ON_VBUS

2013-07-26 Thread Peter Chen
-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 45abf4d..b7ead5f 100644 --- a/drivers/usb/chipidea

[PATCH v13 12/14] usb: chipidea: udc: misuse flag CI_HDRC_REGS_SHARED and CI_HDRC_PULLUP_ON_VBUS

2013-07-26 Thread Peter Chen
module), the controller can run if vbus is on (CI_HDRC_PULLUP_ON_VBUS), it also does not relate to shared register. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions

[PATCH v13 01/14] usb: chipidea: add vbus regulator control

2013-07-26 Thread Peter Chen
vbus; when the host role finishes, it closes vbus. We put vbus operation to host as host is the only vbus user, When we are at host mode, the vbus is on, when we are not at host mode, vbus should be off. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com

[PATCH v13 07/14] usb: chipidea: add flag CI_HDRC_DUAL_ROLE_NOT_OTG

2013-07-26 Thread Peter Chen
if the controller is dual role, but not supports OTG. If this flag is not set, we follow the rule that if DCCPARAMS_DC and DCCPARAMS_HC are both 1 at CAP_DCCPARAMS, then this controller is otg capable. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 38

[PATCH v13 08/14] usb: chipidea: disable all interrupts and clear all interrupts status

2013-07-26 Thread Peter Chen
During the initialization, it needs to disable all interrupts enable bit as well as clear all interrupts status bits to avoid exceptional interrupt. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 11 ++- 1 files

[PATCH v13 10/14] usb: chipidea: add vbus interrupt handler

2013-07-26 Thread Peter Chen
We add vbus interrupt handler at ci_otg_work, it uses OTGSC_BSV(at otgsc) to know it is connect or disconnet event. Meanwhile, we introduce two flags id_event and b_sess_valid_event to indicate it is an id interrupt or a vbus interrupt. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter

[PATCH v13 00/14] Add tested id switch and vbus connect detect support for Chipidea

2013-07-26 Thread Peter Chen
that the oops when re-plug in usb cable after rmmod gadget [8/8] Peter Chen (14): usb: chipidea: add vbus regulator control usb: chipidea: imx: remove vbus regulator operation usb: chipidea: imx: add return value check for devm_regulator_get usb: chipidea: udc: otg_set_peripheral is useless

[PATCH v13 04/14] usb: chipidea: udc: otg_set_peripheral is useless for some chipidea users

2013-07-26 Thread Peter Chen
It is useless at below cases: - If we implement both usb host and device at chipidea driver. - If we don't need phy-otg. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c |7 ++- 1 files changed, 6 insertions(+), 1

[PATCH v13 09/14] usb: chipidea: move otg relate things to otg file

2013-07-26 Thread Peter Chen
Move otg relate things to otg file. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 63 +-- drivers/usb/chipidea/otg.c | 57 +- drivers/usb

[PATCH v13 14/14] usb: chipidea: udc: fix the oops when plugs in usb cable after rmmod gadget

2013-07-26 Thread Peter Chen
+0x120/0x148) r9:412fc09a r8:1000406a r7:80712d20 r6:10c03c7d r5:0001 r4:806e2008 Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH v13 05/14] usb: chipidea: otg: Add otg file used to access otgsc

2013-07-26 Thread Peter Chen
This file is mainly used to access otgsc currently, it may add otg related things in the future. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/Makefile |2 +- drivers/usb/chipidea/bits.h | 10 drivers/usb

[PATCH v13 06/14] usb: chipidea: Add role init and destory APIs

2013-07-26 Thread Peter Chen
- The role's init will be called at probe procedure. - The role's destory will be called at fail patch at probe and driver's removal. - The role's start/stop will be called when specific role has started. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com

[PATCH v13 11/14] usb: chipidea: add wait vbus lower than OTGSC_BSV before role starts

2013-07-26 Thread Peter Chen
indicate some hardware problems like the vbus is still higher than OTGSC_BSV after we disconnect to host some time later (5000 milliseconds currently), which is obvious not correct. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea

Chipidea tree is out of date one month

2013-07-29 Thread Peter Chen
. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v13 02/14] usb: chipidea: imx: remove vbus regulator operation

2013-07-29 Thread Peter Chen
On Tue, Jul 30, 2013 at 12:30:25AM +0200, Michael Grzeschik wrote: Hi Peter, On Fri, Jul 26, 2013 at 05:18:18PM +0800, Peter Chen wrote: Since we have added vbus reguatlor operation at common host file (chipidea/host.c), the glue layer vbus operation isn't needed any more. Tested

Re: [PATCH v13 03/14] usb: chipidea: imx: add return value check for devm_regulator_get

2013-07-29 Thread Peter Chen
On Tue, Jul 30, 2013 at 12:47:17AM +0200, Michael Grzeschik wrote: On Fri, Jul 26, 2013 at 05:18:19PM +0800, Peter Chen wrote: - If devm_regulator_get returns -EPROBE_DEFER, we also return -EPROBE_DEFER to wait regulator being ready later. - If devm_regulator_get returns -ENODEV, we think

Re: [PATCH 1/2] usb: chipidea: move vbus regulator operation to core

2013-07-30 Thread Peter Chen
which Felipe mentioned) if you consider it is necessary. I know you may be busy with other things. -- Best Regards, Peter Chen -- 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

Re: [PATCH 1/2] chipidea: Remove previous MODULE_ALIAS

2013-07-30 Thread Peter Chen
= { module_platform_driver(ci_hdrc_driver); MODULE_ALIAS(platform:ci_hdrc); -MODULE_ALIAS(platform:ci13xxx); MODULE_LICENSE(GPL v2); MODULE_AUTHOR(David Lopo dl...@chipidea.mips.com); MODULE_DESCRIPTION(ChipIdea HDRC Driver); -- 1.8.1.2 Fabio, good eyes. Reviewed-by: Peter Chen peter.c

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-30 Thread Peter Chen
*pdev) dbg_remove_files(ci); flush_workqueue(ci-wq); destroy_workqueue(ci-wq); - free_irq(ci-irq, ci); ci_role_stop(ci); return 0; -- 1.8.1.2 Reviewed-by: Peter Chen peter.c...@freescale.com -- Best Regards, Peter Chen -- To unsubscribe from

Re: [PATCH 1/2] usb: chipidea: move vbus regulator operation to core

2013-07-31 Thread Peter Chen
On Wed, Jul 31, 2013 at 09:23:56AM +0200, Michael Grzeschik wrote: Hi Peter, On Wed, Jul 31, 2013 at 09:39:50AM +0800, Peter Chen wrote: On Tue, Jul 30, 2013 at 02:41:23PM +0200, Michael Grzeschik wrote: From: Michael Grzeschik m...@pengutronix.de This patch moves the regulator

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Peter Chen
after driver's removal is called, then the problem Mark described will occur. See __device_release_driver(struct device *dev) at drivers/base/dd.c. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Peter Chen
wrong if there is an odd (unexpected) interrupt after we finish deactivation at removal. -- BR, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] chipidea: Use devm_request_irq()

2013-07-31 Thread Peter Chen
On Wed, Jul 31, 2013 at 10:15:12AM -0400, Tejun Heo wrote: hello, On Wed, Jul 31, 2013 at 09:55:26PM +0800, Peter Chen wrote: I think the main point is we should allocate managed resource which is used at interrupt handler before devm_request_irq, and all resources used at interrupt

Re: [PATCH 1/4] usb: chipidea: improve kconfig 2.0

2013-07-31 Thread Peter Chen
) + depends on USB_EHCI_HCD select USB_EHCI_ROOT_HUB_TT help Say Y here to enable host controller functionality of the -- Reviewed-by: Peter Chen peter.c...@freescale.com Hi Alex, Lothar's solution is better than mine, please forget mine: http://marc.info/?l=linux-usbm

Re: [PATCH 2/4] usb: chipidea: ci_hdrc_imx: remove an unsolicited module_put() call from ci_hdrc_imx_remove()

2013-08-01 Thread Peter Chen
you met warning? devm_usb_get_phy_by_phandle at probe calls try_module_get. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 3/4] usb: chipidea: don't clobber return value of ci_role_start()

2013-08-01 Thread Peter Chen
); - ret = -ENODEV; goto rm_wq; } +1, it can help get the error one time, without need to add the code and get the error number from ci_role_start again. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb

Re: [PATCH 4/4] usb: chipidea: Prevent endless loop registering platform_devices when ci_hdrc_probe() fails.

2013-08-01 Thread Peter Chen
and trigger a new invocation of ci_hdrc_imx_probe() ... ad nauseam. Sorry, I can't understand how it happenes? -- Best Regards, Peter Chen -- 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

Re: [PATCH 2/4] usb: chipidea: ci_hdrc_imx: remove an unsolicited module_put() call from ci_hdrc_imx_remove()

2013-08-01 Thread Peter Chen
On Thu, Aug 01, 2013 at 10:38:18AM +0200, Lothar Waßmann wrote: Hi, Peter Chen writes: On Wed, Jul 31, 2013 at 04:21:14PM +0200, Lothar Waßmann wrote: This prevents the USB PHY refcount to be decremented below zero upon unloading the ci-hdrc-imx module. Signed-off-by: Lothar

Re: [PATCH 3/4] usb: chipidea: don't clobber return value of ci_role_start()

2013-08-01 Thread Peter Chen
On Thu, Aug 01, 2013 at 10:40:42AM +0200, Lothar Waßmann wrote: Hi, Peter Chen writes: On Wed, Jul 31, 2013 at 04:21:15PM +0200, Lothar Waßmann wrote: Signed-off-by: Lothar Waßmann l...@karo-electronics.de --- drivers/usb/chipidea/core.c |1 - 1 files changed, 0

Re: [PATCH 4/4] usb: chipidea: Prevent endless loop registering platform_devices when ci_hdrc_probe() fails.

2013-08-01 Thread Peter Chen
On Thu, Aug 01, 2013 at 10:43:52AM +0200, Lothar Waßmann wrote: Hi, Peter Chen writes: On Wed, Jul 31, 2013 at 04:21:16PM +0200, Lothar Waßmann wrote: commit 40dcd0e introduced the following code to the ci_hdrc_probe() function: + if (!dev-of_node dev-parent

Re: USB Interrupt Transaction Scheduling

2013-08-01 Thread Peter Chen
? It seems that this should be rewritten to avoid the busy loop. No, it is not related to this problem, this function is only called at device mode. All EHCI related is controlled by EHCI core. Currently, we still not override anything for host. -- Best Regards, Peter Chen -- To unsubscribe

Re: USB Interrupt Transaction Scheduling

2013-08-01 Thread Peter Chen
://vger.kernel.org/majordomo-info.html -- Best Regards, Peter Chen -- 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

[PATCH v14 01/12] usb: chipidea: move vbus regulator operation to core

2013-08-02 Thread Peter Chen
The vbus regulator is a common element for USB vbus operation, So, move it from glue layer to core. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Michael Grzeschik m.grzesc...@pengutronix.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/ci_hdrc_imx.c | 26

[PATCH v14 04/12] usb: chipidea: otg: Add otg file used to access otgsc

2013-08-02 Thread Peter Chen
This file is mainly used to access otgsc currently, it may add otg related things in the future. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/Makefile |2 +- drivers/usb/chipidea/bits.h | 10 drivers/usb

[PATCH v14 05/12] usb: chipidea: Add role init and destory APIs

2013-08-02 Thread Peter Chen
- The role's init will be called at probe procedure. - The role's destory will be called at fail patch at probe and driver's removal. - The role's start/stop will be called when specific role has started. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com

[PATCH v14 06/12] usb: chipidea: add flag CI_HDRC_DUAL_ROLE_NOT_OTG

2013-08-02 Thread Peter Chen
if the controller is dual role, but not supports OTG. If this flag is not set, we follow the rule that if DCCPARAMS_DC and DCCPARAMS_HC are both 1 at CAP_DCCPARAMS, then this controller is otg capable. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 38

[PATCH v14 07/12] usb: chipidea: disable all interrupts and clear all interrupts status

2013-08-02 Thread Peter Chen
During the initialization, it needs to disable all interrupts enable bit as well as clear all interrupts status bits to avoid exceptional interrupt. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 11 ++- 1 files

[PATCH v14 03/12] usb: chipidea: udc: otg_set_peripheral is useless for some chipidea users

2013-08-02 Thread Peter Chen
It is useless at below cases: - If we implement both usb host and device at chipidea driver. - If we don't need phy-otg. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c |7 ++- 1 files changed, 6 insertions(+), 1

[PATCH v14 11/12] usb: chipidea: udc: misuse flag CI_HDRC_REGS_SHARED and CI_HDRC_PULLUP_ON_VBUS

2013-08-02 Thread Peter Chen
module), the controller can run if vbus is on (CI_HDRC_PULLUP_ON_VBUS), it also does not relate to shared register. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions

[PATCH v14 02/12] usb: chipidea: host: add vbus regulator control

2013-08-02 Thread Peter Chen
vbus; when the host role finishes, it closes vbus. We put vbus operation to host as host is the only vbus user, When we are at host mode, the vbus is on, when we are not at host mode, vbus should be off. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com

[PATCH v14 09/12] usb: chipidea: add vbus interrupt handler

2013-08-02 Thread Peter Chen
We add vbus interrupt handler at ci_otg_work, it uses OTGSC_BSV(at otgsc) to know it is connect or disconnet event. Meanwhile, we introduce two flags id_event and b_sess_valid_event to indicate it is an id interrupt or a vbus interrupt. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter

[PATCH v14 10/12] usb: chipidea: add wait vbus lower than OTGSC_BSV before role starts

2013-08-02 Thread Peter Chen
indicate some hardware problems like the vbus is still higher than OTGSC_BSV after we disconnect to host some time later (5000 milliseconds currently), which is obvious not correct. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea

[PATCH v14 08/12] usb: chipidea: move otg relate things to otg file

2013-08-02 Thread Peter Chen
Move otg relate things to otg file. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 63 +-- drivers/usb/chipidea/otg.c | 57 +- drivers/usb

[PATCH v14 12/12] usb: chipidea: udc: .pullup is valid when vbus is on at CI_HDRC_PULLUP_ON_VBUS

2013-08-02 Thread Peter Chen
-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 45abf4d..b7ead5f 100644 --- a/drivers/usb/chipidea

[PATCH 1/3] usb: chipidea: udc: fix the oops when plugs in usb cable after rmmod gadget

2013-08-02 Thread Peter Chen
+0x120/0x148) r9:412fc09a r8:1000406a r7:80712d20 r6:10c03c7d r5:0001 r4:806e2008 Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH 0/3] Misc Chipidea Patch

2013-08-02 Thread Peter Chen
This patchset is based on my vbus/id patchset Peter Chen (3): usb: chipidea: udc: fix the oops when plugs in usb cable after rmmod gadget usb: chipidea: move platform related things to ci_get_platdata usb: host: delete chipidea dependency drivers/usb/chipidea/core.c | 21

[PATCH 3/3] usb: host: delete chipidea dependency

2013-08-02 Thread Peter Chen
Now, chipidea host has already depended on USB_EHCI_HCD Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/host/Kconfig |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index cf521d6..b548554 100644

[PATCH 2/3] usb: chipidea: move platform related things to ci_get_platdata

2013-08-02 Thread Peter Chen
It will make probe cleaner, meanwhile, it fixes the problem http://marc.info/?l=linux-usbm=137528143523296w=2 described indirectly. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 21 + 1 files changed, 9 insertions(+), 12 deletions

[PATCH v14 00/12] Add tested id switch and vbus connect detect support for Chipidea

2013-08-02 Thread Peter Chen
an unsolicited module_put() call from ci_hdrc_imx_remove() Peter Chen (1): usb: chipidea: fix the build error with randconfig - [Michael comments]: move vbus operation to core, and squash two vbus patches. [1/12], [2/12] - [Michael comments]: move out non vbus and non id related patches. [14/14

[PATCH 1/1] usb: chipidea: refine the operation of creating register mapping

2013-08-05 Thread Peter Chen
- The old operation needs to call hw_alloc_regmap two times, and the first operation is only used to know if the controller is lpm supported, besides, there is a kfree before kzalloc, it is also tricky. - Fix the memory leak for ci-hw_bank.regmap when unload module. Signed-off-by: Peter Chen

Re: [PATCH 1/1] usb: chipidea: refine the operation of creating register mapping

2013-08-05 Thread Peter Chen
On Mon, Aug 05, 2013 at 10:05:56AM +0300, Alexander Shishkin wrote: Peter Chen peter.c...@freescale.com writes: - The old operation needs to call hw_alloc_regmap two times, and the first operation is only used to know if the controller is lpm supported, besides, there is a kfree before

[PATCH 1/1] usb: gadget: zero: Add flexible auto remote wakeup test method

2013-08-05 Thread Peter Chen
In order to increase test coverage, we can change the interval between two remote wakeups every time, and the interval can be any user defined value. This change will no affect current behavior if the user does not use two introduced module paramters. Signed-off-by: Peter Chen peter.c

Re: [PATCH v14 00/12] Add tested id switch and vbus connect detect support for Chipidea

2013-08-06 Thread Peter Chen
On Fri, Aug 02, 2013 at 04:33:53PM +0800, Peter Chen wrote: This patchset adds tested otg id switch function and vbus connect and disconnect detection for chipidea driver. And fix kinds of bugs found at chipidea drivers after enabling id and vbus detection. This patch are fully tested

Re: [PATCH] USB: global suspend and remote wakeup don't mix

2013-08-06 Thread Peter Chen
. -- Best Regards, Peter Chen -- 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

[PATCH v2 1/1] usb: gadget: zero: Add flexible auto remote wakeup test method

2013-08-06 Thread Peter Chen
In order to increase test coverage, we can change the interval between two remote wakeups every time, and the interval can be any user defined value. This change will no affect current behavior if the user does not use two introduced module paramters. Signed-off-by: Peter Chen peter.c

[PATCH 1/1] usb: chipidea: imx: include usbmisc_imx.c in ci_hdrc_imx.c

2013-08-07 Thread Peter Chen
, we update dts and binding doc for at this commit Signed-off-by: Peter Chen peter.c...@freescale.com --- .../devicetree/bindings/usb/ci13xxx-imx.txt| 10 +- .../devicetree/bindings/usb/usbmisc-imx.txt| 14 -- arch/arm/boot/dts/imx23.dtsi |1 + arch/arm

Re: [PATCH 1/1] usb: chipidea: imx: include usbmisc_imx.c in ci_hdrc_imx.c

2013-08-07 Thread Peter Chen
On Wed, Aug 07, 2013 at 10:15:22AM +0200, Sascha Hauer wrote: On Wed, Aug 07, 2013 at 01:34:37PM +0800, Peter Chen wrote: At former design, both ci_hdrc_imx and usbmisc_imx are individual module, ci_hdrc_imx is glue layer for imx usb driver. usbmisc_imx handles non-core registers which has

Re: [PATCH 1/1] usb: chipidea: imx: include usbmisc_imx.c in ci_hdrc_imx.c

2013-08-07 Thread Peter Chen
to be in a single C file. OK, I will do. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/1] usb: chipidea: imx: include usbmisc_imx.c in ci_hdrc_imx.c

2013-08-07 Thread Peter Chen
On Wed, Aug 07, 2013 at 11:11:10AM +0200, Sascha Hauer wrote: On Wed, Aug 07, 2013 at 01:34:37PM +0800, Peter Chen wrote: - - reg = usbmisc-base + MX25_USB_PHY_CTRL_OFFSET; - - if (usbdev-evdo) { - spin_lock_irqsave(usbmisc-lock, flags); - val = readl(reg

Re: [PATCH 1/1] usb: chipidea: imx: include usbmisc_imx.c in ci_hdrc_imx.c

2013-08-07 Thread Peter Chen
to regmap and base your other stuff on this patch. This is what I mean. We can't request one region twice, so we need to delete devm_ioremap_resource at probe first. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message

Re: [PATCH 1/1] usb: chipidea: imx: include usbmisc_imx.c in ci_hdrc_imx.c

2013-08-07 Thread Peter Chen
On Wed, Aug 07, 2013 at 12:06:42PM +0200, Sascha Hauer wrote: On Wed, Aug 07, 2013 at 01:34:37PM +0800, Peter Chen wrote: diff --git a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt index b4b5b79..13720a2 100644

Re: [PATCH 1/1] usb: chipidea: imx: include usbmisc_imx.c in ci_hdrc_imx.c

2013-08-07 Thread Peter Chen
On Wed, Aug 07, 2013 at 02:28:20PM +0200, Michael Grzeschik wrote: Hi Peter, On Wed, Aug 07, 2013 at 05:24:45PM +0800, Peter Chen wrote: On Wed, Aug 07, 2013 at 12:05:07PM +0200, Sascha Hauer wrote: We need to know controller number, like pdev-id in the past. The registers

[PATCH 1/1] usb: chipidea: imx: delete the dead code

2013-08-08 Thread Peter Chen
Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/ci_hdrc_imx.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index b886998..30fdc2f 100644 --- a/drivers/usb/chipidea

[PATCH v2 1/5] usb: chipidea: imx: rename the DT doc name

2013-08-08 Thread Peter Chen
To reflect source file name change Signed-off-by: Peter Chen peter.c...@freescale.com --- .../devicetree/bindings/usb/ci13xxx-imx.txt| 31 .../devicetree/bindings/usb/ci_hdrc_imx.txt| 31 Documentation/devicetree/bindings/usb/mxs

[PATCH v2 2/5] usb: chipidea: usbmisc_imx: Using regmap to access register

2013-08-08 Thread Peter Chen
Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/usbmisc_imx.c | 71 +--- 1 files changed, 34 insertions(+), 37 deletions(-) diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c index ac5a461..545efbf

[PATCH v2 0/5] usb: chipidea: delete usbmisc_imx

2013-08-08 Thread Peter Chen
, and the other patches will use the new file name, so I hope they can be queued together. Peter Chen (5): usb: chipidea: imx: rename the DT doc name usb: chipidea: usbmisc_imx: Using regmap to access register usb: chipidea: imx: build ci_hdrc_imx.c and usbmisc_imx.c together arm: dts: imx: add

[PATCH v2 3/5] usb: chipidea: imx: build ci_hdrc_imx.c and usbmisc_imx.c together

2013-08-08 Thread Peter Chen
-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/ci_hdrc_imx.c | 113 +++--- drivers/usb/chipidea/ci_hdrc_imx.h | 28 +++--- drivers/usb/chipidea/usbmisc_imx.c | 186 +++- drivers/usb/chipidea/usbmisc_imx.h | 14 +++ 4 files changed

[PATCH v2 4/5] arm: dts: imx: add aliases for usb

2013-08-08 Thread Peter Chen
At imx usb driver, it needs to know the controller id to access register. Signed-off-by: Peter Chen peter.c...@freescale.com --- arch/arm/boot/dts/imx23.dtsi |1 + arch/arm/boot/dts/imx28.dtsi |2 ++ arch/arm/boot/dts/imx51.dtsi |4 arch/arm/boot/dts/imx53.dtsi |4

[PATCH v2 5/5] arm: dts: imx: Delete usbmisc_imx

2013-08-08 Thread Peter Chen
from usbmisc_imx as well. Signed-off-by: Peter Chen peter.c...@freescale.com --- .../devicetree/bindings/usb/ci_hdrc_imx.txt| 12 .../devicetree/bindings/usb/usbmisc-imx.txt| 14 -- arch/arm/boot/dts/imx25.dtsi | 14

Re: [PATCH v2 5/5] arm: dts: imx: Delete usbmisc_imx

2013-08-08 Thread Peter Chen
On Thu, Aug 08, 2013 at 12:38:59PM +0200, Sascha Hauer wrote: On Thu, Aug 08, 2013 at 03:33:01PM +0800, Peter Chen wrote: Since ci_hdrc_imx and usbmisc_imx has relationship between each other, they can't be existed as two modules. We change the code, and make the usbmisc_imx has no longer

Re: [PATCH v2 5/5] arm: dts: imx: Delete usbmisc_imx

2013-08-09 Thread Peter Chen
On Fri, Aug 09, 2013 at 08:20:45AM +0200, Sascha Hauer wrote: On Thu, Aug 08, 2013 at 06:19:43PM +0800, Peter Chen wrote: - compatible = fsl,imx25-usbmisc; - clocks = clks 9, clks 70, clks 8

Re: [PATCH 2/2] USB: chipidea: i.MX: simplify usbmisc

2013-08-09 Thread Peter Chen
can fix current loadable module problem, and it is also easy to add new ops in future. After fixing mx23/mx28 case, we can use your version. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v14 06/12] usb: chipidea: add flag CI_HDRC_DUAL_ROLE_NOT_OTG

2013-08-09 Thread Peter Chen
On Fri, Aug 09, 2013 at 03:55:56PM +0300, Alexander Shishkin wrote: Peter Chen peter.c...@freescale.com writes: Since we need otgsc to know vbus's status at some chipidea controllers even it is peripheral-only mode. Besides, some SoCs (eg, AR9331 SoC) don't have otgsc register even

Re: [PATCH v14 04/12] usb: chipidea: otg: Add otg file used to access otgsc

2013-08-09 Thread Peter Chen
On Fri, Aug 09, 2013 at 04:00:13PM +0300, Alexander Shishkin wrote: Peter Chen peter.c...@freescale.com writes: This file is mainly used to access otgsc currently, it may add otg related things in the future. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c

Re: [PATCH v14 11/12] usb: chipidea: udc: misuse flag CI_HDRC_REGS_SHARED and CI_HDRC_PULLUP_ON_VBUS

2013-08-09 Thread Peter Chen
On Fri, Aug 09, 2013 at 04:23:11PM +0300, Alexander Shishkin wrote: Peter Chen peter.c...@freescale.com writes: CI_HDRC_REGS_SHARED stands for the controller registers is shared with other USB drivers, if all USB drivers are at chipidea/, it doesn't needed to set. We still have the msm

Re: [PATCH v14 11/12] usb: chipidea: udc: misuse flag CI_HDRC_REGS_SHARED and CI_HDRC_PULLUP_ON_VBUS

2013-08-09 Thread Peter Chen
On Fri, Aug 09, 2013 at 07:46:00PM +0800, Peter Chen wrote: On Fri, Aug 09, 2013 at 04:23:11PM +0300, Alexander Shishkin wrote: Peter Chen peter.c...@freescale.com writes: CI_HDRC_REGS_SHARED stands for the controller registers is shared with other USB drivers, if all USB drivers

Re: [PATCH] usb: chipidea: enable to build host support as module

2013-08-11 Thread Peter Chen
USB_EHCI_ROOT_HUB_TT help Hi Luka, Lothar has already posted a solution for it. http://marc.info/?l=linux-usbm=137533651927159w=2 -- Best Regards, Peter Chen -- 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

[PATCH v15 02/13] usb: chipidea: host: add vbus regulator control

2013-08-11 Thread Peter Chen
vbus; when the host role finishes, it closes vbus. We put vbus operation to host as host is the only vbus user, When we are at host mode, the vbus is on, when we are not at host mode, vbus should be off. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com

[PATCH v15 01/13] usb: chipidea: move vbus regulator operation to core

2013-08-11 Thread Peter Chen
The vbus regulator is a common element for USB vbus operation, So, move it from glue layer to core. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Michael Grzeschik m.grzesc...@pengutronix.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/ci_hdrc_imx.c | 26

[PATCH v15 00/13] Add tested id switch and vbus connect detect support for Chipidea

2013-08-11 Thread Peter Chen
chipidea: Remove previous MODULE_ALIAS Lothar Wabmann (3): usb: chipidea: improve kconfig 2.0 usb: chipidea: don't clobber return value of ci_role_start() usb: chipidea: ci_hdrc_imx: remove an unsolicited module_put() call from ci_hdrc_imx_remove() Peter Chen (1): usb: chipidea: fix

[PATCH v15 10/13] usb: chipidea: add wait vbus lower than OTGSC_BSV before role starts

2013-08-11 Thread Peter Chen
indicate some hardware problems like the vbus is still higher than OTGSC_BSV after we disconnect to host some time later (5000 milliseconds currently), which is obvious not correct. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea

[PATCH v15 11/13] usb: chipidea: udc: misuse flag CI_HDRC_REGS_SHARED and CI_HDRC_PULLUP_ON_VBUS

2013-08-11 Thread Peter Chen
module), the controller can run if vbus is on (CI_HDRC_PULLUP_ON_VBUS), it also does not relate to shared register. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions

[PATCH v15 04/13] usb: chipidea: otg: Add otg file used to access otgsc

2013-08-11 Thread Peter Chen
This file is mainly used to access otgsc currently, it may add otg related things in the future. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/Makefile |2 +- drivers/usb/chipidea/bits.h | 10 ++ drivers/usb

[PATCH v15 05/13] usb: chipidea: Add role init and destroy APIs

2013-08-11 Thread Peter Chen
- The role's init will be called at probe procedure. - The role's destroy will be called at fail patch at probe and driver's removal. - The role's start/stop will be called when specific role has started. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com

[PATCH v15 12/13] usb: chipidea: retire flag CI_HDRC_PULLUP_ON_VBUS

2013-08-11 Thread Peter Chen
Currently, the controller only runs when the ci-vbus_active is true. So the flag CI_HDRC_PULLUP_ON_VBUS is useless no longer. If the user doesn't have otgsc, he/she needs to change ci_handle_vbus_change to update ci-vbus_active. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb

[PATCH v15 06/13] usb: chipidea: add flag CI_HDRC_DUAL_ROLE_NOT_OTG

2013-08-11 Thread Peter Chen
if the controller is dual role, but not supports OTG. If this flag is not set, we follow the rule that if DCCPARAMS_DC and DCCPARAMS_HC are both 1 at CAP_DCCPARAMS, then this controller is otg capable. Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 37

[PATCH v15 08/13] usb: chipidea: move otg related things to otg file

2013-08-11 Thread Peter Chen
Move otg related things to otg file. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 63 +-- drivers/usb/chipidea/otg.c | 57 +- drivers/usb

[PATCH v15 03/13] usb: chipidea: udc: otg_set_peripheral is useless for some chipidea users

2013-08-11 Thread Peter Chen
It is useless at below cases: - If we implement both usb host and device at chipidea driver. - If we don't need phy-otg. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/udc.c |7 ++- 1 files changed, 6 insertions(+), 1

[PATCH v15 09/13] usb: chipidea: add vbus interrupt handler

2013-08-11 Thread Peter Chen
We add vbus interrupt handler at ci_otg_work, it uses OTGSC_BSV(at otgsc) to know it is connect or disconnet event. Meanwhile, we introduce two flags id_event and b_sess_valid_event to indicate it is an id interrupt or a vbus interrupt. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter

[PATCH v15 07/13] usb: chipidea: disable all interrupts and clear all interrupts status

2013-08-11 Thread Peter Chen
During the initialization, it needs to disable all interrupts enable bit as well as clear all interrupts status bits to avoid exceptional interrupt. Tested-by: Marek Vasut ma...@denx.de Signed-off-by: Peter Chen peter.c...@freescale.com --- drivers/usb/chipidea/core.c | 11 ++- 1 files

Re: [PATCH 1/2] USB: chipidea: i.MX: remove unused define

2013-08-12 Thread Peter Chen
, and queued by alex. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] USB: chipidea: i.MX: simplify usbmisc

2013-08-12 Thread Peter Chen
) { - usbmisc_unset_ops(usbmisc-ops); clk_disable_unprepare(usbmisc-clk); usbmisc = NULL; return 0; -- 1.8.4.rc1 Acked-by: Peter Chen peter.c...@freescale.com -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body

Re: [PATCH] dwc3: dwc3-pci: Use SIMPLE_DEV_PM_OPS

2013-08-13 Thread Peter Chen
= dwc3_pci_remove, .driver = { - .pm = DEV_PM_OPS, + .pm = dwc3_pci_dev_pm_ops, }, }; It seems .pm is not NULL if CONFIG_PM_SLEEP is not defined which is not the same with former code. -- BR, Peter Chen -- To unsubscribe from

Re: [PATCH] dwc3: dwc3-pci: Use SIMPLE_DEV_PM_OPS

2013-08-13 Thread Peter Chen
On Tue, Aug 13, 2013 at 8:59 PM, Fabio Estevam feste...@gmail.com wrote: On Tue, Aug 13, 2013 at 3:59 AM, Peter Chen hzpeterc...@gmail.com wrote: It seems .pm is not NULL if CONFIG_PM_SLEEP is not defined which is not the same with former code. With SIMPLE_DEV_PM_OPS macro we don't need

  1   2   3   4   5   6   7   8   9   10   >