Skip to content

Commit

Permalink
soc: loongson: loongson_pm2: Populate children syscon nodes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Binbin Zhou authored and Arnd Bergmann committed Sep 27, 2023
1 parent 8c4102f commit a2fd542
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/soc/loongson/loongson2_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit a2fd542

Please sign in to comment.