lkml.org 
[lkml]   [2019]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 3/5] phy: sr-usb: Set phy ports
Date
set phy ports value in xlate handler which is taken from second argument
of PHY phandle.

Signed-off-by: Srinath Mannam <srinath.mannam@broadcom.com>
---
drivers/phy/broadcom/phy-bcm-sr-usb.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/broadcom/phy-bcm-sr-usb.c b/drivers/phy/broadcom/phy-bcm-sr-usb.c
index fe6c589..5274e45 100644
--- a/drivers/phy/broadcom/phy-bcm-sr-usb.c
+++ b/drivers/phy/broadcom/phy-bcm-sr-usb.c
@@ -278,9 +278,16 @@ static struct phy *bcm_usb_phy_xlate(struct device *dev,
if (WARN_ON(phy_idx > 1))
return ERR_PTR(-ENODEV);

+ if (args->args[1])
+ phy_set_phy_ports(phy_cfg[phy_idx].phy, args->args[1]);
+
return phy_cfg[phy_idx].phy;
- } else
+ } else {
+ if (args->args[0])
+ phy_set_phy_ports(phy_cfg->phy, args->args[0]);
+
return phy_cfg->phy;
+ }
}

static int bcm_usb_phy_create(struct device *dev, struct device_node *node,
--
2.7.4
\
 
 \ /
  Last update: 2019-07-31 12:21    [W:0.076 / U:1.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site