From: alexandre.belloni@free-electrons.com (Alexandre Belloni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] drivers: power: reset: at91-reset: Provide reset reason via sysfs (amended with Signed-off-by tag)
Date: Mon, 15 Feb 2016 20:47:40 +0100 [thread overview]
Message-ID: <20160215194740.GD15219@piout.net> (raw)
In-Reply-To: <20160127071418.GA7124@earth>
On 27/01/2016 at 08:14:21 +0100, Sebastian Reichel wrote :
> I can see, that there are currently six different values possible
> for at91-reset, but it's unclear to me what some of them mean, so
> that should be covered in the ABI documentation. Also it may make
> sense to drop the reset suffix for some of them (e.g. "unknown").
>
> reason = "general reset";
>
> This is power-on by power-button/applying voltage?
>
Yes
> reason = "wakeup";
>
> This is power-on by RTC?
>
This can actually be any wakeup, but most likely RTC but it could also
be triggered by an external PMIC. Atmel's definition is general: both
VDDcore and VDDbu are rising, wakeup: only VDDcore is rising
> reason = "watchdog reset";
>
> I gues this is reboot triggered by watchdog timeout?
>
Yes
> reason = "software reset";
>
> This will be returned if system was started by rebooting via
> "reboot / shutdown -r"?
>
This will be the case yes
> reason = "user reset";
>
> This is returned if the board's reset button was pressed?
>
Reset button or any signal on the reset pin of the SoC
> reason = "unknown reset";
>
> => just use "unknown"
>
It should not happen anyway :)
> I suggest to create include/linux/power/power_on_reason.h, with
> standardized values, that are used by the driver:
>
> #define POWER_ON_REASON_RTC "RTC wakeup"
> #define POWER_ON_REASON_WATCHDOG "watchdog timeout"
> ...
>
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
prev parent reply other threads:[~2016-02-15 19:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 16:48 [PATCH] drivers: power: reset: at91-reset: Provide reset reason via sysfs (amended with Signed-off-by tag) David Mosberger-Tang
2016-01-25 8:55 ` Alexandre Belloni
2016-01-25 16:17 ` David Mosberger
2016-01-27 7:14 ` Sebastian Reichel
2016-02-15 19:47 ` Alexandre Belloni [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=20160215194740.GD15219@piout.net \
--to=alexandre.belloni@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.