mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	"balbi@ti.com" <balbi@ti.com>
Cc: Vivek Gautam <gautam.vivek@samsung.com>,
	<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>,
	<andrew.kim@intel.com>
Subject: Re: [PATCHv4 6/6] usb: dwc3: host: convey the PHYs to xhci
Date: Thu, 6 Nov 2014 12:55:39 +0530	[thread overview]
Message-ID: <545B2273.2010709@ti.com> (raw)
In-Reply-To: <1413556756-5050-7-git-send-email-heikki.krogerus@linux.intel.com>

Hi Felipe,

On Friday 17 October 2014 08:09 PM, Heikki Krogerus wrote:
> On some platforms a PHY may need to be handled also in the
> host controller driver. Exynos5420 SoC requires some "PHY
> tuning" based on the USB speed. This patch delivers dwc3's
> PHYs to the xhci platform device when it's created.
> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Tested-by: Vivek Gautam <gautam.vivek@samsung.com>
> Acked-by: Felipe Balbi <balbi@ti.com>

Already see you acked-by, so I'm queueing this in my linux-phy tree.

Thanks
Kishon
> ---
>  drivers/usb/dwc3/host.c | 22 ++++++++++++++++------
>  1 file changed, 16 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
> index dcb8ca0..12bfd3c 100644
> --- a/drivers/usb/dwc3/host.c
> +++ b/drivers/usb/dwc3/host.c
> @@ -29,8 +29,7 @@ int dwc3_host_init(struct dwc3 *dwc)
>  	xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO);
>  	if (!xhci) {
>  		dev_err(dwc->dev, "couldn't allocate xHCI device\n");
> -		ret = -ENOMEM;
> -		goto err0;
> +		return -ENOMEM;
>  	}
>  
>  	dma_set_coherent_mask(&xhci->dev, dwc->dev->coherent_dma_mask);
> @@ -60,22 +59,33 @@ int dwc3_host_init(struct dwc3 *dwc)
>  		goto err1;
>  	}
>  
> +	phy_create_lookup(dwc->usb2_generic_phy, "usb2-phy",
> +			  dev_name(&xhci->dev));
> +	phy_create_lookup(dwc->usb3_generic_phy, "usb3-phy",
> +			  dev_name(&xhci->dev));
> +
>  	ret = platform_device_add(xhci);
>  	if (ret) {
>  		dev_err(dwc->dev, "failed to register xHCI device\n");
> -		goto err1;
> +		goto err2;
>  	}
>  
>  	return 0;
> -
> +err2:
> +	phy_remove_lookup(dwc->usb2_generic_phy, "usb2-phy",
> +			  dev_name(&xhci->dev));
> +	phy_remove_lookup(dwc->usb3_generic_phy, "usb3-phy",
> +			  dev_name(&xhci->dev));
>  err1:
>  	platform_device_put(xhci);
> -
> -err0:
>  	return ret;
>  }
>  
>  void dwc3_host_exit(struct dwc3 *dwc)
>  {
> +	phy_remove_lookup(dwc->usb2_generic_phy, "usb2-phy",
> +			  dev_name(&dwc->xhci->dev));
> +	phy_remove_lookup(dwc->usb3_generic_phy, "usb3-phy",
> +			  dev_name(&dwc->xhci->dev));
>  	platform_device_unregister(dwc->xhci);
>  }
> 

      reply	other threads:[~2014-11-06  7:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-17 14:39 [PATCHv4 0/6] phy: simplified phy lookup Heikki Krogerus
2014-10-17 14:39 ` [PATCHv4 1/6] phy: safer to_phy() macro Heikki Krogerus
2014-10-17 15:31   ` Felipe Balbi
2014-10-17 14:39 ` [PATCHv4 2/6] phy: improved lookup method Heikki Krogerus
2014-10-31 12:33   ` Vivek Gautam
2014-11-11  6:42     ` Kishon Vijay Abraham I
2014-11-11  8:37       ` Vivek Gautam
2014-11-11  8:50         ` Kishon Vijay Abraham I
2014-11-11  8:53           ` Vivek Gautam
2014-11-13 13:33             ` Vivek Gautam
2014-11-14 14:15               ` Heikki Krogerus
2014-11-17 12:08                 ` Vivek Gautam
2014-11-17 15:40               ` Heikki Krogerus
2014-11-18  5:19                 ` Kishon Vijay Abraham I
2014-11-18 15:36                   ` Heikki Krogerus
2014-11-19  5:33                     ` Kishon Vijay Abraham I
2014-11-19  6:12                     ` Kishon Vijay Abraham I
2014-10-17 14:39 ` [PATCHv4 3/6] arm: omap3: twl: use the new lookup method with usb phy Heikki Krogerus
2014-11-03 21:26   ` Tony Lindgren
2014-10-17 14:39 ` [PATCHv4 4/6] phy: remove the old lookup method Heikki Krogerus
2014-10-17 14:39 ` [PATCHv4 5/6] base: platform: name the device already during allocation Heikki Krogerus
2014-10-17 14:39 ` [PATCHv4 6/6] usb: dwc3: host: convey the PHYs to xhci Heikki Krogerus
2014-11-06  7:25   ` Kishon Vijay Abraham I [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=545B2273.2010709@ti.com \
    --to=kishon@ti.com \
    --cc=andrew.kim@intel.com \
    --cc=balbi@ti.com \
    --cc=gautam.vivek@samsung.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome