Commit a4f95810 authored by Stefan Wahren's avatar Stefan Wahren Committed by Wim Van Sebroeck

watchdog: bcm2835_wdt: consider system-power-controller property

Until now all Raspberry Pi boards used the power off function of the SoC.
But the Raspberry Pi 400 uses gpio-poweroff for the whole board which
possibly cannot register the poweroff handler because the it's
already registered by this watchdog driver. So consider the
system-power-controller property for registering, which is already
defined in soc/bcm/brcm,bcm2835-pm.txt .
Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: default avatarNicolas Saenz Julienne <nsaenz@kernel.org>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/1622981777-5023-3-git-send-email-stefan.wahren@i2se.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent 14244b7c
......@@ -205,9 +205,13 @@ static int bcm2835_wdt_probe(struct platform_device *pdev)
if (err)
return err;
if (pm_power_off == NULL) {
pm_power_off = bcm2835_power_off;
bcm2835_power_off_wdt = wdt;
if (of_device_is_system_power_controller(pdev->dev.parent->of_node)) {
if (!pm_power_off) {
pm_power_off = bcm2835_power_off;
bcm2835_power_off_wdt = wdt;
} else {
dev_info(dev, "Poweroff handler already present!\n");
}
}
dev_info(dev, "Broadcom BCM2835 watchdog timer");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment