From: Binbin Zhou Date: Thu, 31 Aug 2023 11:43:25 +0000 (+0800) Subject: soc: loongson: loongson_pm2: Populate children syscon nodes X-Git-Tag: v6.6.7~1808^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2fd542287d02d35d61839a09d4b18ccc4b2ff0e;p=platform%2Fkernel%2Flinux-starfive.git soc: loongson: loongson_pm2: Populate children syscon nodes The syscon poweroff and reboot nodes logically belong to the Power Management Unit so populate possible children. Without it, the reboot/poweroff feature becomes unavailable. Signed-off-by: Binbin Zhou Signed-off-by: Arnd Bergmann --- diff --git a/drivers/soc/loongson/loongson2_pm.c b/drivers/soc/loongson/loongson2_pm.c index 5ffb77a..b8e5e1e 100644 --- a/drivers/soc/loongson/loongson2_pm.c +++ b/drivers/soc/loongson/loongson2_pm.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -192,6 +193,11 @@ static int loongson2_pm_probe(struct platform_device *pdev) if (loongson_sysconf.suspend_addr) suspend_set_ops(&loongson2_suspend_ops); + /* Populate children */ + retval = devm_of_platform_populate(dev); + if (retval) + dev_err(dev, "Error populating children, reboot and poweroff might not work properly\n"); + return 0; }