MLK-16118-3 core: Add power domain operation to device probe
When power domain driver is enabled, power on the power domain for the device be probed. Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit bf3e8ecc36ed9f84b9ad1348be48088fbe4eef55)zero-sugar
parent
68b9f562f4
commit
2fde20b3dd
|
@ -27,6 +27,9 @@
|
|||
#include <dm/util.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/list.h>
|
||||
#ifdef CONFIG_POWER_DOMAIN
|
||||
#include <power-domain.h>
|
||||
#endif
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
|
@ -376,6 +379,15 @@ int device_probe(struct udevice *dev)
|
|||
if (dev->parent && device_get_uclass_id(dev) != UCLASS_PINCTRL)
|
||||
pinctrl_select_state(dev, "default");
|
||||
|
||||
#ifdef CONFIG_POWER_DOMAIN
|
||||
if (dev->parent && device_get_uclass_id(dev) != UCLASS_POWER_DOMAIN) {
|
||||
struct power_domain pd;
|
||||
if (!power_domain_get(dev, &pd)) {
|
||||
power_domain_on(&pd);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = uclass_pre_probe_device(dev);
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
|
Loading…
Reference in New Issue