From ced1080489077ab9943c319a38c2d89adb215f1f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 28 Mar 2020 14:03:48 -0600 Subject: dm: core: Add a way to skip powering down power domains When removing a device the power domains it uses are generally powered off. But when we are trying to unbind all devices (e.g. for running tests) we don't want to probe a device in the 'remove' path. Add a new flag to skip this power-down step. Signed-off-by: Simon Glass --- drivers/core/uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/core/uclass.c') diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index b24b677c55d..68493029364 100644 --- a/drivers/core/uclass.c +++ b/drivers/core/uclass.c @@ -118,7 +118,7 @@ int uclass_destroy(struct uclass *uc) while (!list_empty(&uc->dev_head)) { dev = list_first_entry(&uc->dev_head, struct udevice, uclass_node); - ret = device_remove(dev, DM_REMOVE_NORMAL); + ret = device_remove(dev, DM_REMOVE_NORMAL | DM_REMOVE_NO_PD); if (ret) return log_msg_ret("remove", ret); ret = device_unbind(dev); -- cgit v1.2.3