mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 21:51:31 +00: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:
parent
9c1e982218
commit
f0cc4eae9a
1 changed files with 3 additions and 3 deletions
|
@ -312,7 +312,6 @@ static void *alloc_priv(int size, uint flags)
|
||||||
|
|
||||||
int device_probe(struct udevice *dev)
|
int device_probe(struct udevice *dev)
|
||||||
{
|
{
|
||||||
struct power_domain pd;
|
|
||||||
const struct driver *drv;
|
const struct driver *drv;
|
||||||
int size = 0;
|
int size = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -395,8 +394,9 @@ int device_probe(struct udevice *dev)
|
||||||
|
|
||||||
if (CONFIG_IS_ENABLED(POWER_DOMAIN) && dev->parent &&
|
if (CONFIG_IS_ENABLED(POWER_DOMAIN) && dev->parent &&
|
||||||
device_get_uclass_id(dev) != UCLASS_POWER_DOMAIN) {
|
device_get_uclass_id(dev) != UCLASS_POWER_DOMAIN) {
|
||||||
if (!power_domain_get(dev, &pd))
|
ret = dev_power_domain_on(dev);
|
||||||
power_domain_on(&pd);
|
if (ret)
|
||||||
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = uclass_pre_probe_device(dev);
|
ret = uclass_pre_probe_device(dev);
|
||||||
|
|
Loading…
Add table
Reference in a new issue