lkml.org 
[lkml]   [2013]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 7/9] usb: musb: dsps: use get-usb-phy by phandle for multi instance
Date
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@ti.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


\
 
 \ /
  Last update: 2013-05-23 08:41    [W:0.090 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site