[PATCH v2 05/22] phy: cadence-torrent: make cdns,num-lanes optional again
Benjamin Robin
benjamin.robin at bootlin.com
Wed Dec 2 07:08:50 PST 2026
Make the cdns,num-lanes property optional again by defaulting to 4 lanes
when it is absent from the PHY node, restoring the behavior before it
was made mandatory in a previous commit.
Fixes: d09945eacad0 ("phy: cadence-torrent: Check total lane count for all subnodes is within limit")
Cc: stable at vger.kernel.org
Signed-off-by: Benjamin Robin <benjamin.robin at bootlin.com>
---
drivers/phy/cadence/phy-cadence-torrent.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c
index 1e178aa2ffd7..42d60102c0f8 100644
--- a/drivers/phy/cadence/phy-cadence-torrent.c
+++ b/drivers/phy/cadence/phy-cadence-torrent.c
@@ -27,6 +27,7 @@
#define REF_CLK_100MHZ 100000000
#define REF_CLK_156_25MHZ 156250000
+#define DEFAULT_NUM_LANES 4
#define MAX_NUM_LANES 4
#define DEFAULT_MAX_BIT_RATE 8100 /* in Mbps */
@@ -3033,13 +3034,8 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev)
goto put_child;
}
- if (of_property_read_u32(child, "cdns,num-lanes",
- &cdns_phy->phys[node].num_lanes)) {
- dev_err(dev, "%s: No \"cdns,num-lanes\"-property.\n",
- child->full_name);
- ret = -EINVAL;
- goto put_child;
- }
+ cdns_phy->phys[node].num_lanes = DEFAULT_NUM_LANES;
+ of_property_read_u32(child, "cdns,num-lanes", &cdns_phy->phys[node].num_lanes);
total_num_lanes += cdns_phy->phys[node].num_lanes;
--
2.56.1
More information about the linux-arm-kernel
mailing list