summaryrefslogtreecommitdiff
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorKamil Debski <k.debski@samsung.com>2013-09-26 10:04:02 +0200
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:44:51 +0900
commit6f2010b1acce0b48d0475e5d47df3cb86b68778a (patch)
tree7c2225fc23637a614d7659476bce43cd98a2af01 /drivers/usb/host
parent5262b4389d148c7b73da2e93f997f52b551cbccd (diff)
downloadlinux-3.10-6f2010b1acce0b48d0475e5d47df3cb86b68778a.tar.gz
linux-3.10-6f2010b1acce0b48d0475e5d47df3cb86b68778a.tar.bz2
linux-3.10-6f2010b1acce0b48d0475e5d47df3cb86b68778a.zip
ehci-s5p: Use device tree to get name of desired phy
With this patch the name of the phy that should be used is read from the device tree. This gives more flexibility to use the driver without recompiling. Signed-off-by: Kamil Debski <k.debski@samsung.com>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-s5p.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c
index c0b3ebdba00..49ec64c58a6 100644
--- a/drivers/usb/host/ehci-s5p.c
+++ b/drivers/usb/host/ehci-s5p.c
@@ -196,6 +196,7 @@ static int s5p_ehci_probe(struct platform_device *pdev)
struct usb_hcd *hcd;
struct ehci_hcd *ehci;
struct resource *res;
+ const char *phy_name;
int irq;
int err;
@@ -218,7 +219,8 @@ static int s5p_ehci_probe(struct platform_device *pdev)
return -ENOMEM;
}
s5p_ehci = to_s5p_ehci(hcd);
- phy = devm_phy_get(&pdev->dev, "hsic0");
+ phy_name = of_get_property(pdev->dev.of_node, "phy-names", NULL);
+ phy = devm_phy_get(&pdev->dev, phy_name);
if (IS_ERR(phy)) {
/* Fallback to pdata */
if (!pdata) {