From: Guenter Roeck <linux@roeck-us.net> To: nicolas saenz julienne <nsaenz@kernel.org> Cc: Stefan Wahren <stefan.wahren@i2se.com>, Rob Herring <robh+dt@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-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org Subject: Re: [PATCH 2/6] watchdog: bcm2835_wdt: consider system-power-controller property Date: Wed, 2 Jun 2021 03:40:19 -0700 [thread overview] Message-ID: <20210602104019.GB1865238@roeck-us.net> (raw) In-Reply-To: <e61ba6f5b906fd26a61e9c79ef4dcf4792a364d7.camel@kernel.org> On Tue, Jun 01, 2021 at 11:43:27AM +0200, nicolas saenz julienne wrote: > On Sun, 2021-05-30 at 11:26 +0200, Stefan Wahren wrote: > > 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> > > --- > > 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"); > > nit: shoudln't this be a warning? > No. If anything, it should not be there in the first place, but I didn't want to argue about it. It is perfectly valid for a system to have more than one means to reset it, meaning this message is just noise. Making it a warning would just make it worse. Guenter > Other than that, > > Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> > > Regards, > Nicolas > >
WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <linux@roeck-us.net> To: nicolas saenz julienne <nsaenz@kernel.org> Cc: Stefan Wahren <stefan.wahren@i2se.com>, Rob Herring <robh+dt@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-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org Subject: Re: [PATCH 2/6] watchdog: bcm2835_wdt: consider system-power-controller property Date: Wed, 2 Jun 2021 03:40:19 -0700 [thread overview] Message-ID: <20210602104019.GB1865238@roeck-us.net> (raw) Message-ID: <20210602104019.96YmFXEHH1C9J0MMv5UYadUaa5wNWkpYc1AoLO4g9cg@z> (raw) In-Reply-To: <e61ba6f5b906fd26a61e9c79ef4dcf4792a364d7.camel@kernel.org> On Tue, Jun 01, 2021 at 11:43:27AM +0200, nicolas saenz julienne wrote: > On Sun, 2021-05-30 at 11:26 +0200, Stefan Wahren wrote: > > 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> > > --- > > 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"); > > nit: shoudln't this be a warning? > No. If anything, it should not be there in the first place, but I didn't want to argue about it. It is perfectly valid for a system to have more than one means to reset it, meaning this message is just noise. Making it a warning would just make it worse. Guenter > Other than that, > > Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> > > Regards, > Nicolas > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-06-02 10:40 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-30 9:26 [PATCH 0/6] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren 2021-05-30 9:26 ` Stefan Wahren 2021-05-30 9:26 ` [PATCH 1/6] ARM: dts: bcm283x: Fix up MMC node names Stefan Wahren 2021-05-30 9:26 ` Stefan Wahren 2021-06-01 9:36 ` nicolas saenz julienne 2021-06-01 9:36 ` nicolas saenz julienne 2021-05-30 9:26 ` [PATCH 2/6] watchdog: bcm2835_wdt: consider system-power-controller property Stefan Wahren 2021-05-30 9:26 ` Stefan Wahren 2021-06-01 9:43 ` nicolas saenz julienne 2021-06-01 9:43 ` nicolas saenz julienne 2021-06-02 10:40 ` Guenter Roeck [this message] 2021-06-02 10:40 ` Guenter Roeck 2021-06-02 10:37 ` Guenter Roeck 2021-06-02 10:37 ` Guenter Roeck 2021-05-30 9:26 ` [PATCH 3/6] ARM: dts: Move BCM2711 RPi specific into separate dtsi Stefan Wahren 2021-05-30 9:26 ` Stefan Wahren 2021-06-01 10:03 ` nicolas saenz julienne 2021-06-01 10:03 ` nicolas saenz julienne 2021-06-01 18:51 ` Stefan Wahren 2021-06-01 18:51 ` Stefan Wahren 2021-05-30 9:26 ` [PATCH 4/6] dt-bindings: arm: bcm2835: Add Raspberry Pi 400 to DT schema Stefan Wahren 2021-05-30 9:26 ` Stefan Wahren 2021-06-01 10:03 ` nicolas saenz julienne 2021-06-01 10:03 ` nicolas saenz julienne 2021-06-04 21:31 ` Rob Herring 2021-06-04 21:31 ` Rob Herring 2021-05-30 9:26 ` [PATCH 5/6] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren 2021-05-30 9:26 ` Stefan Wahren 2021-05-30 9:26 ` [PATCH 6/6] arm64: dts: broadcom: Add reference to RPi 400 Stefan Wahren 2021-05-30 9:26 ` Stefan Wahren 2021-06-03 8:07 ` nicolas saenz julienne 2021-06-03 8:07 ` nicolas saenz julienne
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=20210602104019.GB1865238@roeck-us.net \ --to=linux@roeck-us.net \ --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-rpi-kernel@lists.infradead.org \ --cc=linux-watchdog@vger.kernel.org \ --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=stefan.wahren@i2se.com \ --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: linkBe 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).