linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Rob Herring <robh+dt@kernel.org>,
	Nicolas Saenz Julienne <nsaenz@kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com,
	Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>,
	soc@kernel.org, Wim Van Sebroeck <wim@linux-watchdog.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-watchdog@vger.kernel.org
Subject: Re: [PATCH V2 2/7] watchdog: bcm2835_wdt: consider system-power-controller property
Date: Tue, 22 Jun 2021 09:12:30 +0200	[thread overview]
Message-ID: <f4e62eec-a1c3-7759-3de3-dec98064dc4a@i2se.com> (raw)
In-Reply-To: <1622981777-5023-3-git-send-email-stefan.wahren@i2se.com>

Hi Guenter,

Am 06.06.21 um 14:16 schrieb Stefan Wahren:
> 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: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  drivers/watchdog/bcm2835_wdt.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c
> index dec6ca0..9490717 100644
> --- a/drivers/watchdog/bcm2835_wdt.c
> +++ b/drivers/watchdog/bcm2835_wdt.c
> @@ -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");

this isn't not applied yet. Can this go via the watchdog-next tree into
5.14?

Best regards
Stefan


  parent reply	other threads:[~2021-06-22  7:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-06 12:16 [PATCH V2 0/7] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 1/7] ARM: dts: bcm283x: Fix up MMC node names Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 2/7] watchdog: bcm2835_wdt: consider system-power-controller property Stefan Wahren
2021-06-15 21:17   ` Stefan Wahren
2021-06-22  7:12   ` Stefan Wahren [this message]
2021-06-28 16:31     ` Guenter Roeck
2021-06-06 12:16 ` [PATCH V2 3/7] ARM: dts: Move BCM2711 RPi specific into separate dtsi Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 4/7] dt-bindings: arm: bcm2835: Add Raspberry Pi 400 to DT schema Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 5/7] ARM: dts: bcm283x: Fix up GPIO LED node names Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 6/7] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 7/7] arm64: dts: broadcom: Add reference to RPi 400 Stefan Wahren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f4e62eec-a1c3-7759-3de3-dec98064dc4a@i2se.com \
    --to=stefan.wahren@i2se.com \
    --cc=arnd@arndb.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=nsaenz@kernel.org \
    --cc=olof@lixom.net \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sbranden@broadcom.com \
    --cc=soc@kernel.org \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).