]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
power-domain: Add warning when power-domain driver is missing
authorAswin Murugan <aswin.murugan@oss.qualcomm.com>
Fri, 13 Feb 2026 11:10:07 +0000 (16:40 +0530)
committerCasey Connolly <casey.connolly@linaro.org>
Mon, 27 Apr 2026 10:33:29 +0000 (12:33 +0200)
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>
drivers/power/domain/power-domain-uclass.c

index cea68945cbdba528a304c7a3fa08ed2b004c4ab8..b4cda5f6c16a081b460c2af3c3b0cb6d39f99616 100644 (file)
@@ -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)