From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Vivek Gautam <gautam.vivek@samsung.com>
Cc: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
gregkh@linuxfoundation.org, balbi@ti.com,
sarah.a.sharp@linux.intel.com, kgene.kim@samsung.com,
kishon@ti.com, jg1.han@samsung.com, jwerner@chromium.org
Subject: Re: [PATCH RFC 3/4] xhci: Tune PHY for the DWC3-Exynos host controller
Date: Tue, 10 Dec 2013 15:55:48 +0200 [thread overview]
Message-ID: <20131210135548.GA28456@xps8300> (raw)
In-Reply-To: <1386672926-26885-4-git-send-email-gautam.vivek@samsung.com>
Hi,
On Tue, Dec 10, 2013 at 04:25:25PM +0530, Vivek Gautam wrote:
> @@ -170,6 +189,15 @@ static int xhci_plat_probe(struct platform_device *pdev)
> }
>
> /*
> + * The parent of the xhci-plat device may pass in a PHY via
> + * platform data. If it exists, store it in our struct usb_hcd
> + * so that we can use it later.
> + */
> + phy_generic = dev_get_platdata(&pdev->dev);
> + if (phy_generic)
> + xhci->shared_hcd->phy_generic = *phy_generic;
Getting the handle to the phy from platform data like this is not
going to work for long. It should be possible to get it normally with
phy_get(). It's not going to be possible to get the handle from the
platform data like this if the xhci-hcd platform device is created
from ACPI or DT. You are also not considering case where you have two
phys.
Vivek, I have made a patch set for the phy framework allowing
associations between the phys and their users to be made in same way
gpios and clk make them. With those you should be able to create a
lookup entry to the phy framework in drivers/usb/dwc3/host.c. Then we
could use phy_get() here already. Please check them. Subject of the
thread:
"phy: remove the need for the phys to know about their users"
The lookup table can then be added in drivers/usb/dwc3/host.c with
something like this:
int dwc3_host_init(struct dwc3 *dwc)
{
struct platform_device *xhci;
struct phy_lookup_table *table;
...
table->dev_id = dev_name(&xhci->dev);
if (dwc->usb2_generic_phy)
table->table[0].phy_name = dev_name(&dwc->usb2_generic_phy->dev);
if (dwc->usb3_generic_phy)
table->table[1].phy_name = dev_name(&dwc->usb3_generic_phy->dev);
phy_add_lookup_table(table);
...
Br,
--
heikki
next prev parent reply other threads:[~2013-12-10 13:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 10:55 [PATCH RFC 0/4] Fine tune USB 3.0 PHY on exynos5420 Vivek Gautam
2013-12-10 10:55 ` [PATCH RFC 1/4] phy: Add provision for tuning phy Vivek Gautam
2013-12-10 14:01 ` Heikki Krogerus
2013-12-11 6:38 ` Vivek Gautam
2013-12-11 8:09 ` Heikki Krogerus
2013-12-11 8:32 ` Vivek Gautam
2013-12-11 8:54 ` Heikki Krogerus
2013-12-11 8:17 ` Kishon Vijay Abraham I
2013-12-11 8:33 ` Vivek Gautam
2013-12-10 10:55 ` [PATCH RFC 2/4] xhci: Add quirk for DWC3-Exynos controller Vivek Gautam
2013-12-10 18:25 ` Julius Werner
2013-12-10 10:55 ` [PATCH RFC 3/4] xhci: Tune PHY for the DWC3-Exynos host controller Vivek Gautam
2013-12-10 13:55 ` Heikki Krogerus [this message]
2014-04-15 12:54 ` Vivek Gautam
2014-04-16 14:12 ` Heikki Krogerus
2014-04-21 4:20 ` Vivek Gautam
2013-12-10 10:55 ` [PATCH RFC 4/4] phy-exynos-usb3: Fine tune LOS levels for exynos5420 Vivek Gautam
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=20131210135548.GA28456@xps8300 \
--to=heikki.krogerus@linux.intel.com \
--cc=balbi@ti.com \
--cc=gautam.vivek@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=jg1.han@samsung.com \
--cc=jwerner@chromium.org \
--cc=kgene.kim@samsung.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
/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