[PATCH 2/4] phy: cadence-torrent: Do not request reset by index

Philipp Zabel p.zabel at pengutronix.de
Fri Nov 6 07:01:10 PST 2026


There is no need to request a single reset by index.
Use devm_reset_control_get_exclusive() to request the first and only
reset.

According to the device tree binding document, the PHY reset should be
specified as first reset, with the name "torrent_reset". All in-tree
device trees specify this correctly, but there may be a backwards
compatibility reason for leaving the name unspecified in the driver.

Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
---
 drivers/phy/cadence/phy-cadence-torrent.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c
index d446a0f97688..4a021a0838db 100644
--- a/drivers/phy/cadence/phy-cadence-torrent.c
+++ b/drivers/phy/cadence/phy-cadence-torrent.c
@@ -2790,7 +2790,7 @@ static int cdns_torrent_of_get_reset(struct cdns_torrent_phy *cdns_phy)
 {
 	struct device *dev = cdns_phy->dev;
 
-	cdns_phy->phy_rst = devm_reset_control_get_exclusive_by_index(dev, 0);
+	cdns_phy->phy_rst = devm_reset_control_get_exclusive(dev, NULL);
 	if (IS_ERR(cdns_phy->phy_rst)) {
 		dev_err(dev, "%s: failed to get reset\n",
 			dev->of_node->full_name);

-- 
2.47.3




More information about the linux-phy mailing list