[PATCH v2 3/5] phy: sr-usb: Set phy ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



set phy ports value in xlate handler which is taken from second argument
of PHY phandle.

Signed-off-by: Srinath Mannam <srinath.mannam@xxxxxxxxxxxx>
---
 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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux