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>
int device_probe(struct udevice *dev)
{
- struct power_domain pd;
const struct driver *drv;
int size = 0;
int ret;
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);