mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
power-domain: Add warning when power-domain driver is missing
Update dev_power_domain_ctrl() to log a warning if the power-domain driver is not found (-ENODEV). Return 0 in this case to allow continued execution, while preserving error handling for other failures. Reviewed-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com> Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com> Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Link: https://patch.msgid.link/20260213111009.1254360-3-aswin.murugan@oss.qualcomm.com Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
This commit is contained in:
committed by
Casey Connolly
parent
bf119f79b5
commit
8e2ac60bb8
@@ -10,6 +10,7 @@
|
||||
#include <malloc.h>
|
||||
#include <power-domain.h>
|
||||
#include <power-domain-uclass.h>
|
||||
#include <dm/device_compat.h>
|
||||
#include <dm/device-internal.h>
|
||||
|
||||
struct power_domain_priv {
|
||||
@@ -187,6 +188,12 @@ static int dev_power_domain_ctrl(struct udevice *dev, bool on)
|
||||
"#power-domain-cells", 0);
|
||||
for (i = 0; i < count; i++) {
|
||||
ret = power_domain_get_by_index(dev, &pd, i);
|
||||
|
||||
if (ret == -ENODEV) {
|
||||
dev_warn(dev, "power-domain driver not found\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
if (on)
|
||||
|
||||
Reference in New Issue
Block a user