mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 10:07:52 +00:00
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: Andrew Davis <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Reviewed-by: Siddharth Vadapalli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user