1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-07 19:52:15 +02:00

core: device: use dev_power_domain_on

When multiple power domains attached to a device, need power on
them all, so use dev_power_domain_on to do that.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
Peng Fan
2019-09-17 09:29:22 +00:00
committed by Simon Glass
parent 9c1e982218
commit f0cc4eae9a

View File

@@ -312,7 +312,6 @@ static void *alloc_priv(int size, uint flags)
int device_probe(struct udevice *dev)
{
struct power_domain pd;
const struct driver *drv;
int size = 0;
int ret;
@@ -395,8 +394,9 @@ int device_probe(struct udevice *dev)
if (CONFIG_IS_ENABLED(POWER_DOMAIN) && dev->parent &&
device_get_uclass_id(dev) != UCLASS_POWER_DOMAIN) {
if (!power_domain_get(dev, &pd))
power_domain_on(&pd);
ret = dev_power_domain_on(dev);
if (ret)
goto fail;
}
ret = uclass_pre_probe_device(dev);