[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1588057804-29161-3-git-send-email-yamonkar@cadence.com>
Date: Tue, 28 Apr 2020 09:10:04 +0200
From: Yuti Amonkar <yamonkar@...ence.com>
To: <linux-kernel@...r.kernel.org>, <kishon@...com>,
<mark.rutland@....com>, <maxime@...no.tech>
CC: <jsarha@...com>, <tomi.valkeinen@...com>, <praneeth@...com>,
<mparab@...ence.com>, <sjakhade@...ence.com>,
<yamonkar@...ence.com>
Subject: [PATCH v1 2/2] phy: phy-cadence-torrent: Use PHY kernel APIs to set PHY attributes
From: Swapnil Jakhade <sjakhade@...ence.com>
Use generic PHY framework function phy_set_bus_width() to set number
of lanes and function phy_set_max_link_rate() to set maximum link rate
supported by PHY.
Signed-off-by: Swapnil Jakhade <sjakhade@...ence.com>
---
drivers/phy/cadence/phy-cadence-torrent.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c
index 7116127358ee..b914e5ddf93c 100644
--- a/drivers/phy/cadence/phy-cadence-torrent.c
+++ b/drivers/phy/cadence/phy-cadence-torrent.c
@@ -1852,6 +1852,9 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev)
cdns_phy->phys[node].num_lanes,
cdns_phy->max_bit_rate / 1000,
cdns_phy->max_bit_rate % 1000);
+
+ phy_set_bus_width(gphy, cdns_phy->phys[node].num_lanes);
+ phy_set_max_link_rate(gphy, cdns_phy->max_bit_rate);
} else {
dev_err(dev, "Driver supports only PHY_TYPE_DP\n");
ret = -ENOTSUPP;
--
2.26.1
Powered by blists - more mailing lists