mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: "Leonard Göhrs" <l.goehrs@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] watchdog: prevent the STPMIC1 watchdog probe from modifying the global turn-OFF behaviour
Date: Fri, 12 Feb 2021 09:50:54 +0100	[thread overview]
Message-ID: <20210212085054.GG19583@pengutronix.de> (raw)
In-Reply-To: <20210211150348.3670852-1-l.goehrs@pengutronix.de>

On Thu, Feb 11, 2021 at 04:03:48PM +0100, Leonard Göhrs wrote:
> According to Table 12 in the STPMIC1-datasheet (Rev 7 - December 2020)
> there are the following turn-OFF conditions:
> 
> - Software switch-OFF*
> - PONKEYn long key press*
> - Thermal shutdown
> - Overcurrent protection
> - Watchdog*
> - VIN_OK_Fall*
> 
> The conditions marked with an * can be re-configured from turn-Off conditions
> to restart requests using the RREQ_EN-bit in the CR register
> (Called RESTART_REQUEST_ENABLED in Linux/Barebox).
> 
> The watchdog code enabled this bit in it's probe function to trigger a restart
> on a watchdog event. This may however result in unexpected behaviour,
> like a long-press of the PONKEY resulting in a restart instead of a turn-off
> when the watchdog is enabled vs. when it is not.
> 
> This change does not affect the restart and poweroff functionality provided by
> the wdt driver, as the restart-/poweroff-handlers explicitly set/clear the
> RESTART_REQUEST_ENABLED flag when triggering a software turn-OFF.
> 
> To prevent unexpected behaviour of the PONKEYn and other turn-OFF sources the
> RESTART_REQUEST_ENABLED configuration in the probe function can and should thus be removed.
> 
> Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
> ---
>  drivers/watchdog/stpmic1_wdt.c | 4 ----
>  1 file changed, 4 deletions(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2021-02-12  8:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 15:03 Leonard Göhrs
2021-02-11 15:32 ` Leonard Goehrs
2021-02-11 15:35 ` Ahmad Fatoum
2021-02-12  8:50 ` Sascha Hauer [this message]

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=20210212085054.GG19583@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=l.goehrs@pengutronix.de \
    /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