Re: [PATCH 01/13] usb: phy: nop: Add device tree support and binding information

2013-03-11 Thread Marc Kleine-Budde
be(struct platform_device >> *pdev) >> if (!nop->phy.otg) >> return -ENOMEM; >> >> +if (dev->of_node) { >> +pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); >> + if (!pdata) { >> +

Re: [PATCH 01/13] usb: phy: nop: Add device tree support and binding information

2013-03-11 Thread Marc Kleine-Budde
On 03/11/2013 09:40 AM, Roger Quadros wrote: > On 03/08/2013 05:45 PM, Marc Kleine-Budde wrote: >> On 03/08/2013 11:46 AM, Marc Kleine-Budde wrote: >>> On 02/04/2013 04:58 PM, Roger Quadros wrote: >>>> The PHY clock, clock rate, VCC regulator and RESET regulator >&

Re: [PATCH 02/13] USB: phy: nop: Defer probe if device needs VCC/RESET

2013-03-11 Thread Marc Kleine-Budde
gle u32. Someone correct me if I'm wrong. >> > > Yes you are right. Kishon was asking me to use u8 instead of unsigned int, > which > I don't think is necessary. AFAIK, it is a norm to use unsigned int when > defining > a bitfield. Compilers are known to behave f

Re: [PATCH 1/8] usb: phy: nop: Add some parameters to platform data

2013-03-12 Thread Marc Kleine-Budde
nd > then the driver will bail out with -EPROBE_DEFER. Is there a platform which fills out pdata.needs_vcc and pdata.needs_reset? IMHO it makes no sense to add features for the non DT case, if there isn't any user for it. Marc -- Pengutronix e.K. | Marc Kleine-Budde

Re: [PATCH 1/8] usb: phy: nop: Add some parameters to platform data

2013-03-12 Thread Marc Kleine-Budde
On 03/12/2013 03:12 PM, Roger Quadros wrote: > On 03/12/2013 01:54 PM, Marc Kleine-Budde wrote: >> On 03/12/2013 12:24 PM, Roger Quadros wrote: >>> Add clk_rate parameter to platform data. If supplied, the >>> NOP phy driver will program the clock to that rate durin

Re: [PATCH 1/8] usb: phy: nop: Add some parameters to platform data

2013-03-12 Thread Marc Kleine-Budde
On 03/12/2013 03:28 PM, Roger Quadros wrote: > On 03/12/2013 04:17 PM, Marc Kleine-Budde wrote: >> On 03/12/2013 03:12 PM, Roger Quadros wrote: >>> On 03/12/2013 01:54 PM, Marc Kleine-Budde wrote: >>>> On 03/12/2013 12:24 PM, Roger Quadros wrote: >>>>>

Re: [PATCH 1/8] usb: phy: nop: Add some parameters to platform data

2013-03-12 Thread Marc Kleine-Budde
On 03/12/2013 04:20 PM, Roger Quadros wrote: > On 03/12/2013 04:42 PM, Marc Kleine-Budde wrote: >> On 03/12/2013 03:28 PM, Roger Quadros wrote: >>> On 03/12/2013 04:17 PM, Marc Kleine-Budde wrote: >>>> On 03/12/2013 03:12 PM, Roger Quadros wrote: >>>>&

Re: [PATCH 1/8] usb: phy: nop: Add some parameters to platform data

2013-03-13 Thread Marc Kleine-Budde
e. I was assuming you're already on DT only :) Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917- | Amtsgericht Hildeshe

Re: Two remain problems at chipidea driver

2013-03-14 Thread Marc Kleine-Budde
3 of these clocks. Iff we put the clock handling into the core driver, there have to be all three clocks (and sophisticated error handling to handle non existing clocks). > Let me know your opinion about these two problems and your plan for them. > Thanks. Marc -- Pengutronix e.K.

Re: Two remain problems at chipidea driver

2013-03-14 Thread Marc Kleine-Budde
;> power sequence are platform specific, they are designed by individual >> companies. > > Hmm, if the clock is external to chipidea, I guess it should be ok to > keep it in the platform code as long as it is entirely contained in the > platform code, that is, no aw

Re: Two remain problems at chipidea driver

2013-03-20 Thread Marc Kleine-Budde
uot;peripheral", "otg", "dual_role": >- host, peripheral: initialize one role only, stick to that, no otg; >- dual_role: initialize both roles, no otg; >- otg: both roles, ci->is_otg == true. > > Another question now is, do we need "dual_role"

Re: Two remain problems at chipidea driver

2013-03-20 Thread Marc Kleine-Budde
On 03/20/2013 12:23 PM, Alexander Shishkin wrote: > Marc Kleine-Budde writes: > >> On 03/20/2013 12:04 PM, Alexander Shishkin wrote: >>> Peter Chen writes: >>> >>>> On Fri, Mar 15, 2013 at 05:17:08PM +0200, Alexander Shishkin wrote: >>>&g

Re: Two remain problems at chipidea driver

2013-03-20 Thread Marc Kleine-Budde
On 03/20/2013 02:37 PM, Alexander Shishkin wrote: > Marc Kleine-Budde writes: > >> On 03/20/2013 12:23 PM, Alexander Shishkin wrote: >>> Marc Kleine-Budde writes: >>> >>>> On 03/20/2013 12:04 PM, Alexander Shishkin wrote: >>>>> Peter Chen

Re: Two remain problems at chipidea driver

2013-03-20 Thread Marc Kleine-Budde
> _had_ to allow manufacturers to ship the notebook without the peripheral > side, since they'd never, ever use it. Since the code was already > prepared for that, it was pretty simple and there's no ifdef hell > anywhere. Below you will find original commit. The main idea is that,

Re: Two remain problems at chipidea driver

2013-03-20 Thread Marc Kleine-Budde
On 03/20/2013 05:02 PM, Felipe Balbi wrote: > On Wed, Mar 20, 2013 at 04:58:05PM +0100, Marc Kleine-Budde wrote: >> On 03/20/2013 03:44 PM, Felipe Balbi wrote: >>> Hi, >>> >>> On Wed, Mar 20, 2013 at 04:26:02PM +0200, Alexander Shishkin wrote: >>>&g

Re: [PATCH 12/12] USB: chipidea: add imx usbmisc support

2012-07-13 Thread Marc Kleine-Budde
ULL); >>> + if (IS_ERR(data->clk)) { >>> + dev_err(&pdev->dev, >>> + "failed to get clock, err=%ld\n", PTR_ERR(data->clk)); >>> + return PTR_ERR(data->clk); >>> + } >>> + >>>

Re: [RFC PATCH] drivers: usb: otg: add device tree support to otg library

2012-07-13 Thread Marc Kleine-Budde
4 > --- a/include/linux/usb/otg.h > +++ b/include/linux/usb/otg.h > @@ -187,6 +187,8 @@ usb_phy_shutdown(struct usb_phy *x) > extern struct usb_phy *usb_get_phy(enum usb_phy_type type); > extern struct usb_phy *devm_usb_get_phy(struct device *dev, > enum usb_phy_t

Re: [PATCH 10/12] USB: chipidea: add set_vbus_power support

2012-07-16 Thread Marc Kleine-Budde
"Failed to enable vbus regulator, err=%d\n", > - ret); > - goto put_np; > - } > + if (!IS_ERR(reg_vbus)) > data->reg_vbus = reg_vbus; > - } else { > + else

[PATCH] usb: chipidea: fix linking of udc if gadget is build as module

2012-07-16 Thread Marc Kleine-Budde
dc' drivers/usb/chipidea/udc.c:443: undefined reference to `usb_gadget_map_request' drivers/usb/chipidea/udc.c:1774: undefined reference to `usb_add_gadget_udc' This patch changes the dependencies, so that udc can only be built-in of the usb gadget is built-in, too. Signed-off-by: Ma

Re: [PATCH] usb: chipidea: fix linking of udc if gadget is build as module

2012-07-16 Thread Marc Kleine-Budde
On 07/16/2012 03:19 PM, Felipe Balbi wrote: > Hi, > > On Mon, Jul 16, 2012 at 03:10:48PM +0200, Marc Kleine-Budde wrote: >> Since commit 5e0aa49 usb: chipidea: use generic map/unmap routines, >> the udc part of the chipidea driver needs the generic usb gadget helper >>

Re: [PATCH] usb: chipidea: fix linking of udc if gadget is build as module

2012-07-16 Thread Marc Kleine-Budde
On 07/16/2012 03:38 PM, Felipe Balbi wrote: > Hi, > > On Mon, Jul 16, 2012 at 03:31:54PM +0200, Marc Kleine-Budde wrote: >> On 07/16/2012 03:19 PM, Felipe Balbi wrote: >>> Hi, >>> >>> On Mon, Jul 16, 2012 at 03:10:48PM +0200, Marc Kleine-Budde wrote: &g

Re: [PATCH] usb: chipidea: fix linking of udc if gadget is build as module

2012-07-16 Thread Marc Kleine-Budde
ne __DRIVERS_USB_CHIPIDEA_HOST_H > > -#ifdef CONFIG_USB_CHIPIDEA_HOST > +#if defined(CONFIG_USB) || defined(CONFIG_USB_MODULE) > > int ci_hdrc_host_init(struct ci13xxx *ci); > > diff --git a/drivers/usb/chipidea/udc.h b/drivers/usb/chipidea/udc.h > index 4ff2384

[PATCH v2] usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module

2012-07-16 Thread Marc Kleine-Budde
adget support (USB_GADGET) is builtin or both chipidea driver and USB_GADGET are modular. Same dependencies for the chipidea host support and the linux host side USB support (USB). While there, fix the indention of chipidea the help text. Cc: Alexander Shishkin Signed-off-by: Marc Kleine-Budde

Re: [PATCH v2] usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module

2012-07-17 Thread Marc Kleine-Budde
On 07/17/2012 11:15 AM, Felipe Balbi wrote: > On Mon, Jul 16, 2012 at 10:18:20PM +0200, Marc Kleine-Budde wrote: >> Since commit "5e0aa49 usb: chipidea: use generic map/unmap routines", >> the udc part of the chipidea driver needs the generic usb gadget helper >> fu

Re: [PATCH v2] usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module

2012-07-17 Thread Marc Kleine-Budde
On 07/17/2012 07:47 PM, Greg KH wrote: > On Mon, Jul 16, 2012 at 10:18:20PM +0200, Marc Kleine-Budde wrote: >> Since commit "5e0aa49 usb: chipidea: use generic map/unmap routines", >> the udc part of the chipidea driver needs the generic usb gadget helper >> functio

Re: [PATCH v2 1/2] USB: chipidea: add imx usbmisc support

2012-07-18 Thread Marc Kleine-Budde
ncy. How about build all imx related > things into a single module? ci13xxx_imx module init will call > usbmisc_imx6q_drv_init, usbmisc_imx53_drv_init etc. Why not call a single imx_usbmisc_init. The usbmisc can call the correct function inside. The right init function can be selected

[PATCH v3] usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module

2012-07-20 Thread Marc Kleine-Budde
adget support (USB_GADGET) is builtin or both chipidea driver and USB_GADGET are modular. Same dependencies for the chipidea host support and the linux host side USB support (USB). While there, fix the indention of chipidea the help text. Cc: Alexander Shishkin Reviewed-by: Felipe Balbi Signed-o

Re: [PATCH v2] usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module

2012-07-20 Thread Marc Kleine-Budde
USB gadget are built in. > > > > Ok what a mess. > > But, to top it all off, this patch doesn't apply to my tree. Care to > refresh it against usb-next so that I can apply it? Done regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde |

Re: [PATCH v2 1/2] USB: chipidea: add imx usbmisc support

2012-07-23 Thread Marc Kleine-Budde
> imx are also in cc list. IMHO it's not about the place where the driver is located, it's about the shortcomings Michael and Sascha mentioned. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +4

Re: [PATCH v3] usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module

2012-07-31 Thread Marc Kleine-Budde
On 07/20/2012 09:33 AM, Marc Kleine-Budde wrote: > Since commit "5e0aa49 usb: chipidea: use generic map/unmap routines", > the udc part of the chipidea driver needs the generic usb gadget helper > functions. If the chipidea driver with udc support is built into the > kernel a

Re: [PATCH v3] usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module

2012-07-31 Thread Marc Kleine-Budde
ll get to it after 3.6-rc1 is out. tnx, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917- | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | signature.asc Description: OpenPGP digital signature

[PATCH] usb: gadget: u_ether: fix kworker 100% CPU issue with still used interfaces in eth_stop

2012-08-08 Thread Marc Kleine-Budde
_ep_queue() (called by the worker) will fail due to the unconfigured endpoint. We fix this issue by saving the ep descriptors and re-assign them before usb_ep_enable(). Cc: Tatyana Brokhman Signed-off-by: Michael Grzeschik Signed-off-by: Marc Kleine-Budde --- Hello, this patch applies to v3.6

Re: [GIT PULL] USB fixes for v3.6-rc4

2012-08-23 Thread Marc Kleine-Budde
74a9e8b670b4a795218 -1 b1b552a usb: gadget: u_ether: fix kworker 100% CPU issue with still used interfaces in eth_stop $ git describe --contains b1b552a69b8805e7e338074a9e8b670b4a795218 --match=v* v3.6-rc3~19^2~13 cheers, Marc -- Pengutronix e.K. | Marc Kleine-Bu

chipidea driver

2012-08-23 Thread Marc Kleine-Budde
ards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917- | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | signature.asc Descriptio

[PATCH 1/3] usb: phy: get phy driver's module if phy is acquired

2012-08-23 Thread Marc Kleine-Budde
Otherwise the module's refcount is 0 and it's possible to unload the module, even if the phy is in use. Signed-off-by: Marc Kleine-Budde --- drivers/usb/otg/otg.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/o

[PATCH 3/3] usb: mxs-phy: register phy as USB_PHY_TYPE_USB2

2012-08-23 Thread Marc Kleine-Budde
This patch registers the msx-phy as an USB_PHY_TYPE_USB2. This is needed to get reference to the phy with devm_usb_get_phy_by_phandle(), which will be added in a later patch. Signed-off-by: Marc Kleine-Budde --- drivers/usb/otg/mxs-phy.c |5 - 1 file changed, 4 insertions(+), 1 deletion

[PATCH 2/3] usb: otg: add device tree support to otg library

2012-08-23 Thread Marc Kleine-Budde
Cc: Marek Vasut Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Marc Kleine-Budde --- drivers/usb/otg/otg.c | 96 --- include/linux/usb/otg.h |8 2 files changed, 90 insertions(+), 14 deletions(-) diff --git a/drivers/usb/otg/otg.c b/d

[PATCH 1/3] usb: otg: Improve phy handling

2012-08-23 Thread Marc Kleine-Budde
This patch series improves the phy handling. The first patch fixes the problem that the phy driver, when build as module, can be unloaded when the phy is in use. The second patch takes up Kishon's work and adds device tree support to the otg library. New in this patch is that devm_usb_get_phy_by_p

[PATCH 3/4] usb: chipidea: udc: don't stall endpoint if request list is empty in isr_tr_complete_low

2012-08-23 Thread Marc Kleine-Budde
lete bit will be set, too. The subsequent check (in ep0/dir1's loop cycle) for endpoint request list (mEp->qh.queue) empty will fail. Both other mainline chipidea drivers (mv_udc_core.c and fsl_udc_core.c) don't have this check. Signed-off-by: Michael Grzeschik Signed-off-

[PATCH 0/4] usb: chipidea: Fixes

2012-08-23 Thread Marc Kleine-Budde
Hello, this is a series fixes several problems in the chipidea udc driver. Although this applies to v3.6-rc3, I don't want to push this into v3.6. Please review and test. These patches have been tested on mx28 and mx53. regards, Marc -- To unsubscribe from this list: send the line "unsubscribe

[PATCH 4/4] usb: chipidea: udc: add pullup fuction, needed by the uvc gadget

2012-08-23 Thread Marc Kleine-Budde
From: Michael Grzeschik Add function to physicaly enable or disable of pullup connection on the USB-D+ line. The uvc gaget will fail, if this function is not implemented. Signed-off-by: Michael Grzeschik Signed-off-by: Marc Kleine-Budde --- drivers/usb/chipidea/udc.c | 21

[PATCH 1/4] usb: chipidea: udc: fix error path in udc_start()

2012-08-23 Thread Marc Kleine-Budde
This patch fixes the error path of udc_start(). Now NULL is used to unset the peripheral with otg_set_peripheral(). Signed-off-by: Marc Kleine-Budde --- drivers/usb/chipidea/udc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb

[PATCH 2/4] usb: chipidea: udc: set endpoint to undefined maxpacket size on start

2012-08-23 Thread Marc Kleine-Budde
From: Michael Grzeschik Non control endpoints have an undefined maxpacket size on udc start. Some gadget drivers check for the maxpacket size before they enable the endpoint, which leads to a wrong state. Signed-off-by: Michael Grzeschik Signed-off-by: Marc Kleine-Budde --- drivers/usb

[PATCH] usb: chipidea: ci13xxx_imx: add 2nd and 3rd clock to support imx5x and newer

2012-08-23 Thread Marc Kleine-Budde
ange has been applied to the fsl_mxc_udc.c in commit: ba78917 usb: gadget: fsl_mxc_udc: do not depend on grouped clocks This patch has been tested on imx28 and on imx53 with seperate "ahb", "ipg" and "per" clocks. Cc: Shawn Guo Signed-off-by: Michael Grzeschi

Re: [PATCH 1/3] usb: phy: get phy driver's module if phy is acquired

2012-08-23 Thread Marc Kleine-Budde
On 08/23/2012 08:33 PM, Alan Stern wrote: > On Thu, 23 Aug 2012, Marc Kleine-Budde wrote: > >> Otherwise the module's refcount is 0 and it's possible to unload the module, >> even if the phy is in use. > >> @@ -139,8 +140,10 @@ EXPORT_SYMBOL(devm_usb_put_phy)

Re: [PATCH 1/4] usb: chipidea: udc: fix error path in udc_start()

2012-08-24 Thread Marc Kleine-Budde
On 08/24/2012 10:14 AM, Richard Zhao wrote: > On Thu, Aug 23, 2012 at 07:30:44PM +0200, Marc Kleine-Budde wrote: >> This patch fixes the error path of udc_start(). Now NULL is used to >> unset the peripheral with otg_set_peripheral(). >> >> Signed-off-by: Marc Kleine-Bu

Re: [PATCH 4/4] usb: chipidea: udc: add pullup fuction, needed by the uvc gadget

2012-08-24 Thread Marc Kleine-Budde
On 08/24/2012 09:55 AM, Felipe Balbi wrote: > On Thu, Aug 23, 2012 at 07:30:47PM +0200, Marc Kleine-Budde wrote: >> From: Michael Grzeschik >> >> Add function to physicaly enable or disable of pullup connection on the >> USB-D+ >> line. The uvc gaget w

Re: [PATCH 2/4] usb: chipidea: udc: set endpoint to undefined maxpacket size on start

2012-08-24 Thread Marc Kleine-Budde
On 08/24/2012 09:36 AM, Felipe Balbi wrote: > Hi, > > On Thu, Aug 23, 2012 at 07:30:45PM +0200, Marc Kleine-Budde wrote: >> From: Michael Grzeschik >> >> Non control endpoints have an undefined maxpacket size on udc start. Some >> gadget drivers check for the

Re: [PATCH 2/4] usb: chipidea: udc: set endpoint to undefined maxpacket size on start

2012-08-24 Thread Marc Kleine-Budde
On 08/24/2012 10:31 AM, Felipe Balbi wrote: > On Fri, Aug 24, 2012 at 10:30:54AM +0200, Marc Kleine-Budde wrote: >> On 08/24/2012 09:36 AM, Felipe Balbi wrote: >>> Hi, >>> >>> On Thu, Aug 23, 2012 at 07:30:45PM +0200, Marc Kleine-Budde wrote: >>>>

Re: [PATCH 1/3] usb: otg: Improve phy handling

2012-08-25 Thread Marc Kleine-Budde
On 08/24/2012 03:59 AM, Richard Zhao wrote: > On Thu, Aug 23, 2012 at 07:22:51PM +0200, Marc Kleine-Budde wrote: >> This patch series improves the phy handling. >> >> The first patch fixes the problem that the phy driver, when build as module, >> can be unlo

Re: [PATCH 3/3] usb: mxs-phy: register phy as USB_PHY_TYPE_USB2

2012-08-25 Thread Marc Kleine-Budde
On 08/24/2012 08:51 AM, Richard Zhao wrote: > On Thu, Aug 23, 2012 at 07:22:54PM +0200, Marc Kleine-Budde wrote: >> This patch registers the msx-phy as an USB_PHY_TYPE_USB2. This is needed to >> get >> reference to the phy with devm_usb_get_phy_by_phandle(), which will be ad

Re: [PATCH 2/3] usb: otg: add device tree support to otg library

2012-08-25 Thread Marc Kleine-Budde
On 08/24/2012 08:46 AM, Richard Zhao wrote: > Did you try both enableing and disabing DT pass build? Impossible on mx28 :) The platform always selects USE_DT, but on imx it builds without DT support. > On Thu, Aug 23, 2012 at 07:22:53PM +0200, Marc Kleine-Budde wrote: >> From:

Re: [PATCH 3/3] usb: mxs-phy: register phy as USB_PHY_TYPE_USB2

2012-08-27 Thread Marc Kleine-Budde
e: >>>> Hi, >>>> >>>> On Sat, Aug 25, 2012 at 3:33 PM, Marc Kleine-Budde >>>> wrote: >>>>> On 08/24/2012 08:51 AM, Richard Zhao wrote: >>>>>> On Thu, Aug 23, 2012 at 07:22:54PM +0200, Marc Kleine-Budde wrote: >>

[PATCH] usb: chipidea: ci13xxx_imx: fix regulator unbalance disable

2012-08-27 Thread Marc Kleine-Budde
anent regulator_enable() is removed but the corresponding regulator_disable() are forgotten. This patch removes the leftover regulator_disable(). Cc: Richard Zhao Signed-off-by: Marc Kleine-Budde --- drivers/usb/chipidea/ci13xxx_imx.c |6 -- 1 file changed, 6 deletions(-) diff --git a/driver

[PATCH] usb: chipidea: cleanup dma_pool if udc_start() fails

2012-08-28 Thread Marc Kleine-Budde
If udc_start() fails the qh_pool dma-pool cannot be closed because it's still in use. This patch factors out the dma_pool_free() loop into destroy_eps() and calls it in the error path of udc_start(), too. Cc: Richard Zhao Signed-off-by: Marc Kleine-Budde --- Hello, Richard, can you p

Re: [PATCH] usb: chipidea: cleanup dma_pool if udc_start() fails

2012-08-28 Thread Marc Kleine-Budde
On 08/28/2012 12:46 PM, Richard Zhao wrote: > On Tue, Aug 28, 2012 at 12:31:25PM +0200, Marc Kleine-Budde wrote: >> If udc_start() fails the qh_pool dma-pool cannot be closed because >> it's still in use. This patch factors out the dma_pool_free() loop >> into destroy

Re: [PATCH 2/3] usb: otg: add device tree support to otg library

2012-08-28 Thread Marc Kleine-Budde
t; */ >> int usb_add_phy(struct usb_phy *x, enum usb_phy_type type) >> { >> -int ret = 0; >> unsigned long flags; >> struct usb_phy *phy; >> >> -if (x && x->type != USB_PHY_TYPE_UNDEFINED) { >> -

Re: [PATCH 3/3] usb: mxs-phy: register phy as USB_PHY_TYPE_USB2

2012-08-28 Thread Marc Kleine-Budde
On 08/27/2012 12:36 PM, Marc Kleine-Budde wrote: [...] >>>>>>>> +return usb_add_phy(&mxs_phy->phy, USB_PHY_TYPE_USB2); >>>>>>> Why is it usb2? It's kind of USB_PHY_TYPE_DT. >>>>>> >>>>>> For now the

[PATCH 5/5] usb: chipidea: udc: don't stall endpoint if request list is empty in isr_tr_complete_low

2012-08-28 Thread Marc Kleine-Budde
lete bit will be set, too. The subsequent check (in ep0/dir1's loop cycle) for endpoint request list (mEp->qh.queue) empty will fail. Both other mainline chipidea drivers (mv_udc_core.c and fsl_udc_core.c) don't have this check. Signed-off-by: Michael Grzeschik Signed-off-

[PATCH 2/5] usb: chipidea: udc: add pullup fuction, needed by the uvc gadget

2012-08-28 Thread Marc Kleine-Budde
From: Michael Grzeschik Add function to physicaly enable or disable of pullup connection on the USB-D+ line. The uvc gaget will fail, if this function is not implemented. Signed-off-by: Michael Grzeschik Signed-off-by: Marc Kleine-Budde Acked-by: Felipe Balbi --- drivers/usb/chipidea/udc.c

[PATCH 4/5] usb: chipidea: cleanup dma_pool if udc_start() fails

2012-08-28 Thread Marc Kleine-Budde
If udc_start() fails the qh_pool dma-pool cannot be closed because it's still in use. This patch factors out the dma_pool_free() loop into destroy_eps() and calls it in the error path of udc_start(), too. Cc: Richard Zhao Signed-off-by: Marc Kleine-Budde --- drivers/usb/chipidea/udc.c |

[PATCH v2 1/5] usb: chipidea: udc: fix setup of endpoint maxpacket size

2012-08-28 Thread Marc Kleine-Budde
size before they enable the endpoint, which leads to a wrong state in these drivers. Cc: Signed-off-by: Michael Grzeschik Signed-off-by: Marc Kleine-Budde Acked-by: Felipe Balbi --- changes since v1: - reworded patch description - Added Felipe's Ack drivers/usb/chipidea/udc.c |8 ++

[PATCH 3/5] usb: chipidea: udc: fix error path in udc_start()

2012-08-28 Thread Marc Kleine-Budde
This patch fixes the error path of udc_start(). Now NULL is used to unset the peripheral with otg_set_peripheral(). Signed-off-by: Marc Kleine-Budde Reviewed-by: Richard Zhao --- drivers/usb/chipidea/udc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb

[PATCH v2 0/5] usb: chipidea: fixes

2012-08-28 Thread Marc Kleine-Budde
Hello, this is a series fixes several problems in the chipidea udc driver. this applies to v3.6-rc3. These patches have been tested on mx28, mx53 and mx6q. Changes since v1: - reworded patch description for "fix setup of endpoint maxpacket size" - added Acked-by and Reviewed-by - added "cleanup

Re: [PATCH v6 1/3] USB: chipidea: add imx usbmisc support

2012-08-29 Thread Marc Kleine-Budde
to another imx driver, that only works if they are >>>> probed in the right order. I don't see any point in doing it like this >>>> other than inflating the device tree tables even further. >>>> >>>> Why can't this be part of the SoC code

Re: [PATCH 2/3] usb: otg: add device tree support to otg library

2012-08-29 Thread Marc Kleine-Budde
On 08/29/2012 05:14 AM, Richard Zhao wrote: > On Tue, Aug 28, 2012 at 07:43:11PM +0530, ABRAHAM, KISHON VIJAY wrote: >> Hi, >> >> On Tue, Aug 28, 2012 at 7:11 PM, Marc Kleine-Budde >> wrote: >>> On 08/

Re: [PATCH RFC] USB: EHCI on imx53

2012-09-03 Thread Marc Kleine-Budde
el() l.189. I guess some >> clock/enabling is still missing? >> >> Sascha, do you already have EHCI running on imx53? > > I'm sorry to say that you are sitting on a dead end. Please google for > chipidea, Richard Zhao, Marc Kleine-Budde. They are regularly dropping

Re: [PATCH RFC] USB: EHCI on imx53

2012-09-03 Thread Marc Kleine-Budde
On 09/03/2012 05:39 PM, Roland Stigge wrote: > Hi Marc and Sascha, > > On 09/03/2012 04:49 PM, Marc Kleine-Budde wrote: >>> On Mon, Sep 03, 2012 at 04:27:57PM +0200, Roland Stigge wrote: >>>> Hi, >>>> >>>> this is my first try on activating

Re: [PATCH 2/3] usb: otg: add device tree support to otg library

2012-09-04 Thread Marc Kleine-Budde
On 08/29/2012 10:11 PM, Marc Kleine-Budde wrote: [...] >>>>>> +struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev, >>>>>> +const char *phandle) >>>> >>>>> Since it's already a common function, we may give ph

Re: [PATCH v2 0/5] usb: chipidea: fixes

2012-09-04 Thread Marc Kleine-Budde
On 08/28/2012 03:57 PM, Marc Kleine-Budde wrote: > Hello, > > this is a series fixes several problems in the chipidea udc driver. this > applies to v3.6-rc3. > > These patches have been tested on mx28, mx53 and mx6q. > > Changes since v1: > - reworded patch de

Re: [PATCH 2/3] usb: otg: add device tree support to otg library

2012-09-04 Thread Marc Kleine-Budde
On 09/04/2012 03:45 PM, Felipe Balbi wrote: > On Tue, Sep 04, 2012 at 12:31:14PM +0200, Marc Kleine-Budde wrote: >> On 08/29/2012 10:11 PM, Marc Kleine-Budde wrote: >> [...] >> >>>>>>>> +struct usb_phy *devm_usb_get_phy_by_phandle(struct d

Re: [PATCH 2/3] usb: otg: add device tree support to otg library

2012-09-04 Thread Marc Kleine-Budde
fsl,imx6q-usb", "fsl,imx27-usb"; reg = <0x02184000 0x200>; interrupts = <0 43 0x04>; phy = <&usbphy1>; }; The existing "fsl,usbphy" will be renamed into just "phy". If a usb/otg device needs more than one phy the d

Re: [PATCH 2/3] usb: otg: add device tree support to otg library

2012-09-04 Thread Marc Kleine-Budde
>> usb@02184000 { /* USB OTG */ >> compatible = "fsl,imx6q-usb", "fsl,imx27-usb"; >> reg = <0x02184000 0x200>; >> interrupts = <0 43 0x04>; >> phy = <&usbphy1>; >> }; >> >> The existing "

[PATCH v3 0/5] usb: chipidea: fixes

2012-09-05 Thread Marc Kleine-Budde
Hello, this is a series fixes several problems in the chipidea udc driver. this applies to v3.6-rc4. These patches have been tested on mx28, mx53 and mx6q. Changes since v2: - reboase t v3.6-rc4 Changes since v1: - reworded patch description for "fix setup of endpoint maxpacket size" - added Ac

[PATCH v3 5/5] usb: chipidea: udc: don't stall endpoint if request list is empty in isr_tr_complete_low

2012-09-05 Thread Marc Kleine-Budde
lete bit will be set, too. The subsequent check (in ep0/dir1's loop cycle) for endpoint request list (mEp->qh.queue) empty will fail. Both other mainline chipidea drivers (mv_udc_core.c and fsl_udc_core.c) don't have this check. Signed-off-by: Michael Grzeschik Signed-off-

[PATCH v3 2/5] usb: chipidea: udc: add pullup fuction, needed by the uvc gadget

2012-09-05 Thread Marc Kleine-Budde
From: Michael Grzeschik Add function to physicaly enable or disable of pullup connection on the USB-D+ line. The uvc gaget will fail, if this function is not implemented. Signed-off-by: Michael Grzeschik Signed-off-by: Marc Kleine-Budde Acked-by: Felipe Balbi --- drivers/usb/chipidea/udc.c

[PATCH v3 4/5] usb: chipidea: cleanup dma_pool if udc_start() fails

2012-09-05 Thread Marc Kleine-Budde
If udc_start() fails the qh_pool dma-pool cannot be closed because it's still in use. This patch factors out the dma_pool_free() loop into destroy_eps() and calls it in the error path of udc_start(), too. Cc: Richard Zhao Signed-off-by: Marc Kleine-Budde --- drivers/usb/chipidea/udc.c |

[PATCH v3 1/5] usb: chipidea: udc: fix setup of endpoint maxpacket size

2012-09-05 Thread Marc Kleine-Budde
size before they enable the endpoint, which leads to a wrong state in these drivers. Cc: Signed-off-by: Michael Grzeschik Signed-off-by: Marc Kleine-Budde Acked-by: Felipe Balbi --- changes since v1: - reworded patch description - Added Felipe's Ack drivers/usb/chipidea/udc.c |8 ++

[PATCH v3 3/5] usb: chipidea: udc: fix error path in udc_start()

2012-09-05 Thread Marc Kleine-Budde
This patch fixes the error path of udc_start(). Now NULL is used to unset the peripheral with otg_set_peripheral(). Signed-off-by: Marc Kleine-Budde Reviewed-by: Richard Zhao --- drivers/usb/chipidea/udc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb

Re: [PATCH v2] usb: phy: add R-Car USB phy driver

2012-09-05 Thread Marc Kleine-Budde
dev_info(dev, "Initialized R-Car USB PHY\n"); > + > + return ret; > +} > + > +static int __exit rcar_usb_phy_remove(struct platform_device *pdev) > +{ > + struct rcar_usb_phy_priv *priv = platform_get_drvdata(pdev); > + > + usb_remove_phy(&priv->phy); > + > + return 0; > +} > + > +static struct platform_driver rcar_usb_phy_driver = { > + .driver = { > + .name = "rcar_usb_phy", > + }, > + .probe = rcar_usb_phy_probe, > + .remove = __devexit_p(rcar_usb_phy_remove), > +}; > + > +static int __init rcar_usb_phy_initcall(void) > +{ > + return platform_driver_register(&rcar_usb_phy_driver); > +} > + > +static void __exit rcar_usb_phy_exit(void) > +{ > + platform_driver_unregister(&rcar_usb_phy_driver); > +} > + > +subsys_initcall(rcar_usb_phy_initcall); > +module_exit(rcar_usb_phy_exit); > + > +MODULE_LICENSE("GPL"); > +MODULE_DESCRIPTION("Renesas R-Car USB phy"); > +MODULE_AUTHOR("Kuninori Morimoto "); > Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917- | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | signature.asc Description: OpenPGP digital signature

Re: [PATCH v2 00/11] chipidea/imx: add otg support and some bug fix

2012-09-05 Thread Marc Kleine-Budde
|8 ++ > drivers/usb/chipidea/udc.c | 40 +++- > drivers/usb/otg/mxs-phy.c | 21 +++ > include/linux/usb/chipidea.h |2 ++ > 8 files changed, 128 insertions(+), 33 deletions(-) Tested-by: Marc Kleine-Budde

Re: [PATCH v3 2/5] usb: chipidea: udc: add pullup fuction, needed by the uvc gadget

2012-09-06 Thread Marc Kleine-Budde
On 09/06/2012 02:26 PM, Alexander Shishkin wrote: > Marc Kleine-Budde writes: > >> From: Michael Grzeschik >> >> Add function to physicaly enable or disable of pullup connection on the >> USB-D+ >> line. The uvc gaget will fail, if this function is not imple

[PATCH 0/2] usb: chipidea: usbmisc: cleanups and prepare for multi soc support

2012-09-06 Thread Marc Kleine-Budde
Hello, these patches apply to Richard's usb-driver branch [1] and prepare the usbmisc driver for multi-soc support. Feel free to squash into your patches, or add to your tree. regards, Marc [1] https://github.com/riczhao/kernel-imx/tree/topics/usb-driver -- To unsubscribe from this list: send

[PATCH 1/2] usb: chipidea: usbmisc: unset global varibale usbmisc on driver remove

2012-09-06 Thread Marc Kleine-Budde
While there fix a potential race condition, first set usbmisc, then call usbmisc_set_ops(). Signed-off-by: Marc Kleine-Budde --- drivers/usb/chipidea/usbmisc_imx6q.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/usbmisc_imx6q.c b/drivers/usb

[PATCH 2/2] usb: chipidea: usbmisc: prepare driver to handle more than one soc

2012-09-06 Thread Marc Kleine-Budde
Signed-off-by: Marc Kleine-Budde --- drivers/usb/chipidea/usbmisc_imx6q.c |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/usb/chipidea/usbmisc_imx6q.c b/drivers/usb/chipidea/usbmisc_imx6q.c index edc0edd7..5989a80 100644 --- a/drivers/usb/chipidea

Re: [PATCH 2/2] usb: chipidea: usbmisc: prepare driver to handle more than one soc

2012-09-06 Thread Marc Kleine-Budde
On 09/06/2012 02:37 PM, Marc Kleine-Budde wrote: > Signed-off-by: Marc Kleine-Budde > --- > drivers/usb/chipidea/usbmisc_imx6q.c |9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/chipidea/usbmisc_imx6q.c > b/drivers/usb/chi

Re: [PATCH v3 5/5] usb: chipidea: udc: don't stall endpoint if request list is empty in isr_tr_complete_low

2012-09-06 Thread Marc Kleine-Budde
On 09/06/2012 02:46 PM, Alexander Shishkin wrote: > Marc Kleine-Budde writes: > >> From: Michael Grzeschik >> >> When attaching an imx28 or imx53 in USB gadget mode to a Windows host and >> starting a rndis connection we see this message every 4-10 seconds: >&g

Re: chipidea driver

2012-09-06 Thread Marc Kleine-Budde
On 09/06/2012 03:05 PM, Alexander Shishkin wrote: > Greg KH writes: > >> On Fri, Aug 24, 2012 at 10:09:11AM +0800, Richard Zhao wrote: >>> On Thu, Aug 23, 2012 at 06:57:03PM +0200, Marc Kleine-Budde wrote: >>>> Hello, >>>> >>>> Mich

Re: chipidea driver

2012-09-06 Thread Marc Kleine-Budde
12-08-27 07:15:30 -0700) are available in the git repository at: git://git.pengutronix.de/git/mkl/linux.git chipidea-next for you to fetch changes up to b5b9c55d667986b4a6d66d5721c92acbd42baf6e: usb: chipidea: udc: don't stall endpoint if request list is empty in isr_tr_complete_low (20

Re: [PATCH 1/2] usb: chipidea: usbmisc: unset global varibale usbmisc on driver remove

2012-09-06 Thread Marc Kleine-Budde
On 09/06/2012 05:11 PM, Richard Zhao wrote: > Hi Marc, > > Thanks for your patch. It's good. Please include or squash in your tree. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | V

Re: [PATCH 2/2] usb: chipidea: usbmisc: prepare driver to handle more than one soc

2012-09-06 Thread Marc Kleine-Budde
itten. Marc [1] http://git.pengutronix.de/?p=mkl/linux.git;a=commit;h=bdeff138ba8bb40856c9946b67df2604fdb4416b -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206

Re: [PATCH 2/3] usb: otg: add device tree support to otg library

2012-09-06 Thread Marc Kleine-Budde
is into a kernel-wide PHY layer. >> I think Marc is wondering how to handle the below two case in such way. >> - how to get the port number the phy is attached to >> - how to describe it if a port has two phys. > > Would something like below work ? >

Re: [PATCH v5 1/5] usb: phy: samsung: Introducing usb phy driver for hsotg

2012-09-12 Thread Marc Kleine-Budde
ynos4210-usbphy", > + .driver_data= TYPE_EXYNOS4210, > + }, > + {}, > +}; > + > +MODULE_DEVICE_TABLE(platform, samsung_usbphy_driver_ids); > + > +static struct platform_driver samsung_usbphy_driver = { > + .probe = samsung_us

Re: [PATCH 2/2] usb: chipidea: usbmisc: prepare driver to handle more than one soc

2012-09-12 Thread Marc Kleine-Budde
On 09/07/2012 10:20 AM, Richard Zhao wrote: > On Thu, Sep 06, 2012 at 05:18:29PM +0200, Marc Kleine-Budde wrote: >> On 09/06/2012 05:15 PM, Richard Zhao wrote: >>> Hi Marc, >>> >>> usbmisc_imx6q.c is only for imx6x. And for a certain running kernel, >>

Re: [PATCH v4] usb: phy: add R-Car USB phy driver

2012-09-12 Thread Marc Kleine-Budde
> + priv->phy.dev = dev; > + priv->phy.label = dev_name(dev); > + priv->phy.init = rcar_usb_phy_init; > + priv->phy.shutdown = rcar_usb_phy_shutdown; > + spin_lock_init(&priv->lock); > + > + ret = usb_a

Re: [PATCH 2/3] usb: otg: add device tree support to otg library

2012-09-12 Thread Marc Kleine-Budde
On 09/06/2012 05:27 PM, Marc Kleine-Budde wrote: >>>>>> We can use something like "-phy" as the phandle name. And the >>>>>> users can get the phy by using >>>>>> devm_usb_get_phy_by_phandle(dev, ""). >>>

Re: [RFC PATCH] drivers: phy: add generic PHY framework

2012-09-14 Thread Marc Kleine-Budde
n struct phy *devm_of_phy_get(struct device *dev, const char *phandle); > +extern struct phy *phy_get(struct device *dev, u8 index); > +extern void phy_put(struct phy *phy); > +extern struct phy *create_phy(struct device *dev, struct phy_descriptor > *desc); > +extern void destroy_phy(struct phy *phy); > +extern struct phy_bind *phy_bind(const char *dev_name, u8 index, > + const char *phy_dev_name); > +#else > +static inline struct phy *devm_phy_get(struct device *dev, u8 index) > +{ > + return ERR_PTR(-EINVAL); > +} > + > +static inline void devm_phy_put(struct device *dev, struct phy *phy) > +{ > +} > + > +static inline struct phy *devm_of_phy_get(struct device *dev, > + const char *phandle) > +{ > + return ERR_PTR(-EINVAL); > +} > + > +static inline struct phy *phy_get(struct device *dev, u8 index) > +{ > + return ERR_PTR(-EINVAL); > +} > + > +static inline void phy_put(struct phy *phy) > +{ > +} > + > +static inline struct phy *create_phy(struct device *dev, > + struct phy_descriptor *desc) > +{ > + return ERR_PTR(-EINVAL); > +} > + > +static inline void destroy_phy(struct phy *phy) > +{ > +} > + > +static inline struct phy_bind *phy_bind(const char *dev_name, u8 index, > + const char *phy_dev_name) > +{ > +} > +#endif > + > +static inline int phy_init(struct phy *phy) > +{ > + if (phy->desc->ops->init) > + return phy->desc->ops->init(phy->desc); > + > + return -EINVAL; > +} > + > +static inline int phy_exit(struct phy *phy) > +{ > + if (phy->desc->ops->exit) > + return phy->desc->ops->exit(phy->desc); > + > + return -EINVAL; > +} > + > +static inline int phy_suspend(struct phy *phy) > +{ > + if (phy->desc->ops->suspend) > + return phy->desc->ops->suspend(phy->desc); > + > + return -EINVAL; > +} > + > +static inline int phy_resume(struct phy *phy) > +{ > + if (phy->desc->ops->resume) > + return phy->desc->ops->resume(phy->desc); > + > + return -EINVAL; > +} > + > +static inline int phy_poweron(struct phy *phy) > +{ > + if (phy->desc->ops->poweron) > + return phy->desc->ops->poweron(phy->desc); > + > + return -EINVAL; > +} > + > +static inline void phy_shutdown(struct phy *phy) > +{ > + if (phy->desc->ops->shutdown) > + phy->desc->ops->shutdown(phy->desc); > +} > +#endif /* __DRIVERS_PHY_H */ > -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917- | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | signature.asc Description: OpenPGP digital signature

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

2013-07-11 Thread Marc Kleine-Budde
{ > enum ci_role role = ci_otg_role(ci); > @@ -76,6 +77,9 @@ static void ci_handle_id_switch(struct ci_hdrc *ci) > ci_role(ci)->name, ci->roles[role]->name); > > ci_role_stop(ci); > + /* wait vbus lower than OTGSC_BSV */ >

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

2013-07-11 Thread Marc Kleine-Budde
On 07/11/2013 11:25 AM, Peter Chen wrote: > On Thu, Jul 11, 2013 at 09:24:56AM +0200, Marc Kleine-Budde wrote: >> On 07/11/2013 08:27 AM, Peter Chen wrote: >>> When the gadget role starts, we need to make sure the vbus is lower >>> than OTGSC_BSV, or there will be an

Re: [PATCH v4 1/3] usb: ehci: add freescale imx28 special write register method

2013-11-11 Thread Marc Kleine-Budde
writel_be(val, regs) : > writel(val, regs); > +#elif defined(CONFIG_SOC_IMX28) > + if (ehci->imx28_write_fix) > + imx28_ehci_writel(val, regs); > + else > + writel(val, regs); > #else > writel(val, regs); > #endif

<    1   2   3   >