From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kishon Vijay Abraham I Subject: Re: [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy Date: Tue, 30 Jul 2013 11:55:04 +0530 Message-ID: <51F75C40.4060406@ti.com> References: <1374829418-27503-1-git-send-email-kishon@ti.com> <1374829418-27503-3-git-send-email-kishon@ti.com> <20130729150638.GD3063@radagast> <51F68A56.8060805@ti.com> <20130729175413.GC4964@radagast> <51F74BC8.7020903@ti.com> <20130730060134.GD9155@radagast> <51F7590B.4020705@ti.com> <20130730061830.GE9155@radagast> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <20130730061830.GE9155@radagast> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: balbi@ti.com Cc: linux@arm.linux.org.uk, tony@atomide.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, eballetbo@gmail.com, javier@dowhile0.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org List-Id: linux-omap@vger.kernel.org SGksCgpPbiBUdWVzZGF5IDMwIEp1bHkgMjAxMyAxMTo0OCBBTSwgRmVsaXBlIEJhbGJpIHdyb3Rl Ogo+IEhpLAo+IAo+IE9uIFR1ZSwgSnVsIDMwLCAyMDEzIGF0IDExOjQxOjIzQU0gKzA1MzAsIEtp c2hvbiBWaWpheSBBYnJhaGFtIEkgd3JvdGU6Cj4+Pj4+Pj4+IGRpZmYgLS1naXQgYS9hcmNoL2Fy bS9tYWNoLW9tYXAyL2JvYXJkLTI0MzBzZHAuYyBiL2FyY2gvYXJtL21hY2gtb21hcDIvYm9hcmQt MjQzMHNkcC5jCj4+Pj4+Pj4+IGluZGV4IDI0NGQ4YTUuLjE3YmIwNzYgMTAwNjQ0Cj4+Pj4+Pj4+ IC0tL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HNlIE1VU0IgaW4gT01BUDMKcGxhdGZvcm1zIHdvbnQgd29yayBhZnRl ciBHZW5lcmljIFBIWSBmcmFtZXdvcmsgZ2V0cyBtZXJnZWQuCgpUaGFua3MKS2lzaG9uCgpfX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpsaW51eC1hcm0ta2Vy bmVsIG1haWxpbmcgbGlzdApsaW51eC1hcm0ta2VybmVsQGxpc3RzLmluZnJhZGVhZC5vcmcKaHR0 cDovL2xpc3RzLmluZnJhZGVhZC5vcmcvbWFpbG1hbi9saXN0aW5mby9saW51eC1hcm0ta2VybmVs Cg== From mboxrd@z Thu Jan 1 00:00:00 1970 From: kishon@ti.com (Kishon Vijay Abraham I) Date: Tue, 30 Jul 2013 11:55:04 +0530 Subject: [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy In-Reply-To: <20130730061830.GE9155@radagast> References: <1374829418-27503-1-git-send-email-kishon@ti.com> <1374829418-27503-3-git-send-email-kishon@ti.com> <20130729150638.GD3063@radagast> <51F68A56.8060805@ti.com> <20130729175413.GC4964@radagast> <51F74BC8.7020903@ti.com> <20130730060134.GD9155@radagast> <51F7590B.4020705@ti.com> <20130730061830.GE9155@radagast> Message-ID: <51F75C40.4060406@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, On Tuesday 30 July 2013 11:48 AM, Felipe Balbi wrote: > Hi, > > On Tue, Jul 30, 2013 at 11:41:23AM +0530, Kishon Vijay Abraham I wrote: >>>>>>>> diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c >>>>>>>> index 244d8a5..17bb076 100644 >>>>>>>> --- a/arch/arm/mach-omap2/board-2430sdp.c >>>>>>>> +++ b/arch/arm/mach-omap2/board-2430sdp.c >>>>>>>> @@ -233,7 +233,7 @@ static void __init omap_2430sdp_init(void) >>>>>>>> omap_hsmmc_init(mmc); >>>>>>>> >>>>>>>> omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP); >>>>>>>> - usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); >>>>>>>> + usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb"); >>>>>>> >>>>>>> how about moving usb_bind_phy() calls to omap2430.c ? >>>>>>> >>>>>>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c >>>>>>> index f44e8b5..b6abc1a 100644 >>>>>>> --- a/drivers/usb/musb/omap2430.c >>>>>>> +++ b/drivers/usb/musb/omap2430.c >>>>>>> @@ -544,6 +544,9 @@ static int omap2430_probe(struct platform_device *pdev) >>>>>>> >>>>>>> pdata->board_data = data; >>>>>>> pdata->config = config; >>>>>>> + } else { >>>>>>> + /* bind the PHY */ >>>>>>> + usb_bind_phy(dev_name(&musb->dev), 0, "twl4030_usb"); >>>>>> >>>>>> This looks like a hack IMHO to workaround the usb phy library. otherwise it is >>>>>> similar to get_phy_by_name. >>>>> >>>>> actually, this is a workaround to the fact that we're not creating all >>>>> platform_devices in arch/arm/mach-omap2/ :-) >>>>> >>>>> If we had the musb allocation there, we could easily handle >>>>> usb_bind_phy() >>>>> >>>>>>> so that's temporary. It might be better than to reintroduce the IDR in >>>>>>> musb_core.c. >>>>>> >>>>>> that?s needed for generic phy framework anyway :-s >>>>> >>>>> right, but generic phy framework can handle everything just fine, the >>>>> only problem is that names are changing. >>>> >>>> right. But if the names change, PHY framework wouldn't be able to return the >>>> reference to the PHY. >>> >>> with my suggestion they can change whenever they want since we're using >>> dev_name() of the just-created musb platform_device. Right ? >> >> right. But the PHY device can be created in a different place from where the >> musb devices are created. And in the PHY framework, the PHY device should have > > this shouldn't be a problem. As long as the phy is created, all should > be good. > >> the list of controller device (names) it can support (PHY framework does not >> maintain a separate list for binding like how we had in USB PHY library). e.g. >> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg92817.html. In such > > this has nothing to do with $subject though. We talk about generic PHY > framework once all these PHY drivers are moved there :-) > >> cases how do we pass the device names. Also will the MUSB core device be >> created before twl4030-usb PHY device? > > and why would that be a problem ? We're telling the framework that the > musb device will use a phy with a name of 'twl4030'. If musb calls > usb_get_phy_dev() and doesn't find a phy, it'll return -EPROBE_DEFER and > try again later. I think we are talking about different problems here ;-) I'm trying to tell using idr in MUSB core is needed for Generic PHY Framework. So in a way, the Generic PHY Framework series depends on this patch series or else MUSB in OMAP3 platforms wont work after Generic PHY framework gets merged. Thanks Kishon From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757499Ab3G3GZ7 (ORCPT ); Tue, 30 Jul 2013 02:25:59 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:58253 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751206Ab3G3GZ5 (ORCPT ); Tue, 30 Jul 2013 02:25:57 -0400 Message-ID: <51F75C40.4060406@ti.com> Date: Tue, 30 Jul 2013 11:55:04 +0530 From: Kishon Vijay Abraham I User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: CC: , , , , , , , , Subject: Re: [PATCH 2/2] arm: omap: remove *.auto* from device names given in usb_bind_phy References: <1374829418-27503-1-git-send-email-kishon@ti.com> <1374829418-27503-3-git-send-email-kishon@ti.com> <20130729150638.GD3063@radagast> <51F68A56.8060805@ti.com> <20130729175413.GC4964@radagast> <51F74BC8.7020903@ti.com> <20130730060134.GD9155@radagast> <51F7590B.4020705@ti.com> <20130730061830.GE9155@radagast> In-Reply-To: <20130730061830.GE9155@radagast> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tuesday 30 July 2013 11:48 AM, Felipe Balbi wrote: > Hi, > > On Tue, Jul 30, 2013 at 11:41:23AM +0530, Kishon Vijay Abraham I wrote: >>>>>>>> diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c >>>>>>>> index 244d8a5..17bb076 100644 >>>>>>>> --- a/arch/arm/mach-omap2/board-2430sdp.c >>>>>>>> +++ b/arch/arm/mach-omap2/board-2430sdp.c >>>>>>>> @@ -233,7 +233,7 @@ static void __init omap_2430sdp_init(void) >>>>>>>> omap_hsmmc_init(mmc); >>>>>>>> >>>>>>>> omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP); >>>>>>>> - usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); >>>>>>>> + usb_bind_phy("musb-hdrc.0", 0, "twl4030_usb"); >>>>>>> >>>>>>> how about moving usb_bind_phy() calls to omap2430.c ? >>>>>>> >>>>>>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c >>>>>>> index f44e8b5..b6abc1a 100644 >>>>>>> --- a/drivers/usb/musb/omap2430.c >>>>>>> +++ b/drivers/usb/musb/omap2430.c >>>>>>> @@ -544,6 +544,9 @@ static int omap2430_probe(struct platform_device *pdev) >>>>>>> >>>>>>> pdata->board_data = data; >>>>>>> pdata->config = config; >>>>>>> + } else { >>>>>>> + /* bind the PHY */ >>>>>>> + usb_bind_phy(dev_name(&musb->dev), 0, "twl4030_usb"); >>>>>> >>>>>> This looks like a hack IMHO to workaround the usb phy library. otherwise it is >>>>>> similar to get_phy_by_name. >>>>> >>>>> actually, this is a workaround to the fact that we're not creating all >>>>> platform_devices in arch/arm/mach-omap2/ :-) >>>>> >>>>> If we had the musb allocation there, we could easily handle >>>>> usb_bind_phy() >>>>> >>>>>>> so that's temporary. It might be better than to reintroduce the IDR in >>>>>>> musb_core.c. >>>>>> >>>>>> that’s needed for generic phy framework anyway :-s >>>>> >>>>> right, but generic phy framework can handle everything just fine, the >>>>> only problem is that names are changing. >>>> >>>> right. But if the names change, PHY framework wouldn't be able to return the >>>> reference to the PHY. >>> >>> with my suggestion they can change whenever they want since we're using >>> dev_name() of the just-created musb platform_device. Right ? >> >> right. But the PHY device can be created in a different place from where the >> musb devices are created. And in the PHY framework, the PHY device should have > > this shouldn't be a problem. As long as the phy is created, all should > be good. > >> the list of controller device (names) it can support (PHY framework does not >> maintain a separate list for binding like how we had in USB PHY library). e.g. >> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg92817.html. In such > > this has nothing to do with $subject though. We talk about generic PHY > framework once all these PHY drivers are moved there :-) > >> cases how do we pass the device names. Also will the MUSB core device be >> created before twl4030-usb PHY device? > > and why would that be a problem ? We're telling the framework that the > musb device will use a phy with a name of 'twl4030'. If musb calls > usb_get_phy_dev() and doesn't find a phy, it'll return -EPROBE_DEFER and > try again later. I think we are talking about different problems here ;-) I'm trying to tell using idr in MUSB core is needed for Generic PHY Framework. So in a way, the Generic PHY Framework series depends on this patch series or else MUSB in OMAP3 platforms wont work after Generic PHY framework gets merged. Thanks Kishon