net: designware: avoid regulator enable failure
Use regulator_set_enable_if_allowed() to avoid failure if regulator is shared between multiple devices. Signed-off-by: Ben Wolsieffer <ben.wolsieffer@hefring.com>
This commit is contained in:
committed by
Jerome Forissier
parent
adc6d192e9
commit
bf82aa8ae0
@@ -894,7 +894,7 @@ int designware_eth_probe(struct udevice *dev)
|
||||
if (ret) {
|
||||
debug("%s: No phy supply\n", dev->name);
|
||||
} else {
|
||||
ret = regulator_set_enable(phy_supply, true);
|
||||
ret = regulator_set_enable_if_allowed(phy_supply, true);
|
||||
if (ret) {
|
||||
puts("Error enabling phy supply\n");
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user