Skip to content

Commit a2fd542

Browse files
AaronDotarndb
authored andcommitted
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>
1 parent 8c4102f commit a2fd542

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/soc/loongson/loongson2_pm.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/input.h>
1212
#include <linux/suspend.h>
1313
#include <linux/interrupt.h>
14+
#include <linux/of_platform.h>
1415
#include <linux/pm_wakeirq.h>
1516
#include <linux/platform_device.h>
1617
#include <asm/bootinfo.h>
@@ -192,6 +193,11 @@ static int loongson2_pm_probe(struct platform_device *pdev)
192193
if (loongson_sysconf.suspend_addr)
193194
suspend_set_ops(&loongson2_suspend_ops);
194195

196+
/* Populate children */
197+
retval = devm_of_platform_populate(dev);
198+
if (retval)
199+
dev_err(dev, "Error populating children, reboot and poweroff might not work properly\n");
200+
195201
return 0;
196202
}
197203

0 commit comments

Comments
 (0)