Commit 1fdfa7cc authored by Andrew Davis's avatar Andrew Davis Committed by Vinod Koul

phy: ti: gmii-sel: Allow parent to not be syscon node

If the parent node is not a syscon type, then fallback and check
if we can get a regmap from our own node. This no longer forces
us to make the parent of this node a syscon node when that might
not be appropriate.
Signed-off-by: default avatarAndrew Davis <afd@ti.com>
Reviewed-by: default avatarRoger Quadros <rogerq@ti.com>
Reviewed-by: default avatarSiddharth Vadapalli <s-vadapalli@ti.com>
Link: https://lore.kernel.org/r/20230713200957.134480-1-afd@ti.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 76009ee7
......@@ -465,9 +465,12 @@ static int phy_gmii_sel_probe(struct platform_device *pdev)
priv->regmap = syscon_node_to_regmap(node->parent);
if (IS_ERR(priv->regmap)) {
ret = PTR_ERR(priv->regmap);
dev_err(dev, "Failed to get syscon %d\n", ret);
return ret;
priv->regmap = device_node_to_regmap(node);
if (IS_ERR(priv->regmap)) {
ret = PTR_ERR(priv->regmap);
dev_err(dev, "Failed to get syscon %d\n", ret);
return ret;
}
}
ret = phy_gmii_sel_init_ports(priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment