Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
* Re: [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
       [not found] ` <1412679771-8293-1-git-send-email-ghorbel@pivasoftware.com>
@ 2014-10-29 23:09   ` Rabin Vincent
  2014-10-30  5:16     ` Kishon Vijay Abraham I
  0 siblings, 1 reply; 2+ messages in thread
From: Rabin Vincent @ 2014-10-29 23:09 UTC (permalink / raw)
  To: kishon, tony; +Cc: rogerq, linux-usb, linux-kernel, ghorbel, linux-omap

Unless I'm missing something, this patch appears to have still not been
picked up.  It would be nice if it can go in for 3.18 so that we have
working USB on pandaboard again at least in that release.

Tony, would you mind carrying it as OMAP maintainer since we haven't
heard anything from Kishon (the PHY maintainer) about this?  It's been
acked by Roger (whose patch introduced the problem).

Thanks.

(leaving the patch intact below)

On Tue, Oct 07, 2014 at 12:02:51PM +0100, Oussama Ghorbel wrote:
> The USB OTG port does not work since v3.16 on omap platform.
> This is a regression introduced by the commit
> eb82a3d846fa (phy: omap-usb2: Balance pm_runtime_enable() on probe failure
>  and remove).
> This because the call to pm_runtime_enable() function is moved after the
> call to devm_phy_create() function, which has side effect since later in
> the subsequent calls of devm_phy_create() there is a check with
> pm_runtime_enabled() to configure few things.
> 
> Signed-off-by: Oussama Ghorbel <ghorbel@pivasoftware.com>
> ---
>  drivers/phy/phy-omap-usb2.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
> index 93d7835..acc13f8 100644
> --- a/drivers/phy/phy-omap-usb2.c
> +++ b/drivers/phy/phy-omap-usb2.c
> @@ -262,14 +262,16 @@ static int omap_usb2_probe(struct platform_device *pdev)
>  	otg->phy		= &phy->phy;
>  
>  	platform_set_drvdata(pdev, phy);
> +	pm_runtime_enable(phy->dev);
>  
>  	generic_phy = devm_phy_create(phy->dev, NULL, &ops, NULL);
> -	if (IS_ERR(generic_phy))
> +	if (IS_ERR(generic_phy)) {
> +		pm_runtime_disable(phy->dev);
>  		return PTR_ERR(generic_phy);
> +	}
>  
>  	phy_set_drvdata(generic_phy, phy);
>  
> -	pm_runtime_enable(phy->dev);
>  	phy_provider = devm_of_phy_provider_register(phy->dev,
>  			of_phy_simple_xlate);
>  	if (IS_ERR(phy_provider)) {
> -- 
> 1.8.3.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly
  2014-10-29 23:09   ` [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly Rabin Vincent
@ 2014-10-30  5:16     ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 2+ messages in thread
From: Kishon Vijay Abraham I @ 2014-10-30  5:16 UTC (permalink / raw)
  To: Rabin Vincent, tony; +Cc: rogerq, linux-usb, linux-kernel, ghorbel, linux-omap



On Thursday 30 October 2014 04:39 AM, Rabin Vincent wrote:
> Unless I'm missing something, this patch appears to have still not been
> picked up.  It would be nice if it can go in for 3.18 so that we have
> working USB on pandaboard again at least in that release.
> 
> Tony, would you mind carrying it as OMAP maintainer since we haven't
> heard anything from Kishon (the PHY maintainer) about this?  It's been
> acked by Roger (whose patch introduced the problem).

I'll send this in this -rc cycle.

Thanks
Kishon

> 
> Thanks.
> 
> (leaving the patch intact below)
> 
> On Tue, Oct 07, 2014 at 12:02:51PM +0100, Oussama Ghorbel wrote:
>> The USB OTG port does not work since v3.16 on omap platform.
>> This is a regression introduced by the commit
>> eb82a3d846fa (phy: omap-usb2: Balance pm_runtime_enable() on probe failure
>>  and remove).
>> This because the call to pm_runtime_enable() function is moved after the
>> call to devm_phy_create() function, which has side effect since later in
>> the subsequent calls of devm_phy_create() there is a check with
>> pm_runtime_enabled() to configure few things.
>>
>> Signed-off-by: Oussama Ghorbel <ghorbel@pivasoftware.com>
>> ---
>>  drivers/phy/phy-omap-usb2.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
>> index 93d7835..acc13f8 100644
>> --- a/drivers/phy/phy-omap-usb2.c
>> +++ b/drivers/phy/phy-omap-usb2.c
>> @@ -262,14 +262,16 @@ static int omap_usb2_probe(struct platform_device *pdev)
>>  	otg->phy		= &phy->phy;
>>  
>>  	platform_set_drvdata(pdev, phy);
>> +	pm_runtime_enable(phy->dev);
>>  
>>  	generic_phy = devm_phy_create(phy->dev, NULL, &ops, NULL);
>> -	if (IS_ERR(generic_phy))
>> +	if (IS_ERR(generic_phy)) {
>> +		pm_runtime_disable(phy->dev);
>>  		return PTR_ERR(generic_phy);
>> +	}
>>  
>>  	phy_set_drvdata(generic_phy, phy);
>>  
>> -	pm_runtime_enable(phy->dev);
>>  	phy_provider = devm_of_phy_provider_register(phy->dev,
>>  			of_phy_simple_xlate);
>>  	if (IS_ERR(phy_provider)) {
>> -- 
>> 1.8.3.2
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-30  5:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20141006194418.GA399@debian>
     [not found] ` <1412679771-8293-1-git-send-email-ghorbel@pivasoftware.com>
2014-10-29 23:09   ` [PATCHv2] phy: omap-usb2: Enable runtime PM of omap-usb2 phy properly Rabin Vincent
2014-10-30  5:16     ` Kishon Vijay Abraham I

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox