[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1370935072-21056-6-git-send-email-ravibabu@ti.com>
Date: Tue, 11 Jun 2013 12:47:50 +0530
From: Ravi Babu <ravibabu@...com>
To: <linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <balbi@...com>, Ravi Babu <ravibabu@...com>
Subject: [PATCH v2 5/7] usb: musb: dsps: use get-usb-phy by phandle for multi instance
In case of mutli instance support, use get-phy object using phandle
to return to repsective phy xceiv object for each instance
Signed-off-by: Ravi Babu <ravibabu@...com>
---
drivers/usb/musb/musb_dsps.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 0096aad..0d8581b 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -416,7 +416,11 @@ static int dsps_musb_init(struct musb *musb)
musb->mregs += wrp->musb_core_offset;
/* NOP driver needs change if supporting dual instance */
- musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
+ if (dev->parent->of_node)
+ musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
+ "usb-phy", pdev->id);
+ else
+ musb->xceiv = devm_usb_get_phy_dev(dev, pdev->id);
if (IS_ERR_OR_NULL(musb->xceiv))
return -EPROBE_DEFER;
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists