summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBinbin Zhou <zhoubinbin@loongson.cn>2023-08-31 19:43:25 +0800
committerArnd Bergmann <arnd@arndb.de>2023-09-27 11:05:19 +0200
commita2fd542287d02d35d61839a09d4b18ccc4b2ff0e (patch)
treed36454bf410dee0ddba6c016d80674f798120fa3 /drivers
parent8c4102f20a968ef466ed6b63930a546f57966ca1 (diff)
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 <zhoubinbin@loongson.cn> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/soc/loongson/loongson2_pm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/soc/loongson/loongson2_pm.c b/drivers/soc/loongson/loongson2_pm.c
index 5ffb77afd9eb..b8e5e1e3528a 100644
--- a/drivers/soc/loongson/loongson2_pm.c
+++ b/drivers/soc/loongson/loongson2_pm.c
@@ -11,6 +11,7 @@
#include <linux/input.h>
#include <linux/suspend.h>
#include <linux/interrupt.h>
+#include <linux/of_platform.h>
#include <linux/pm_wakeirq.h>
#include <linux/platform_device.h>
#include <asm/bootinfo.h>
@@ -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;
}